liveBook · Manning

ReAct

As explained in Designing AI Agents

ReAct is an agent technique that interleaves language-model reasoning with actions to interact with an environment.

ReAct interleaves language-model reasoning with actions that interact with an environment. A related runtime structure is the Perception-Reasoning-Action (PRA) loop: perceive evidence, reason about the next step, act, and observe the result before continuing. The PRA loop provides an architectural frame for iterative agent behavior; a single PRA pass need not include tool use. section 2.1.2 section 2.6.1

Two surrounding loops add capabilities without replacing the core cycle. Reflection evaluates the result and can trigger another cycle, revise the plan, or stop. Memory retains selected observations, decisions, and outcomes for later retrieval; persistence alone is not learning. section 2.1.2

Start with one review pass

Argus reviews a code diff using the diff and optional context as perception, one model call as reasoning, and parsed JSON as the action. This deliberately minimal skeleton has no tool calls, memory, reflection, or prior reviews. It makes the phases visible, but does not yet demonstrate an interleaved reasoning-and-tool-action loop. section 2.6.1

Longer loops can amplify errors. With a 95% success rate per step, the illustrative calculation yields about 60% success over 10 steps and 36% over 20. Reduce unnecessary iterations, improve the evidence available at each step, verify intermediate results, and fail fast when state is corrupt. section 2.1.2 section 2.7

Figure 2.2 The Perception-Reasoning-Action loop with reflection and memory sub-loops. Observe Result is a phase of the loop, not an eighth module.

Follow the primary cycle and see where reflection and memory connect across iterations. section 2.1.2

How Designing AI Agents covers it

How deep it goes
Explains the cycle and supporting loops, then implements a single pass without tool invocation or reflection.
Examples
Uses Argus to review a code diff through one model call and structured JSON output.
What you can do after
Evaluate and understand agent loops by identifying their phases, feedback paths, and compounding-error risks.
How it connects
Connects perception, reasoning, action, reflection, and memory across agent iterations.

Also explained in

Compare how 15 books explain ReAct →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Agents. The section links point to the parts of the book it draws on.