What is the ReAct pattern in AI agents?
The prompt-level pattern that alternates reasoning and action: think, act, observe the result, repeat.
The ReAct pattern is a prompt structure that makes a language model explicitly alternate three steps: a thought that reasons about what to do next, an action that invokes an external tool, and an observation of the returned result, before starting the next thought. The name comes from Yao et al., "ReAct: Synergizing Reasoning and Acting in Language Models" (2022), which shows that interleaving reasoning traces with tool actions clearly beats pure action without intermediate reasoning, which acts without explaining why, and outperforms pure chain-of-thought wherever the answer depends on external facts, since chain-of-thought reasons without ever checking anything against the world. It is a prompt-level pattern, not the general scaffolding that makes a model an agent: that is the job of the agent harness, which ReAct often implements without replacing it, remaining one of the most cited prompt structures for making an agent reason before every concrete move it takes in the real world.
Why reasoning alone is not enough
Chain-of-thought makes the model reason step by step, but that reasoning stays closed inside the model's head: if a premise is wrong or a fact is stale, the error propagates all the way to the final answer with nothing to catch it. ReAct breaks that isolation by interleaving every reasoning step with a checkable action, typically a search, a query, or a call to a tool, then uses the resulting observation to correct the next step. The model no longer decides blind: it decides, watches what happens, and revises the decision if the world tells a different story than the one it imagined.
An enterprise example
An agent answering a question about an enterprise client does not generate the answer on the first try: it thinks it needs data from the CRM, runs the query, observes that the contract lapsed three months ago, thinks this changes how the question should be framed, queries the billing system to check for a renewal in progress, observes the result, and only then composes the final answer. Every thought, action, and observation stays written out in the trace: whoever reads the log can see exactly why the agent queried those two systems and in what order, not just the result that came out of it.
Why it matters for decision makers
The think-act-observe cycle is the reason a ReAct agent is slow and expensive: each step is a separate call to the model, so a task with five cycles costs at least five times a single inference, and in practice more, because every call carries the whole accumulated trace back in as input. But it is also the reason that agent is inspectable: that trace is the record of what the system thought and did, step by step. Anyone evaluating an agent in production should ask to see that trace before trusting the output: it is the difference between a system that can be reviewed line by line and a black box that only returns a final answer.
Related terms
- Agent harness · The software scaffolding around an LLM that makes it an agent: the execution loop, the tools, the context, the limits.
- Tool calling (function calling) · The mechanism that lets an LLM request an external function instead of just answering in words: the basis of every agent.
- Prompting, ICL and Chain of Thought · The three rungs for guiding an LLM without retraining it: instructing it, showing examples in context, making it reason out loud.
- Loop engineering · The discipline of designing an AI agent's observe-reason-act-evaluate cycle: how many iterations to run, when to stop, how to handle errors and repetition.
- Task decomposition · The process by which an agent breaks a complex goal into smaller sub-goals before acting.
A term that hits close to home? Let's talk.
CONTACT ME