---
title: "What is ReAct? The reason-and-act agent pattern explained"
description: "ReAct is an agent pattern where an LLM alternates reasoning steps with tool actions and reads each result before the next step. How the loop works today."
url: https://broadrouter.com/glossary/react-agent/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# ReAct (reason and act)

Updated 2026-11-15

ReAct (reason and act) is a prompting pattern, introduced by Yao et al. in 2022, in which a language model interleaves reasoning traces with actions such as search or tool calls. It reads each observation, updates its plan, and repeats until it can give a final answer.

Also called: ReAct agent, ReAct prompting, ReAct pattern, ReAct framework

ReAct is the pattern behind most agent loops: think, act, look at the result, think again.

## How it works

The ReAct paper (Yao et al., 2022) prompts a model to “generate both reasoning traces and task-specific actions in an interleaved manner.” The paper says the reasoning traces “help the model induce, track, and update action plans as well as handle exceptions,” while actions let the model gather facts from outside sources.

In the original text-based form, a few examples in the prompt teach the model a format like this:

```text
Question: Which city hosted the event the author attended in 2019?
Thought: I need to find which event the author attended in 2019.
Action: search["author 2019 event"]
Observation: The author spoke at a conference in Lisbon in 2019.
Thought: The event was in Lisbon. That answers the question.
Action: finish["Lisbon"]
```

Your code parses each `Action`, runs it, and appends the `Observation` before calling the model again.

On HotpotQA and Fever, the paper reports that ReAct reduced hallucination and error propagation by querying a simple Wikipedia API. Because every step is written out, the trajectories were also easier to inspect than those of baselines without reasoning traces.

Today, the same loop usually runs through structured [tool calling](https://broadrouter.com/glossary/tool-calling/) instead of parsed text. The OpenAI Agents SDK runner, for example, calls the model, runs any tool calls it returns, appends the results and calls the model again until a final answer arrives.

## Why it matters

-   **Grounding.** Acting on real data between thoughts cuts the guessing that leads to [hallucination](https://broadrouter.com/glossary/hallucination/).
-   **Debugging.** Each thought and observation is visible, so you can see where a run went wrong.
-   **Token cost.** Every Thought, Action and Observation stays in the history and is resent on the next turn. A 10-step ReAct run sends its early steps 10 times. The [agent token budget](https://broadrouter.com/blog/agent-token-budget/) post breaks this down.
-   **Reasoning models.** Models that reason before they answer do part of the “Thought” work internally, as [reasoning tokens](https://broadrouter.com/glossary/reasoning-tokens/).

## On BroadNet Inference

You can run a ReAct loop against any BroadNet chat model, either with a text format and few-shot examples or with structured tools. BroadNet’s docs list tool calling for [GLM 5.3](https://broadrouter.com/models/glm-5.3/) and [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/). [Tool calling with open models](https://broadrouter.com/blog/tool-calling-open-models/) shows the request shapes.

DeepSeek V4.1 Flash, GLM 5.3 and Qwen3.8 27B reason before they answer, and the reasoning counts toward `max_tokens`. Leave room for it on each step, or set `reasoning_effort` to `low`.

## Questions

### Is ReAct the same as chain-of-thought?

No. Chain-of-thought is reasoning only. ReAct adds actions in between, so the model can look things up and correct itself based on what it finds instead of relying only on what it already knows.

### Do I still write Thought and Action lines in prompts today?

Usually not. Modern APIs return structured tool calls, and reasoning models think before answering. The ReAct idea, reason then act then observe, lives on in the agent loop of most frameworks.

### What did the ReAct paper show?

The authors report that on ALFWorld and WebShop, ReAct beat imitation and reinforcement learning methods by an absolute success rate of 34% and 10%, prompted with only one or two in-context examples.

## See also

-   [AI agent](https://broadrouter.com/glossary/agent/) (term)
-   [Chain-of-thought (CoT)](https://broadrouter.com/glossary/chain-of-thought/) (term)
-   [Tool calling](https://broadrouter.com/glossary/tool-calling/) (term)
-   [Reasoning tokens](https://broadrouter.com/glossary/reasoning-tokens/) (term)
-   [Few-shot prompting](https://broadrouter.com/glossary/few-shot-prompting/) (term)
-   [Hallucination](https://broadrouter.com/glossary/hallucination/) (term)
-   [Run the OpenAI Agents SDK on BroadNet Inference](https://broadrouter.com/guides/openai-agents-sdk-custom-provider/) (guide)
-   [Tool calling with open models: schemas, parallel calls, retries](https://broadrouter.com/blog/tool-calling-open-models/) (article)
-   [Agent token budget: where an agent loop's tokens go](https://broadrouter.com/blog/agent-token-budget/) (article)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-react-agent&utm_content=page-cta) ·

**Sources**

-   [Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models, arXiv 2210.03629 (ICLR camera-ready) (checked 2026-11-15)](https://arxiv.org/abs/2210.03629)
-   [OpenAI Agents SDK docs, running agents (agent loop) (checked 2026-11-15)](https://openai.github.io/openai-agents-python/running_agents/)
-   [Anthropic Engineering, Effective context engineering for AI agents (checked 2026-11-15)](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
