Papers
Topics
Authors
Recent
Search
2000 character limit reached

ReAct Workflow for Agentic LLMs

Updated 8 February 2026
  • ReAct workflow is a modular agentic pattern that alternates between natural language reasoning (Thoughts) and explicit action execution (Actions) for dynamic decision-making.
  • It utilizes an iterative loop of Thought, Action, and Observation, supported by in-context prompt templates, to continuously refine plans based on external feedback.
  • Extensions like Focused ReAct and multi-agent frameworks enhance efficiency by reducing context bloat and enabling coordinated problem-solving in diverse applications.

The ReAct workflow is a modular agentic pattern that interleaves chain-of-thought reasoning with explicit action execution. Originally developed for LLMs operating in both decision-making and knowledge-intensive environments, ReAct has been widely adopted for interactive machine learning, autonomous agents, agentic workflow orchestration, and advanced robotics contexts. Its central principle is an alternating loop: the agent generates rationales (“Thoughts”), selects and executes environment actions (“Actions”), observes the results (“Observations”), and iterates, thereby allowing dynamic plan refinement grounded in external feedback. The ReAct framework provides a general abstraction for LLM-driven agents capable of adaptive decision-making, improved factuality, and interpretable reasoning trajectories (Yao et al., 2022, Tokal et al., 9 Sep 2025).

1. Formal Structure and Key Components

ReAct defines an agentic cycle in which free-form reasoning and concrete tool invocation are systematically interleaved. At each timestep tt, the agent maintains a context ctc_t consisting of the history of observations and actions. The agent’s next output ata_t is sampled from the model policy πθ(atct)\pi_\theta(a_t \mid c_t), where ata_t is either a Thought τtL\tau_t \in L (natural-language rationale) or an environment Action atAEa_t \in A_E (API call, navigation command, etc.) (Yao et al., 2022).

This loop is operationalized as:

  • Thought: The agent internally reasons, decomposes goals, and develops subplans via natural language.
  • Action: The agent invokes a tool, queries an API, or executes a domain-specific command.
  • Observation: The environment’s reply is received and added to the agent’s context, enabling subsequent thoughts to be conditioned on actual data.

The canonical ReAct pipeline pseudocode is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
context = ["Question: " + query]
for t in 1 ... T_max:
    output = LLM.generate(context)
    if output is Thought:
        context.append(output)
    elif output is Action:
        context.append(output)
        if output is Finish[answer]:
            return answer
        obs = env.execute(output)
        context.append("Observation: " + obs)
    else:
        break
return "No Answer"
(Yao et al., 2022)

2. Prompting Template and Few-Shot Instantiation

A critical technical feature of ReAct is its prompt design. The agent is primed via in-context learning with exemplars in the structure:

1
2
3
4
5
6
7
Question: <Query>
Thought 1: ...
Action 1: ...
Observation 1: ...
Thought 2: ...
...
Action n: Finish[answer]
Each stage alternates a model-generated Thought, an explicit Action (often tool invocation), and the corresponding Observation. This template directly instructs the LLM to alternate free-form reasoning (which can involve common-sense decomposition, subgoal identification, or error handling) with grounded action—such as searching external APIs or inducing navigation moves. The final action must be a “Finish” operation containing the answer or resolution (Yao et al., 2022).

3. Workflow Variants and Extensions

3.1 Focused ReAct: Reiteration and Early Stop

Focused ReAct was designed to address context drift and cyclic loops by introducing:

  • Reiteration: Each prompt re-prefixes the original question, keeping the agent focused.
  • Early Stop: If the agent proposes any previously taken action, execution halts and the model is prompted for a final answer.

The combined pseudocode enforces action deduplication and reiteration at every step. These modifications yield empirical accuracy improvements up to 530% and significant run-time reductions on complex tasks compared to vanilla ReAct, especially for smaller LLMs (Li et al., 2024).

3.2 Multi-Agent and Advanced Agentic Patterns

