Skip to content
← All concepts
Concept

ReAct (Reason + Act)

The canonical agent loop pattern: reason about the task, take an action, observe, repeat.

ReAct: Thought, Action, Observation
1 / 5Thought

Step 1 of 5

Thought

The model states what it needs: 'I need weather data for Tokyo.' This makes the agent's behaviour easier to inspect.

Interleaving reasoning with actions keeps each tool call tied to a stated reason.

Simple explanation

ReAct is a way to build agents where the model explicitly reasons ('I need to search for X') before taking an action (calling a tool), then observes the result and reasons again. This makes agent behaviour interpretable.

Engineering explanation

ReAct interleaves Thought (reasoning), Action (tool call) and Observation (tool result) steps. Modern implementations use native function calling rather than text-based ReAct prompting, but the pattern is the same: the model decides which tool, executes, observes, loops. Production ReAct needs a concrete stopping condition ('answer when you have 3 sources'), not 'be thorough'.

Example

Thought: I need weather data. Action: get_weather('Tokyo'). Observation: {temp: 18}. Thought: I have the answer. Final: 'Tokyo is 18°C.'

When to use it

Any agent that uses tools. It's the default pattern, and many agent frameworks ship a ReAct-style agent out of the box.

Common misconception

In production you should not show the model's raw reasoning to users. Show only safe traces (tool calls, observations), not the internal Thought text.

Related concepts
Learn this in depth
Related architectures