ReAct is a way for an AI agent to work through a task by repeating three steps: reason about what to do, act through a tool, and observe the result. The observation informs the next decision. An agent can change course when a tool returns unexpected information instead of following its first idea to the end. section 5.1.2
Compare this with chain-of-thought (CoT): CoT works through intermediate reasoning in a single pass. ReAct closes the loop around external actions. Inserting one tool call into a single pass is not enough; the agent must use what it observed to decide what happens next. The loop that calls the model, runs the tool, and returns its result belongs to the agent framework, not the model alone. section 5.1 section 5.1.2
Figure 5.3 The ReAct paradigm of reasoning in a sequential diagram. The agent thought process occurs in the loop, where the LLM first reasons, plans, and then executes the plan. After each execution of a task (tool), the LLM observes the output and then reasons about whether it needs to continue looping or whether the plan has been completed.
Follow the reason–act–observe sequence, including the decision to continue or give a final reply. section 5.1.2
A small tool-using agent
Give an agent two tools that move a year backward or forward. Instruct it to think through a time-travel question, call a tool when calculation is needed, inspect the returned year, and continue before answering. The important step is not merely calling a tool: it is reasoning again after seeing the result. Print the tool trace to check that this happens. section 5.2.2 section 5.5
Use the loop deliberately:
- Choose it when decisions depend on intermediate results or tools must gather information; skip the extra reasoning for a well-scoped, one-step task. section 5.3
- Keep the available tools relevant, validate tool results, and cap turns or costs. A bad tool choice can otherwise lead to further bad actions. section 3.2.4 section 5.6
- Inspect tool traces when the agent's steps are not visible in its final answer. Do not expect identical reasoning traces on every run. section 5.2.2 section 5.1