ReAct’s single-agent pattern was extended to robust multi-agent configurations (e.g., Autono, AgentX). In these, agents exchange “memory” (ordered dictionaries of action/observation traces), coordinate via handoff tools, and share global context, thus enabling explicit division of labor and collaborative completion of complex tasks (Wu, 7 Apr 2025). The timely abandonment strategy introduces stochastic termination when agents exceed an estimated step budget, balancing exploration and conservative execution via tunable hyperparameters.

4. Empirical Evaluation and Comparative Performance

ReAct demonstrates empirical strengths on a range of knowledge-intensive and decision-making tasks. Experiments show:

  • HotpotQA (question answering): ReAct reduces hallucination rates (6% vs 14%) and completely eliminates chain-of-thought “hallucination” failures (0% vs 56%) compared to vanilla chain-of-thought prompting (Yao et al., 2022).
  • Interactive benchmarks (ALFWorld, WebShop): Outperforms imitation and RL by 34% and 10% absolute, respectively.

In agentic orchestration evaluations, ReAct achieves 100% task success for web search, research report generation, and stock correlation, and exhibits minimal orchestration overhead due to its single-agent design. However, ReAct exhibits context expansion (input token bloat) and lacks multi-agent specialization, leading to potential inefficiency or hallucinated tool selection in large tool suites (Tokal et al., 9 Sep 2025).

Pattern Success Rate (Web Search) Avg. Latency (s) LLM Cost (\$)
ReAct 100% 43.5 0.022
AgentX 80% 81.8 0.012
Magentic-One 75% 114 0.020

Large input context size can inflate inference cost, particularly for long-horizon tasks with many tool calls.

5. Typical Applications and Use Cases

ReAct has been applied in:

  • Knowledge-intensive question answering (HotpotQA, FEVER) via explicit API calls and subgoal decomposition (Yao et al., 2022).
  • Interactive navigation tasks in simulated environments (ALFWorld), leveraging environment feedback in multi-step plan revision.
  • Automated shopping (WebShop), orchestrating browsing and purchase flows through sequential action/observation conditioning.
  • Advanced workflow systems for research report construction, stock-market correlation analysis, and cloud-deployed automation via FaaS and Model Context Protocol (MCP) tools (Tokal et al., 9 Sep 2025).
  • Autonomous robotics, where analogous ReAct-inspired workflows coordinate high-level reasoning, discrete planning, and hybrid SAT/ASP-based execution (as in ReAct! for cognitive robotics) (Dogmus et al., 2013).

6. Limitations and Remedies

ReAct's primary limitations include:

  • Context Bloat: Unpruned concatenation of reasoning and action-observation history drives up LLM inference cost for long tasks.
  • Single-Agent Boundaries: No tool filtering or hierarchical specialization results in hallucinated or duplicated tool selections, especially in large tool suites.
  • No Memory Summarization: Lack of explicit context condensation or summarization, increasing susceptibility to context dilution and inefficient reasoning over irrelevant history.

Focused ReAct addresses these by reiterating the original question and introducing action deduplication (Li et al., 2024). Multi-agent frameworks augment memory with explicit transfer, compression, and division of labor (Wu, 7 Apr 2025). However, current instantiations do not implement advanced memory condensation or dynamic toolset adaptation within the core ReAct loop.

7. Significance and Impact

The ReAct workflow has redefined agentic orchestration for LLMs and autonomous systems by bridging high-level reasoning and action in a tightly coupled loop. Its modularity enables integration within single-agent and multi-agent deployments, supports tool-augmented LLMs, and enables robust handling of error propagation and hallucination. Empirically, ReAct remains competitive or superior in success rate, interpretability, and factual accuracy versus both baseline chain-of-thought and advanced multi-agent orchestration patterns (Yao et al., 2022, Tokal et al., 9 Sep 2025). As LLM tool-use expands, ReAct-derived schemas are central in large-scale agentic system design, cloud workflow automation, and robust adaptive planning frameworks.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to ReAct Workflow.