ReAct (Agent Pattern)
ReAct is the most common agent pattern — the foundational way to build a tool-using agent. It interleaves Reasoning and Acting: the agent thinks, takes an action, observes the result, and repeats until the goal is met. Its simplicity, adaptability, and transparency make it the default starting point when building agents.
💡 In one line: ReAct is an agent pattern that alternates Thought and Action in a loop — reasoning, using a tool, observing, and repeating until done.
What is the ReAct Pattern?
As an architecture (not just a prompting trick), ReAct structures an agent as a loop of Thought → Action → Observation. The agent reasons about what to do, acts via a tool, reads the result, and reasons again — grounding each step in a real observation.
The Loop
A ReAct Trace
In practice, a ReAct run looks like a transcript of alternating thoughts, actions, and observations.
Why ReAct Is the Default
- Simple — one loop, easy to implement.
- Dynamic — adapts its next step to each observation.
- Grounded — every step is anchored in a real tool result.
- Transparent — the thoughts are visible and inspectable.
- General-purpose — works across many tasks and tools.
Components
- Thought — the reasoning about the next step.
- Action — the tool to call, plus its input.
- Observation — the tool's returned result.
- Answer — the final response once the goal is met.
When to Use It
- General tool-using agents.
- Dynamic, uncertain, or exploratory tasks where the path isn't known upfront.
Strengths
- Flexible and adaptive, grounded, and transparent — an excellent default.
Limitations (and Sibling Patterns)
- Many LLM calls — a step per cycle can be slow and costly.
- Can loop or get stuck without good stopping rules.
- No upfront plan — it may wander on complex, multi-step tasks → use Plan & Execute.
- Doesn't critique its own final output → add Reflection.
These gaps are exactly what the next two patterns address.
Best Practices
- Cap the number of steps and add clear stopping criteria.
- Write clear tool descriptions so actions are chosen well.
- Combine with planning and reflection for hard tasks.
Summary
- ReAct interleaves Thought → Action → Observation in a loop.
- It's simple, adaptive, grounded, and transparent — the default agent pattern.
- Each step is anchored in a real tool observation.
- It can be inefficient and may wander, motivating Plan & Execute and Reflection.
- Use step caps, stopping rules, and good tool descriptions to keep it on track. EOF echo created