What is ReAct?
ReAct is an agent prompting technique that interleaves explicit reasoning steps with tool-using actions so an LLM can dynamically plan, act, and observe results in a loop.
ReAct works by forcing the model to output a structured sequence of Thought (reasoning), Action (tool call), and Observation (tool result) until the task is solved. This interleaving lets the agent update its plan based on real feedback instead of committing to a full plan upfront.
The key idea is synergy: reasoning guides which actions to take, while observations from actions refine the reasoning. It is typically implemented with few-shot examples that demonstrate the Thought-Action-Observation format.
ReAct agents are especially effective on tasks that require both internal knowledge and external information, such as question answering, web navigation, or interactive decision-making.
Example
Asked to find the current population of Tokyo, a ReAct agent first thinks 'I need up-to-date data,' calls a search tool, receives the latest figure, then reasons that the answer is ready and outputs it.
Why it matters
ReAct has become a foundational pattern for building reliable LLM agents that can use tools, correct mistakes, and handle multi-step problems, powering many modern agent frameworks.
Frequently asked questions
Reasoning + Acting.
Related terms
Chain-of-Thought (CoT) is a prompting technique that asks an AI model to generate intermediate reasoning steps before giving a final answer, helping it solve complex problems more reliably.
Agentic AI refers to AI systems that function as autonomous agents, capable of setting goals, making decisions, and taking actions to complete tasks with limited human input.
Agent memory is the component in AI agents that stores and retrieves information from past interactions, enabling recall of context, facts, or experiences to inform future actions.
An AI Agent (or Agent) is a software system that perceives its environment, reasons about goals, and takes actions autonomously to complete tasks.
An autonomous agent is an AI system that perceives its environment, makes decisions, and takes actions on its own to achieve goals without constant human oversight.
Function calling lets large language models request the execution of external tools or functions by outputting structured data (usually JSON) instead of plain text.