ConceptAgents & Tool Use
ReAct (Reason + Act)
At a glance
Interleave reasoning traces with tool actions so the model plans as it acts.
- Who this is for
- Engineers and technical readers learning the terms used in AI systems.
- Topics
- Agents & Tool Use
- Concept
ReAct, introduced by Shunyu Yao and colleagues at Princeton and Google Brain in October 2022, is the pattern that made tool-using agents practical. Its insight is to interleave two things models were previously asked to do separately: reasoning out loud, as in chain-of-thought, and taking actions against an environment. The model produces a short Thought, then an Action, then reads back an Observation, and repeats until it can answer. The reasoning decides what to do next; the action grounds that reasoning in real data instead of memory. Every modern agent loop you run today is a descendant of this three-beat cycle.
The Thought, Action, Observation cycle#
Each iteration has three parts. The Thought is a sentence or two of working reasoning: what do I know, what do I still need, what should I do next. The Action is a concrete tool call with arguments. The Observation is whatever the tool returns, fed back into the context so the next Thought can react to it. The loop ends when a Thought concludes the model has enough to answer.
Walk through a real two-hop question: "what is the elevation of Kenya's capital?" No single search answers it. A ReAct trace decomposes it on the fly: think about what is missing, look up the capital, read the result, think again, look up the elevation, answer. Each lookup costs one model call plus one tool round trip, so this trace is three model calls end to end, and at no point did the model have to already know the answer.
Why interleaving beats plan-then-execute for some tasks#
Before ReAct, the two halves lived apart. Reasoning-only prompting (plain chain-of-thought) has no way to check itself: it builds on whatever the model already believes, so a wrong premise propagates into a confident, well-argued wrong answer. Acting-only approaches can call tools but lack the connective reasoning to decide what to fetch next or how to combine results. ReAct couples them so each tool result can correct the plan mid-flight.
The original paper quantified the gap. On the ALFWorld household-task benchmark, ReAct beat imitation and reinforcement learning baselines by an absolute 34 percentage points of success rate; on WebShop it won by 10 points, using only one or two in-context examples. On knowledge tasks like HotpotQA and FEVER, interleaving Wikipedia lookups with reasoning produced trajectories that were both more factual and more interpretable than chain-of-thought alone, directly reducing hallucination.
The deeper rule: interleaving wins whenever the right next action genuinely depends on what the last one returned. Debugging is the canonical case. You cannot plan "fix the bug" as five upfront steps, because step two depends on what the stack trace in step one says. The same holds for research questions, data exploration, and any environment that pushes back.
The compounding-error risk#
ReAct's strength, conditioning every step on the full history, is also its weakness. A misread observation in step 2 contaminates the Thought in step 3, which picks a worse Action in step 4, and the trajectory drifts with no built-in mechanism to notice. The arithmetic is unforgiving: if each step is 95% reliable, a 20-step trajectory succeeds about 36% of the time, and at 50 steps you are under 8%. Long horizons amplify small per-step error rates into coin flips.
In practice that argues for short loops and hard rails: cap iterations (most production agents stop at 10 to 25 turns), make tools return errors loudly rather than empty strings the model can gloss over, and insert checkpoints where the trajectory is verified against something external before continuing. Trajectory-level evals, which grade the steps and not just the final answer, are how teams catch drift before users do.
Where it sits among agent patterns#
ReAct is one point on a spectrum. Plan-and-execute drafts the entire plan up front, then executes the steps with little or no replanning. It is cheaper (fewer large-model calls), more predictable, and easier to review, which makes it the better fit when the steps are knowable in advance, like a fixed ETL flow or a document pipeline. Anthropic's "Building effective agents" guidance draws the same line between workflows (predefined paths) and agents (the model directs its own loop), and recommends the simplest pattern that works. Reflexion composes with ReAct rather than competing with it: after a failed trajectory, the agent writes a verbal self-critique into memory and retries the whole task with that lesson in context. Hybrids are common in 2026: plan first, execute each step ReAct-style, replan when an observation invalidates the plan.
Modern tool-calling loops are ReAct grown up#
The original ReAct was a prompt format. The model emitted literal Thought: and Action: lines as text, and a fragile parser extracted the tool name and arguments with regular expressions. Native tool calling, which OpenAI shipped in June 2023 and Anthropic followed with structured tool use, moved that contract into the API itself: the assistant turn carries optional reasoning text plus typed tool-call blocks, the runtime executes them, and tool results return as structured messages. That is the Thought, Action, Observation cycle with the parsing risk engineered away.
Every mainstream agent stack today runs this loop. LangGraph ships a prebuilt agent literally named after the pattern, and coding agents like Claude Code are ReAct loops over file, search, and shell tools. Reasoning models push the Thought step inside the model as extended thinking before each tool call. Most engineers now build AI agents without ever saying "ReAct," which is the surest sign the pattern won.
Practical takeaways#
Reach for a ReAct-style loop when the next action depends on the last observation: debugging, research, exploration. Prefer plan-and-execute or a fixed workflow when steps are predictable, because it is cheaper and easier to audit. Budget for compounding error: cap iterations, keep trajectories short, surface tool errors loudly, and eval the trajectory rather than only the answer. And do not hand-roll the prompt format; native tool calling is the same pattern with structure the model was trained on.