Skip to content
Sign in

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.