ReAct (Reasoning + Acting)

Confidence 0.90 · 7 sources · last confirmed 2026-09-18

ReAct is the prompting paradigm — introduced by Shunyu Yao et al. (with senior Google Research co-author Yuan Cao) in 2022 (paper, ICLR 2023; Google Research blog) — that interleaves free-form reasoning traces with task-specific actions in a single language-model trajectory. It is the genealogical root of the wiki’s agent definition: the “LLM that autonomously uses tools in a loop” the wiki adopts from 2026 practitioners is exactly ReAct’s reason → act → observe → adjust cycle, named four years earlier.

The core mechanism

Take a standard agent–environment setup: at step t the agent sees observation oₜ and takes action aₜ. ReAct augments the action space A with a language space L, so  = A ∪ L. An action âₜ ∈ L is a thought (reasoning trace) that:

  • does not affect the external environment (produces no observation feedback), but
  • updates the model’s working context cₜ₊₁ = (cₜ, âₜ) to support future reasoning or acting.

This yields a two-way synergy:

  • Reason to act — thoughts decompose goals, build/track/adjust plans, inject commonsense, handle exceptions.
  • Act to reason — actions interface with external sources (a Wikipedia API, a shell, a browser) to pull in information that grounds the next thought.

Before ReAct, the two halves were studied separately: chain-of-thought prompting reasoned but stayed ungrounded (prone to hallucination and error propagation, no way to update knowledge from the world), while act-only LLM agents acted but couldn’t reason abstractly about high-level goals or maintain working memory. ReAct’s claim is that interleaving them beats either alone.

Two prompting regimes

RegimeWhenPattern
Dense thoughtsReasoning-heavy tasks (multi-hop QA, fact verification)Alternate thought / action / observation every step
Sparse thoughtsDecision-making with many actions (text games, web navigation)Let the model decide when to insert a thought; most steps are pure actions

The original results use a frozen PaLM-540B prompted with just 1–6 hand-written in-context trajectories — no fine-tuning needed for the headline numbers. (Fine-tuning smaller PaLM-8B/62B on filtered ReAct trajectories improves further and scales better than CoT/Act baselines.)

Why it mattered (the empirical case)

  • Knowledge-intensive reasoning. Against a deliberately weak 3-action Wikipedia API (search, lookup, finish), ReAct cuts chain-of-thought’s hallucination by grounding in retrieval. Best results combine ReAct + CoT-SC (internal knowledge and external facts): HotpotQA EM 35.1, FEVER acc 64.6.
  • Decision-making, near-zero-shot. With 1–2 in-context examples, ReAct beats imitation/RL baselines trained on 10³–10⁵ instances: +34% absolute success on ALFWorld (71 vs 45 act-only vs 37 IL), +10% on WebShop (40 vs 30.1 vs 29.1). The controlled act-only baseline on the same trajectories underperforms — sparse reasoning is what closes the gap, not just more actions.
  • Interpretability and human correction. Because thoughts are legible, a human can tell internal knowledge from retrieved fact and inspect why the agent acted. Editing a single hallucinating thought realigns the agent — the paper’s “new form of human–machine collaboration.” This anticipates the wiki’s later harness argument that human-correction and intent-validation layers are where production reliability lives.

ReAct as the ancestor of the agent harness

The structural lineage is direct:

  • ai-agents defines an agent as “an LLM that autonomously uses tools in a loop” (via Wolfe/Willison) — that loop is ReAct.
  • agent-harness is the runtime engineering of the same reason–act–observe cycle: the harness assembles model + tools + instructions into the loop ReAct first prompted by hand.
  • 2026 framework tutorials operationalise it directly: the ADK tutorial names ReAct as the definition of a modern agent and builds a self-correcting multi-agent system (planner / writer / validation-checker / loop agents) whose retry loops are ReAct’s exception-handling thoughts made into framework primitives.

What ReAct established as a prompting trick on a frozen model in 2022 is now the architectural default the wiki’s whole agent corpus assumes.

The loop as a practitioner narrates it, 2026 ( PyCon DE)

Evidence of how completely ReAct has been absorbed: a 2026 conference talk describes the loop from the runtime side, in full, without naming ReAct or citing it.

Prompt in → the agent enters a reasoning loop → the loop divides the prompt into a plan → the plan contains execution of multiple tools (API calls, analytical or operational database access) → the loop continues “until a token is emitted in one of the outputs. The token is final_answer — it’s literally final_answer, final_underscore_answer” → the agent stops, produces the final textual output, writes prompt and output to memory “so that it can use later on”, and the loop begins again.

Two things this adds to the page. The termination condition has become a literal string convention — the loop exits on a sentinel token in the output rather than on a model-internal signal, which is the plainest statement in the corpus of how thin the boundary between reasoning trace and control flow actually is. And the memory write is now part of the loop’s definition, not an add-on: ReAct’s trajectory has become durable state between iterations. Both are harness concerns that ReAct performed with prompting alone.

