ReAct Agent Definition: What It Actually Means
In short
A ReAct agent is an LLM-based agent that alternates between generating natural language reasoning traces and executing discrete actions — such as search queries or API calls — using the result of each action to inform the next reasoning step. The term ReAct is a portmanteau of Reasoning and Acting, introduced by Yao et al. in 2022.
A ReAct agent is an AI agent architecture that interleaves natural language reasoning with discrete tool-use actions in a repeating loop. The loop continues — Thought, then Action, then Observation — until the model produces a Final Answer.
The name ReAct is a portmanteau of Reasoning and Acting. It has no connection to the React JavaScript framework.
Note — Not the JavaScript Framework
ReAct (agent) is entirely unrelated to React.js. The agent term is a portmanteau of Reasoning + Acting, coined in a 2022 academic paper by Yao et al. at Princeton University and Google Brain.
The architecture was introduced in the paper "ReAct: Synergizing Reasoning and Acting in Language Models" by Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. The paper was submitted to arXiv in October 2022 (arXiv:2210.03629) and presented at ICLR 2023.
The loop has three components, each with a distinct role:
- Thought — The model writes out its internal reasoning in natural language, deciding what to do next and why.
- Action — The model calls a tool (e.g., a Wikipedia search, calculator, database query, or REST API).
- Observation — The result of the tool call is returned and appended to the model's context window as an observation.
This loop repeats until the model decides it has sufficient information to emit a Final Answer. The number of iterations is not fixed — it runs until task completion or a maximum step limit is reached.
The key innovation over prior work is the interleaving: reasoning informs which action to take, and action results correct and update the reasoning. This grounds the model in real-world data rather than relying purely on parametric (trained) knowledge — the root cause of most LLM hallucinations on factual tasks.
The original paper benchmarked ReAct on HotpotQA (multi-hop question answering), FEVER (fact verification), ALFWorld (interactive household tasks), and WebShop (online shopping simulation).
How ReAct Agents Work: Architecture and Tools
In short
A ReAct agent is built on three components: a structured prompt template that encodes the Thought-Action-Observation format, an LLM that generates reasoning and action strings, and a tool executor that runs actions and returns observations. Modern frameworks like LangGraph provide ready-made ReAct executors.
In production, a ReAct agent consists of three cooperating components working in sequence on every loop iteration.
- Structured prompt — Includes the task, a list of available tools with descriptions, and few-shot TAO traces to calibrate output format.
- LLM backbone — GPT-4, Gemini, Claude, or similar — generates the next Thought and Action token sequence based on the full context window.
- Tool dispatcher/executor — Parses the Action string, routes it to the correct tool, executes it, and appends the Observation to the context window.
Tools are described to the model in the system prompt using a structured format: name, description, and input schema. The model learns correct invocation from the few-shot examples and tool descriptions — making description quality a direct driver of agent accuracy.
Tip — Tool Descriptions Matter
The quality of your tool descriptions in the system prompt directly affects action selection accuracy. Vague tool descriptions are a leading cause of ReAct agent failures in production. Write tool descriptions as if explaining the tool to a competent but uninformed colleague.
A practical constraint: the context window fills with each TAO iteration. On long-horizon tasks with many tool calls, this can exhaust the model's context limit — a key architectural consideration when designing agents for complex workflows.
Common Tools Used in ReAct Agents
| Tool Type | Example | What the Agent Can Do |
|---|---|---|
| Web Search | Tavily, Bing Search API | Retrieve live facts, news, or current data not in training data |
| Code Executor | Python REPL | Run calculations, data transforms, and logic that LLMs cannot reliably compute |
| Vector Store Retrieval | Pinecone, Weaviate | Retrieve internal documents via RAG — grounding agents in proprietary knowledge |
| SQL Query | PostgreSQL, BigQuery | Query structured databases for real-time operational data |
| REST API Call | Any REST endpoint | Trigger workflows, fetch structured data, or write to external systems |
| Calculator | Arithmetic tool | Avoid LLM arithmetic errors on financial or scientific calculations |
| File Reader | PDF/CSV parser | Extract and reason over data from uploaded documents |
ReAct vs. Other Agent Architectures: Key Differences
In short
ReAct differs from chain-of-thought prompting by adding grounded tool use, from function-calling agents by making reasoning explicit and auditable, and from plan-and-execute agents by selecting each action dynamically rather than committing to a plan upfront.
ReAct occupies a specific position in the agent architecture landscape. Understanding how it compares to alternatives is essential for choosing the right pattern for a given task.
ReAct vs. Other Agent Architectures
| Architecture | Reasoning Visible? | Uses Tools? | Planning Style | Best For |
|---|---|---|---|---|
| ReAct | Yes — Thought traces | Yes | Dynamic, step-by-step | Multi-step factual tasks, auditable workflows |
| Chain-of-Thought (CoT) | Yes — reasoning only | No | Reasoning without grounding | Logic/math problems with no external data needed |
| Function Calling | No — hidden in model | Yes | Dynamic, step-by-step | Low-latency tool use where auditability is not required |
| Plan-and-Execute | Yes — upfront plan | Yes | Upfront plan, then execute | Stable, well-scoped tasks with predictable steps |
| Reflexion | Yes — with self-critique | Yes | Dynamic + self-correction loop | Tasks requiring multiple attempts and error correction |
The most important comparison for practitioners is ReAct vs. function calling — they are often confused because both involve tool use. The critical difference is that ReAct exposes the model's reasoning in the Thought trace, while function calling keeps it opaque inside the model weights.
For enterprise deployments in regulated industries — finance, healthcare, legal — the auditability of Thought traces is not just a nice-to-have. It is frequently a compliance requirement. For a broader view of where ReAct fits in the agentic landscape, see our overview of what is agentic AI and our comparison of AI agent architecture patterns.
When to Use a ReAct Agent — and When Not To
In short
ReAct is the right architecture for multi-step tasks requiring external data retrieval, auditable reasoning, or adaptive decision-making. It is not optimal for single-step tasks, latency-sensitive applications, or tasks fully solvable with parametric knowledge alone.
ReAct is a powerful architecture, but it is not always the right choice. Selecting the appropriate agent pattern is one of the most consequential decisions in an enterprise AI deployment.
Use ReAct when:
- The task requires multiple external data sources — e.g., cross-referencing supplier data, market data, and internal documents simultaneously.
- You need auditability — the Thought traces provide an interpretable record of why each action was taken, critical for regulated industries.
- The task is open-ended or uncertain — where the number and type of steps cannot be predetermined before execution begins.
- You are building research, analysis, or due diligence workflows where the agent must synthesise information across many sources.
Do not use ReAct when:
- The task is single-step and can be answered with one tool call — function calling is faster and simpler.
- You have strict latency requirements — each TAO iteration adds a round-trip to the LLM, meaning ReAct is inherently multi-call.
- The task is fully within the model's parametric knowledge — adding tools introduces unnecessary complexity and potential failure points.
- You are operating in a cost-constrained environment — multiple LLM calls per task multiply API costs, especially with frontier models.
In practice, most enterprise agent systems use ReAct as one component within a larger orchestration layer — not as a monolithic architecture for all tasks. See our guide on what is an AI agent for a broader framework for making these architectural decisions.
Ready to accelerate your AI journey?
Book a free 30-minute consultation with our AI strategists.
Book ConsultationReAct Agent Limitations and Security Risks
In short
ReAct agents face three production-critical limitations: context window exhaustion in long-horizon tasks, vulnerability to indirect prompt injection attacks (IBM Research, 2025), and error propagation when an early Observation is incorrect or misleading.
ReAct is powerful in the right context, but it introduces specific failure modes that enterprise teams must design for before going to production.
Limitation 1: Context Window Exhaustion
Every TAO iteration appends Thoughts, Actions, and Observations to the context window. On long-horizon tasks with many tool calls, this can exhaust the model's context limit — causing truncation, degraded reasoning, or task failure. Mitigation strategies include summarising earlier observations, limiting maximum iterations, or using models with larger context windows.
Limitation 2: Error Propagation
If an early Observation returns incorrect or misleading data — due to a bad search result, a stale API response, or a misformatted tool output — the model's subsequent Thoughts will be built on a faulty foundation. Unlike humans, ReAct agents do not inherently detect when a source is unreliable.
Limitation 3: Indirect Prompt Injection (Critical)
IBM Research (2025) demonstrated that ReAct agents are vulnerable to indirect prompt injection attacks via a "foot-in-the-door" technique. An attacker can embed adversarial instructions inside a web page or document that the agent retrieves as an Observation — causing the agent to execute unintended actions as if they were legitimate instructions.
Warning — Indirect Prompt Injection
IBM Research (2025) showed ReAct agents can be manipulated via malicious content embedded in tool outputs. Any content retrieved from the web, documents, or external APIs must be treated as untrusted input. Implement output filtering, sandboxed execution, and human-in-the-loop approvals for high-risk actions.
Additional production concerns include: infinite loops (if the agent never converges on a Final Answer), cost overruns from excessive tool calls, and non-determinism across runs. Comprehensive mitigation requires a production checklist approach — see our AI production deployment checklist and our dedicated guide to AI agent security risks.
ReAct Agents in Enterprise AI: 2025–2026 Landscape
In short
ReAct is one of the most commonly deployed agentic patterns in production as of 2026, with 57% of engineering teams running agents in production (LangChain, 2026) and the global AI agents market projected at $182.97B by 2033 (Grand View Research, 2026). Enterprise adoption is accelerating across research, customer service, data analysis, and procurement use cases.
The AI agents market is growing rapidly. Grand View Research projects the global AI agents market will reach $182.97 billion by 2033 — driven by enterprise adoption of agentic architectures across industries.
LangChain's 2026 State of Agent Engineering survey found that 57% of engineering teams now have AI agents in production — up substantially from prior years. ReAct remains one of the most commonly implemented patterns, largely because of its framework support maturity and interpretability advantages.
Enterprise use cases where ReAct agents are delivering production value in 2025–2026 include:
- Research and due diligence — Agents that search, retrieve, and synthesise information across multiple sources for investment analysis, procurement evaluation, or competitive intelligence.
- Data analysis workflows — Agents that query databases, run Python analysis, and produce reports — replacing manual analyst steps.
- Customer service escalation handling — Agents that look up order history, check policies, and draft responses with full context before human review.
- Procurement intelligence — Agents that cross-reference supplier databases, pricing APIs, and internal ERP data to support sourcing decisions.
For organisations evaluating where ReAct fits in their broader AI strategy, the key question is not whether to use ReAct — but which tasks genuinely require the Thought-Action-Observation loop versus simpler patterns. See our enterprise AI strategy framework for a structured approach to these architectural decisions, and our overview of best AI agent frameworks in 2026 for the implementation tooling landscape.
About the Authors & Reviewers

