Planning strategies: ReAct, Plan-and-Execute, and beyond
Different shapes of agent reasoning and when to use each.
Not all agent tasks need the same shape of reasoning. Match the planning strategy to the task; don't force every problem into ReAct or plan-and-execute.
The three canonical shapes
- ReAct (Reason + Act). Model picks one action, observes, reasons, picks the next. Tight loop. Best for exploration-heavy tasks.
- Plan-and-Execute. Model produces a full plan up front, then executes it step by step. Best for tasks where the plan is mostly known in advance.
- Tree-of-Thought. Model considers multiple candidate next steps, evaluates, picks the best. Best for high-stakes decisions where exploration has value.
ReAct in practice
Thought: The user wants the Q3 revenue. I should look that up.
Action: get_revenue(quarter="Q3")
Observation: {revenue: 4200000}
Thought: I have the number. I can answer now.
Action: answer("Q3 revenue was $4.2M")
Strengths: simple, transparent, easy to debug. Weaknesses: no long-term coherence; the model can drift on complex tasks. Can loop if the tool responses don't push it forward.
Plan-and-Execute in practice
Plan:
1. Fetch Q3 revenue.
2. Fetch Q2 revenue.
3. Compute delta.
4. Format response.
Executor steps through. After each step, the plan can be adjusted if the world surprised us.
Strengths: coherent for long tasks; the plan is auditable; cheap execution (plan generated once). Weaknesses: rigid if the world is uncertain; bad plans silently hurt for the whole run.
Tree-of-Thought in practice
For a strategic decision:
Candidate A: Send escalation email.
Candidate B: Request more info from user.
Candidate C: Mark as resolved with caveats.
Evaluate: B has lowest user friction, A has highest resolution likelihood.
Pick: B, but prepare fallback to A if no response in 24h.
Strengths: better decisions on ambiguous choices; more robust. Weaknesses: expensive (multiple generations per decision); overkill for simple tasks.
How to pick a strategy
| Task shape | Strategy |
|---|---|
| Exploration, unknown path | ReAct |
| Known sequence with occasional branches | Plan-and-Execute |
| High-stakes, branching, reversible | Tree-of-Thought |
| Mixed | Nested: plan-and-execute at the top, ReAct within each step |
Hybrid patterns (what real systems do)
Most production agents use plan-and-execute at the task level, ReAct within each step. The plan says "step 3: research competitor pricing." The ReAct loop within step 3 figures out how to do that — searches, parses results, decides when it has enough.
This balances long-horizon coherence with short-horizon flexibility.
What kills planning quality
- Vague goals. Plans are only as good as the goal they're derived from.
- Missing capabilities. The model plans to use a tool that doesn't exist, gets stuck.
- Over-planning. 20-step plans are fragile. Cap your planner at 5-7 steps; let each step be refined during execution.
Check your understanding
2-question self-check
Optional. Your answers feed your knowledge score on the track certificate.
Q1.For a task with a mostly-known sequence and occasional branches, the best planning shape is…
Q2.Most production agents actually use…
Continue in this track
More lessons from Building AI Agents.
Lesson 2
Tool use: giving a model hands
How tool calling works under the hood, and how to design tools models can use.
Lesson 3
Memory systems: short, long, and associative
The three kinds of memory an agent needs and how to build each.
Lesson 5
Multi-agent systems without the chaos
When multiple agents help, when they don't, and how to coordinate them.