ReAct Loop (Reason + Act)

ReAct Loop (Reason + Act)

The reasoning-action loop that sits at the heart of every agentic AI system. The LLM alternates between reasoning steps (thinking about what to do next) and action steps (calling a tool, observing the result). The most widely adopted architecture for agentic AI in 2026 [src-003].

The six-step cycle [src-003]

1. Receive goal — the agent receives a high-level objective from the user

2. Reason — the LLM analyses the goal and generates a plan or next action

3. Act — the agent calls a tool (web search, write code, query a database, call an API)

4. Observe — the agent reads the tool’s output and updates its understanding

5. Iterate — steps 2–4 repeat until the goal is achieved or a stop condition is met

6. Return result — the agent delivers the final output to the user

Why it works

The ReAct loop gives an LLM two capabilities it can’t have in a single prompt-response cycle [src-003]:

  • Adaptation to unexpected results — the agent can react to what actually comes back from a tool call, not just what it predicted would happen
  • Error recovery — a failed step can be re-reasoned and retried rather than blocking the whole task
  • Long-horizon tasks — objectives that need dozens of sequential decisions become tractable because state is preserved across iterations

Where ReAct appears

  • Single-agent systems: Claude Code runs a ReAct-style loop internally every time it’s given a task — reason, call a tool (Read/Write/Bash), observe, continue.
  • Multi-agent systems: each agent in Paperclip runs its own ReAct loop on top of its instruction files during a [[heartbeats|heartbeat]]. The orchestration layer coordinates between agents but each individual agent is still ReAct under the hood.
  • Frameworks: LangGraph, AutoGen, OpenAI Agents SDK all implement variants of this loop as their primary execution model.
  • Agentic vision: Gemini Robotics-ER 1.6 applies a ReAct-like structure to visual perception, zooming into images, pointing to relevant features, using code execution, and then interpreting the result [src-039].
  • Physical agents: embodied robotics uses the same reason-act-observe pattern, but the observations are camera views and physical state, and the actions may be tool calls, VLA calls, or robot plan updates [src-039].

What ReAct is NOT [src-003]

  • Not a prompt template — ReAct describes a runtime loop, not a single prompt pattern
  • Not specific to any model — works with any LLM that can follow multi-step reasoning and call tools
  • Not foolproof — it is vulnerable to [[agentic-ai|compounded hallucinations]] when an early step introduces an error that propagates

Related entities

Related concepts

Source references

  • [src-003] Robin Cartier — “What is Agentic AI? A Complete Guide” (2026-03-10)
  • [src-039] Laura Graesser and Peng Xu — “Gemini Robotics-ER 1.6: Powering real-world robotics tasks through enhanced embodied reasoning” (2026-04-14)