A8gent
GlossaryAgent concepts

What is reAct?

Also called: reason and act, ReAct prompting, ReAct agent

ReAct is an agent pattern in which the model alternates between writing a reasoning step and taking an action, feeding each observation back into the next round of reasoning.

Written by A8gent
Contents
  1. At a glance
  2. What ReAct is
  3. How ReAct runs in practice
  4. Cost, latency and reliability
  5. What you should know
  6. FAQ
  7. Related terms

At a glance

Category
Core agent concept
Full name
Reason and act
Origin
Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models, 2022
Loop
Thought, action, observation, repeated until an answer or a step cap
Cost profile
Grows faster than linearly with steps - each step re-reads the transcript
Required control
A hard step cap and full per-step logging

What ReAct is

ReAct - short for reason and act - is the pattern that made AI agents work. Introduced in a 2022 paper by Yao and colleagues, it interleaves two things that had previously been done separately: chain-of-thought reasoning, where the model talks itself through a problem, and acting, where the model calls a tool and receives an observation. Each observation becomes input to the next round of reasoning.

The loop reads as thought, action, observation, thought, action, observation, until the model concludes. The insight is that reasoning without acting drifts into confident invention, and acting without reasoning produces flailing tool calls. Interleaving them lets the model correct itself against real data at every step, which is exactly what you want when the job is "find out why this invoice does not match the purchase order".

How ReAct runs in practice

You rarely write ReAct prompts by hand any more. Modern tool calling APIs implement the same loop natively: the model's reasoning is its own text, the action is a tool-call request, the observation is the tool result appended to the conversation. Frameworks like LangGraph and the OpenAI Agents SDK ship it as the default agent type, and n8n's AI agent node is a ReAct loop with a visual tool list.

What you control is the stop condition. A ReAct agent ends when the model emits a final answer, when a step cap is reached, or when a supervisor rule fires. Never ship one without a cap - the classic runaway is a model that keeps searching because each result is almost but not quite what it wanted, and each iteration re-sends the entire growing transcript.

Cost, latency and reliability

ReAct is the expensive shape. Because every step re-reads the full transcript of previous thoughts, actions and observations, cost grows faster than linearly with the number of steps, and so does latency: a six-step run is six sequential model calls, each slower than the last as the context fills. For anything customer-facing in real time, that matters - see latency budget.

Reliability degrades with depth for the same reason. Long transcripts dilute the instructions at the top, and errors early in the chain get treated as established fact later. Practical mitigations are a step cap, summarising older observations rather than carrying them verbatim, and validating each observation before it enters the transcript.

What you should know

ReAct is a default, not a requirement. If your task has a known shape - gather three facts, then decide - a planner-executor split or a plain agentic workflow will be cheaper, faster and easier to test. Reach for ReAct when the number of steps genuinely cannot be known in advance.

When you do use it, instrument it. Every thought, action and observation should be logged so you can reconstruct a bad run - that is the observability minimum, and without it a ReAct agent is a black box that occasionally emails a customer something strange.

ReAct FAQ

What does ReAct stand for?

Reason and act. It refers to interleaving chain-of-thought reasoning with tool actions so that each observation from the world feeds the next round of reasoning. It has nothing to do with the React JavaScript library, which is a frequent source of confusion when searching.

Do I need to write ReAct prompts myself?

No. Native tool calling implements the same loop, and every mainstream agent framework ships it as the default. Hand-written ReAct prompts are now mostly of historical interest, though understanding the pattern explains exactly why your agent's cost and latency grow the way they do.

Why does my ReAct agent get slower every step?

Because each step re-sends the whole transcript of previous thoughts, actions and observations. Step six is processing far more input than step one, so it is both slower and more expensive. Summarising or truncating older observations, and capping steps, are the standard fixes.

How many steps should I allow?

Start low - five to eight is enough for most business tasks - and raise it only when logs show genuine runs hitting the ceiling. An uncapped loop is the single most common way to turn a cheap agent into a surprise invoice, and it is also how a stuck agent hammers a third-party API into a rate limit.

Is ReAct better than a planner-executor agent?

Neither is better in general. ReAct adapts step by step, which suits open-ended investigation. Planner-executor commits to a plan up front, which is cheaper and easier to audit when the shape of the task is known. Plenty of production systems plan first and then run a short ReAct loop inside each step.

Why does my ReAct agent repeat the same tool call?

Usually because the tool returned something the model does not consider an answer - an empty result, a vague error, or a format it cannot read - so it tries again with a small variation. Return specific, readable errors, make empty results explicit, and cap repeats of the same tool with the same arguments.

Primary source

ReAct: Synergizing Reasoning and Acting in Language Models (arXiv)

Checked August 2026. Anything priced or rate-limited moves, so verify against the source before you budget.

Want this built rather than explained?

Knowing what react means is one thing; having it running in your business is another. We scope one workflow at a time, quote a fixed price in writing after a free consult, build it, and hand it over with documentation you own.