ReWOO and Plan-and-Execute: Decoupled Planning

ReAct interleaves thought and action in one stream. ReWOO separates them: one big plan up front, then execute. 5x fewer tokens, +4% accuracy on HotpotQA, and you can distill the planner into a 7B model. Plan-and-Execute generalized it; Plan-and-Act scaled it to web navigation.

Build 1 hr Python (stdlib)

Prerequisites: Phase 14 · 01 (Agent Loop)

#Learning Objectives

  • Explain why ReWOO's Planner / Worker / Solver split saves tokens and improves robustness over ReAct's interleaved loop.
  • Implement a plan DAG, a dependency-ordered executor, and a solver that composes worker outputs — all stdlib.
  • Decide when a task should run as plan-then-execute vs interleaved ReAct, using the 2026 "five workflow patterns" framing (Anthropic).
  • Recognize when Plan-and-Act's synthetic plan data is needed for long-horizon web or mobile tasks.
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.