NOTES / AGENTS

ReAct and planning

Two ways an agent decides what to do next: interleave a thought with every action (ReAct), or write a plan first and then execute it.

UPDATED 18 NOV 2026#agents#react#planning#plan-and-execute

The problem

Given a goal and some tools, how does the model choose its next move? Before 2022, reasoning (such as chain-of-thought prompting) and acting (such as generating action plans) had mostly been studied as separate topics. The ReAct paper argued they should be combined1.

ReAct: think, act, observe

ReAct prompts the model to produce reasoning traces and actions in an interleaved way. The reasoning helps it create, maintain and adjust a plan; the actions let it query external sources and bring information back in1. A trace reads as a repeating pattern of thought, action, observation.

Diagram: a ReAct trace of alternating thought, action and observation lines ending with a finish action

Diagram: my own illustrative trace in the style of 1; the question and tool names are invented.

The authors tested this on question answering (HotpotQA) and fact verification (Fever), where interacting with a simple Wikipedia API let ReAct avoid some hallucination and error propagation seen in chain-of-thought reasoning1. They also report that the resulting trajectories are more interpretable than those from methods without reasoning traces1.

Diagram: three columns comparing reasoning only, acting only and ReAct, which interleaves both

Diagram: my own summary of the contrast drawn in 1.

The paper is also candid about limits. It analyses limitations under the prompting setup and runs early fine-tuning experiments suggesting ReAct can improve with more training data1. Treat it as the founding idea, not the final word: modern models have tool calling and reasoning built in, so the explicit “Thought:” text is often replaced by native reasoning, while the loop itself is unchanged (see Tool calling).

Plan first, then execute

The alternative is to separate planning from acting.

Plan-and-Solve prompting is a zero-shot method that asks the model first to devise a plan that splits the task into subtasks, then to carry the subtasks out. It was proposed to reduce missing-step errors in zero-shot chain-of-thought2.

Plan-and-Execute agents applied the idea to agent executors. LangChain introduced the term to contrast with its earlier “action” agents, which followed the ReAct framework, and said the design was inspired by BabyAGI and the Plan-and-Solve paper3. In the pseudocode they give, the agent plans the steps and then, for each step, works out the right tool or action to accomplish it3.

Diagram: a planner writes three steps; an executor carries them out one at a time with an optional re-plan step

Diagram: my own, following the plan then execute structure in 3. The re-plan box is a common extension, not part of the original pseudocode.

Choosing between them

ReAct Plan-and-execute
Decides one step at a time all steps up front
Strength adapts to what each observation shows steady direction, easier to inspect a plan
Weakness can wander without a goal in view a bad plan misleads every later step
Fits uncertain, exploratory tasks tasks that break into known sub-steps

The table is my own summary and a rule of thumb, not a measured result. The practical middle ground is to plan, execute, and re-plan when an observation breaks the plan. Anthropic’s description of agents includes planning followed by independent operation with feedback from the environment at each step, which is that hybrid in spirit4.

Where this leads

Planning ability is mostly a property of the model, so it improves with reasoning models. The harness decides how much structure to add around it. When the plan itself gets reviewed and improved, you are in Reflection territory.

Sources

  1. [1]ReAct: Synergizing Reasoning and Acting in Language Models — Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao · arXiv, ICLR 2023 · 2022PARAPHRASED
  2. [2]Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models — Lei Wang and co-authors · arXiv, ACL 2023 · 2023PARAPHRASED
  3. [3]Plan-and-Execute Agents — LangChain blog · 2023PARAPHRASED
  4. [4]Building effective agents — Erik Schluntz and Barry Zhang · Anthropic · 2024FURTHER READING

© Ashish Kumar. All rights reserved. Quoted and cited material belongs to its owners. How I attribute sources.

Product, company and framework names are trademarks of their respective owners. Mentioning them does not imply affiliation or endorsement.