Sokolenko’s own genealogy for why models can run this loop stops one step earlier than ReAct: GPT-3 trained on reasoning-shaped corpora (Stack Overflow threads — “a tree-like structure, a reasoning structure”), then chain-of-thought work putting intermediate reasoning steps into training data. “This is how reasoning got injected into large language models.” ReAct’s contribution — interleaving those traces with actions — is the step his account skips, which is exactly the step this page exists to record.

  • ai-agents — ReAct is the loop at the centre of the agent definition.
  • agent-harness — the production-engineering layer that operationalises the ReAct loop (model + tools + instructions as a runtime).
  • foundation-models — ReAct’s substrate; the original work prompts PaLM-540B, a frozen foundation model.
  • agent-development-lifecycle — frameworks (Google ADK) that ship ReAct-style loops as building blocks.

Debates and supersession

  • Is ReAct still “the” agent loop, or a 2022 special case? The reason–act–observe cycle remains the load-bearing abstraction in every 2026 wiki source on agents, but modern harnesses add layers ReAct didn’t theorise — context engineering, constraints/contracts middleware, telemetry-as-training (agent-harness). Open question: how much of contemporary agent reliability is ReAct the paradigm vs everything the harness wraps around it. The wiki’s current position: ReAct named the loop; the harness owns the reliability.
  • Reasoning vs acting — which carries the weight? ReAct’s ablations show act-only and reason-only both underperform the interleaving, but the relative contribution is task-dependent (dense thoughts for QA, sparse for decision-making). No single source in the wiki adjudicates a general split.
  • Source independence caveat. Two of the three citing sources (the paper and its Google Research blog) are the same work in different registers; only the 2026 ADK tutorial is independent corroboration. Confidence reflects the result’s foundational status and four years of downstream adoption rather than three independent replications.

Where ReAct sits in the harness genealogy, and a 2026 vendor implementation (added 2026-09-09)

Placed in sequence. YC Paper Club’s five-minute history of harnesses locates ReAct as one rung among several rather than the origin of agentic behaviour — after tool use (WebGPT, Toolformer), after CRUD-on-context (MemGPT) and skills (Voyager), and grouped with Self-Refine and Reflexion as the family that added the revision loop: take an action, send it to an internal evaluator or to the real environment for a reward signal, and revise. That framing is a useful corrective to reading ReAct as the beginning of the story; its specific contribution was closing the loop between reasoning and revision, on top of an action space others had opened.

And implemented, in a modality ReAct never addressed. Grootendorst’s Gemini explainer describes agentic video understanding in ReAct’s own vocabulary, without citing it: “the model first thinks about which tools it might want to use to process this video… It runs those tools — I mean, this is an agentic loop — and it gets an observation in return, frames for instance. And this information is then given back to the model where it can decide to do another loop. And then we have this very traditional agentic loop of thinking, acting, observing, and looping until it finally arrives at the answer.”

The tools are perceptual rather than informational — get_transcript, get_frames at a model-chosen frames-per-second, get_audio — and the trajectory is coarse-to-fine: pull the cheap transcript to find roughly where the answer lives, then re-sample that region at higher frame rate. The payoff is ReAct’s own: grounding the answer in fetched observations rather than in what the model can infer from a fixed dump of context. The claimed result is that token cost falls and accuracy rises, because attention lands on query-relevant material — the vendor’s version of ReAct’s grounding argument, though offered without a benchmark.

The obvious failure mode is unaddressed and worth tracking: a coarse-to-fine loop that begins with the transcript degrades when the salient content is unspoken.

The problem ReAct addresses, named in the pre-LLM literature (added 2026-09-18)

Wooldridge, 2009 names the central open problem of agent design as the balance between goal-directed and reactive behaviour. Goal-directed execution alone assumes the environment does not change while a plan runs and that the goal stays valid, which in a dynamic environment makes blind execution “a poor strategy”; constant reaction alone means “never focusing on a goal long enough to actually achieve it.” His Tileworld example is an agent that should drop its current objective when the hole it is pushing a tile toward disappears.

ReAct’s thought steps (planning, decomposition, exception handling) are the goal-directed side, and its observations are the reactive side, interleaved in one trajectory. Wooldridge’s formal run, an interleaved sequence of environment states and actions, is the same structure without the language-model thoughts. Wooldridge treats the balance as unsolved in 2009; ReAct does not claim to have solved it either. The 2026 failure modes recorded on agent-harness (agents that give up too early inside a capable environment) and multi-agent-failure-modes (failures accepted as successes) are both mis-timings of when to stop pursuing a goal, which is one face of the same balance.