Agentic AI

ReAct Framework

ReAct is an agent architecture that interleaves chain-of-thought reasoning traces with tool-calling action steps in a unified context window, enabling adaptive, interpretable multi-step task execution.


title: "ReAct Framework" type: architecture tags: [#reasoning, #planning, #tool-use] created: 2025-07-14 updated: 2025-07-14 status: draft

ReAct Framework

ReAct (Reasoning + Acting) is an agent architecture that interleaves natural language reasoning traces with discrete action steps, allowing a language model to think through a problem and take tool-augmented actions in a unified context window.

Overview

ReAct, introduced by Yao et al. in 2022, is one of the most influential architectural patterns in agentic AI. Its core insight is that reasoning and acting should not be separate pipeline stages but should be interleaved: the agent generates a chain-of-thought reasoning trace, takes an action (such as calling a tool or searching the web), observes the result, and then reasons again — all within a single evolving context. This tight coupling of thought and action allows the agent to adaptively update its plan based on real-time observations.

Before ReAct, agent designs tended to either reason in isolation (without grounding in real-world observations) or act without explicit reasoning (making it hard to trace or correct errors). ReAct unified these two modes, producing agents that are both more capable and more interpretable: the reasoning trace provides a human-readable log of why the agent took each action.

ReAct has been widely adopted as a foundational building block. Google Cloud explicitly cites it as the basis for the key features of an AI agent (reasoning and acting), and virtually all major agentic frameworks — including LangChain and Google's Agent Development Kit — implement ReAct-style loops as a core execution pattern. Its influence extends to more complex architectures like Plan-and-Execute and reflection-augmented agents, which build on the basic Reason-Act loop with additional structural elements.

How It Works

The ReAct loop proceeds as follows:

Thought: [Agent reasons about current state and what to do next]
Action: [Agent selects a tool and specifies inputs]
Observation: [Tool returns a result]
Thought: [Agent reasons about the observation and updates its plan]
Action: [Agent takes the next action]
... (repeats until goal is achieved)
Final Answer: [Agent produces the final output]

Each cycle consists of three elements:

  1. Thought: A free-form reasoning step where the agent verbalizes its current understanding, identifies gaps, and decides what to do next. This corresponds to chain-of-thought reasoning.
  2. Action: A structured call to an available tool (e.g., web search, calculator, code executor, database query). The action is formatted so it can be parsed and executed by the agent's tool-use infrastructure.
  3. Observation: The result returned by the tool, which is appended to the context and becomes input to the next Thought step.

The loop terminates when the agent determines it has sufficient information to produce a final answer, or when a maximum iteration limit is reached.

Key Properties / Characteristics

  • Interleaved reasoning and acting: Thought and action steps alternate, so reasoning is always grounded in the latest observations
  • In-context execution: The entire Thought-Action-Observation history accumulates in the LLM's context window, making the full reasoning trace available for subsequent steps
  • Tool-agnostic: The architecture is compatible with any tool that can be called and returns a result; the set of available tools is defined at agent configuration time
  • Interpretable: The Thought trace provides a human-readable explanation of the agent's reasoning at each step
  • Adaptive planning: The agent can revise its plan mid-task in response to unexpected tool outputs
  • Context-bound: Performance degrades as the context window fills with accumulated Thought-Action-Observation history

Variants & Related Approaches

  • Plan-and-Execute: Separates planning (generating a full task plan upfront) from execution (carrying out steps), reducing the interleaving overhead for well-structured tasks
  • Reflection / Self-Critique: Adds an explicit self-evaluation step after each action or after the full task, prompting the agent to critique and revise its output
  • Tree of Thoughts: Extends ReAct by branching the Thought step into a tree of possible reasoning paths, evaluating each before committing to an action
  • ReAct with memory retrieval: Augments the standard loop with retrieval from long-term Memory Systems, allowing the agent to reference past interactions when reasoning

Strengths & Limitations

Strengths

  • Simple, elegant design that is easy to implement and widely supported across frameworks
  • Reasoning traces improve interpretability and debuggability compared to action-only approaches
  • Adaptive: the agent can change course mid-task when observations contradict its assumptions
  • Widely validated across diverse benchmarks including question answering, fact verification, and interactive decision-making tasks
  • Directly implemented by major frameworks: LangChain, AutoGen, Google ADK, and others

Limitations

  • Context window consumption: long tasks accumulate large Thought-Action-Observation histories, eventually exhausting the context limit
  • Error propagation: early reasoning mistakes can persist and compound across many subsequent steps
  • Inefficient for highly structured tasks where a full upfront plan would be more token-efficient than step-by-step reasoning
  • The Thought step quality depends heavily on the capability of the underlying LLM — weaker models produce unreliable reasoning traces
  • No built-in mechanism for parallel action execution; steps are inherently sequential

Notable Uses / Applications

  • LangChain ReAct agent: One of the most widely used implementations; powers countless production agent deployments
  • Google Cloud agent products: Vertex AI Agent Builder and ADK implement ReAct-style reasoning loops as the core execution pattern
  • Research benchmarks: ReAct was evaluated on HotpotQA, FEVER, ALFWorld, and WebShop, demonstrating improvements over reasoning-only and acting-only baselines
  • Customer and employee agents: The ReAct loop underlies conversational agents that need to look up information, call APIs, and reason over results before responding

Source Material

  1. Yao et al. 2022 — ReAct: Synergizing Reasoning and Acting in Language Models — Original paper introducing the ReAct framework.
  2. What are AI agents? Definition, examples, and types | Google Cloud — Cites ReAct as the foundational framework for the key features of AI agents (reasoning and acting).

Related Pages

Is a type of: Agent Architecture Introduced in: Yao 2022 - ReAct Uses / Depends on: Tool Use, Memory Systems Implemented by: Agentic AI, Google DeepMind See also: Multi-Agent Coordination, Agent Orchestration

Open Questions

  • How should context window limits be managed in long ReAct traces — through summarization, memory offloading, or architectural changes?
  • What is the optimal balance between upfront planning (Plan-and-Execute) and step-by-step ReAct interleaving for different task types?
  • Can the ReAct pattern be parallelized, and if so, how should conflicting parallel observations be reconciled?
  • How do reasoning trace quality and action accuracy change as a function of the underlying LLM's capability?

Page type: architecture | Status: draft