Co-Founder, Alice Labs
Co-Founder at Alice Labs. Builds AI automation, agent workflows and integration systems that hold up in real business operations.
- AI automation & agent systems lead
- Workflow design across 100+ deployments
- Specialist in RAG, integrations & APIs

Co-Founder, Alice Labs
Co-Founder at Alice Labs. Author of 7 research reports on AI adoption, governance and labor markets cited across EU, OECD and US benchmarks.
- 8+ years in AI strategy & implementation
- Top-5 AI Speaker, Sweden (Mindley 2025)
- 100+ enterprise AI engagements
Frequently Asked Questions
What does ReAct stand for in AI?
ReAct stands for Reasoning and Acting — it is a portmanteau of the two capabilities the architecture combines. It has no relation to the React JavaScript framework. The term was coined by Shunyu Yao et al. in their 2022 arXiv paper 'ReAct: Synergizing Reasoning and Acting in Language Models,' presented at ICLR 2023.
How many steps does a ReAct agent take?
A ReAct agent takes as many Thought-Action-Observation iterations as needed to complete the task — there is no fixed number. Simple queries may resolve in 2–3 iterations; complex multi-hop research tasks may require 10 or more. Developers typically set a maximum iteration limit (commonly 5–15 steps) to prevent runaway loops.
What is the difference between ReAct and chain-of-thought prompting?
Chain-of-thought (CoT) prompting generates reasoning steps entirely within the model's parametric knowledge — it never calls external tools. ReAct adds grounded tool use: each Thought is followed by an Action that retrieves real external data, and the Observation updates the reasoning. ReAct reduces hallucination on factual tasks because it grounds claims in retrieved evidence, not model memory.
Is ReAct the same as function calling?
No. Both use tools, but ReAct exposes the model's reasoning in explicit Thought traces before each Action — giving practitioners an auditable record of why each tool was called. Function calling (OpenAI tool_use, Anthropic tool_use) keeps reasoning hidden inside the model. For regulated industries or complex debugging, ReAct's transparency is a significant advantage.
What frameworks support ReAct agents?
The three main frameworks are LangChain (AgentExecutor with create_react_agent — now considered legacy), LangGraph (stateful ReAct graph — recommended for new production deployments), and LlamaIndex (ReActAgent class — strong for RAG-heavy workflows). As of 2025, LangGraph is the recommended production path due to better control flow, streaming, and observability.
What are the main security risks of ReAct agents?
The primary risk is indirect prompt injection: IBM Research (2025) demonstrated that adversarial instructions embedded in tool outputs (e.g., a malicious web page the agent retrieves) can hijack agent behaviour. Mitigations include treating all Observations as untrusted input, applying output filters, setting human-in-the-loop approvals for high-risk actions, and enforcing minimum-necessary permissions on all tools.
When should I not use a ReAct agent?
Avoid ReAct for single-step tasks answerable with one tool call (use direct function calling instead), latency-sensitive applications where multiple LLM round-trips are unacceptable, tasks fully within the model's parametric knowledge, and cost-constrained environments where multiple frontier-model calls per query are prohibitive.
How does a ReAct agent know when to stop?
A ReAct agent stops when the model generates a 'Final Answer' token in its output — indicating it has sufficient information to respond. In practice, developers also set a hard maximum iteration limit as a safety guard. Without a limit, poorly configured agents can loop indefinitely, generating costs without producing output.
Can ReAct agents work with RAG?
Yes — RAG and ReAct are highly complementary. A vector store retrieval tool can be one of several tools available to a ReAct agent, allowing it to query internal enterprise documents alongside web search, databases, and APIs. This combination is common in enterprise knowledge management and customer service deployments.
Enterprise AI Agent ROI: What Returns Are Businesses Seeing in 2026?
Next in AI AgentsWhat Is Tool Use in AI? How Agents Call APIs & Execute Actions
Further reading
- Yao et al. — ReAct: Synergizing Reasoning and Acting in Language Models (arXiv 2022)· arxiv.org
- LangChain — State of Agent Engineering 2026· langchain.com
- Grand View Research — AI Agents Market Report, March 2026· grandviewresearch.com
- IBM Research — Prompt Injection Vulnerabilities in LLM Agents (2025)· research.ibm.com
Related services
Related reading
What Is an AI Agent? Definition, Types and Enterprise Use Cases
Learn the precise definition of an AI agent, how autonomous agents differ from chatbots, and which enterprise use cases are delivering measurable ROI in 2026.
comparisonBest AI Agent Frameworks 2026: LangGraph, CrewAI, AutoGen Compared
A head-to-head comparison of the leading AI agent frameworks — LangGraph, CrewAI, AutoGen, and LlamaIndex — with production deployment recommendations.
deepdiveAI Agent Architecture Patterns: A Practical Guide
Explore the major agentic architecture patterns — ReAct, plan-and-execute, reflexion, and multi-agent — with criteria for choosing the right one for your use case.
pillarWhat Is Agentic AI? The Complete Enterprise Guide
Understand what agentic AI means, how it differs from traditional LLM applications, and what enterprise leaders need to know before deploying autonomous agents.
deepdiveAI Agent Security Risks: What Enterprise Teams Need to Know
A comprehensive breakdown of AI agent security vulnerabilities — including prompt injection, tool misuse, and data exfiltration — with mitigation strategies for production deployments.
Sources
- ReAct: Synergizing Reasoning and Acting in Language ModelsShunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao · Princeton University and Google Brain“ReAct interleaves reasoning traces and discrete actions in a TAO loop, outperforming CoT-only and act-only baselines on HotpotQA, FEVER, ALFWorld, and WebShop. Presented at ICLR 2023.”
- State of Agent Engineering 2026LangChain · LangChain“57% of engineering teams have AI agents in production as of 2026; ReAct remains one of the most commonly implemented agentic patterns.”
- AI Agents Market Report, March 2026Grand View Research · Grand View Research“The global AI agents market is projected to reach $182.97 billion by 2033, driven by enterprise adoption of agentic architectures.”
- Indirect Prompt Injection Vulnerabilities in LLM AgentsIBM Research · IBM“ReAct agents are vulnerable to indirect prompt injection attacks via a 'foot-in-the-door' technique, where adversarial instructions embedded in tool outputs can hijack agent behaviour.”
Next scheduled review: