ReAct
Also called: Reason+Act · ReAct prompting
ReAct is a prompting technique that has a language model explicitly interleave written reasoning ('Thought') with actions and their results ('Observation'), rather than jumping straight from a question to an action.
ReAct — short for 'Reason + Act' — is a prompting pattern, described in published research, where instead of asking a model to just pick an action, you ask it to write out a short thought about what it's trying to do and why, then take an action, then read the observation that comes back, then write another thought, and so on. The explicit 'Thought' step is the distinguishing feature: it gives the model a place to reason about whether its last action worked, whether the plan needs to change, and what to try next, in text the agent (and a person debugging it) can actually read.
Before ReAct, one common approach was to have a model reason through a problem purely in text (chain-of-thought) without taking any real actions, or to have it take actions without showing its reasoning at all. ReAct combined both: reasoning traces interleaved with real tool calls and their real results, so the model's plan can be grounded in what actually happened rather than what it assumed would happen.
Because the intermediate 'Thought' text is visible, ReAct-style traces are also useful for debugging: when an agent goes down the wrong path, the thought steps usually show where its reasoning diverged from what actually happened, which is harder to diagnose from action-only logs.
How it works
The loop shown in the diagram — Thought, Action, Observation — repeats: the model writes a thought about what to do next, takes the corresponding action (typically a tool call), reads the observation that comes back, and writes the next thought based on it. This is a specific way of structuring the 'plan' step inside the broader agent-loop — many implementations of the agent loop use something ReAct-like for that step, though it's one technique among several, not the only way to do it.
Example
Thought: I need to find out why the build is failing before I can fix it.
Action: read_file("ci_log.txt")
Observation: Error: dependency 'foo' version mismatch.
Thought: The log points to a dependency version issue, so I should check the lockfile.
Action: read_file("package-lock.json")
Observation: foo is pinned to an older version than the code expects.
Thought: I should update the pin and rerun the tests.
Action: edit_file("package.json", ...)How it differs
ReAct is often compared to plain chain-of-thought prompting: chain-of-thought has a model reason through a problem in text without taking any real actions, while ReAct interleaves that reasoning with actual tool calls and their real results, so each step of reasoning can be grounded in what actually happened rather than an assumption.
Common misconceptions
FAQ
What does ReAct mean in AI agents?
What's the difference between ReAct and chain-of-thought?
Is ReAct part of the agent loop or a separate thing?
agent-loop.Last checked: 2026-08-28