Definition
ReAct Pattern, short for Reasoning and Acting, is a prompting paradigm introduced in the 2022 paper ReAct: Synergizing Reasoning and Acting in Language Models by Yao and colleagues. It instructs a language model to generate verbal reasoning traces and concrete actions in an interleaved sequence: the model articulates a thought, takes an action such as querying a tool or external API, observes the result, then reasons again with that fresh evidence in hand. The loop repeats until the model decides it has enough to answer. This simple thought-action-observation cycle lets a model build, maintain, and adjust a plan while incorporating real information from its environment instead of guessing from memory.
Why it mattered
Before ReAct, prompting techniques tended to separate pure reasoning (chain-of-thought) from acting (tool invocation). Chain-of-thought alone reasons fluently but can hallucinate facts with total confidence, because nothing checks the reasoning against reality; action-only agents touch reality but plan poorly. By fusing the two, ReAct lets a model verify intermediate claims against real data mid-task, which reduces certain hallucinations and supports multi-step work like question answering with a search tool. The original paper evaluated the approach on benchmarks including HotPotQA, FEVER, ALFWorld, and WebShop, and the pattern became a foundational building block for the autonomous-agent systems that followed.
In modern frameworks
The ReAct loop underpins the agent designs in most orchestration frameworks builders use today, even when the marketing never says the word. When an agent emits a visible sequence of thought, tool call, tool result, next thought — that is ReAct's skeleton. Understanding it explains practical behaviors: why tool access is so central to agent reliability, why an agent's quality depends heavily on how tool results are formatted back into its context window, and why runaway loops need step limits. It is a conceptual pattern rather than a product, so it carries no license or vendor and can be implemented in any stack, including a fully local one.
Running it sovereignly
ReAct is especially relevant to self-hosters because it is model-agnostic and cheap to implement: a loop, a prompt template, and some tool definitions. A local model served through Ollama or llama.cpp can drive a ReAct agent over your own tools — a file search, a node query, a home-automation call — with no data leaving your machine. Two cautions apply. Smaller local models follow the pattern less reliably and benefit from strict output formats and few-shot examples of correct loops. And any agent that acts on external content inherits the risks of prompt injection: text a tool retrieves can try to steer the loop, so tool outputs deserve the same suspicion as any untrusted input.
Anatomy of one loop
A concrete trace makes the pattern obvious. Asked "what firmware is this miner running?", a ReAct agent might produce: Thought: I need the device's API response before answering. Action: query the miner's status endpoint. Observation: JSON showing model and firmware version. Thought: I now have the version string; answer directly. Final answer. Two properties of that trace do the real work. The reasoning is externalized, so a human (or a supervising program) can audit why each action was taken rather than guessing. And the answer is grounded in an observation rather than the model's training memory, so a stale or hallucinated "fact" gets overwritten by reality mid-task. When an agent misbehaves, the trace is also the debugging artifact: you can usually point to the exact thought where the plan went sideways.
For frameworks that operationalize this pattern, see D-Central's neutral entries on LangGraph and AutoGen, and the inference entry for what each loop iteration actually costs.
In Simple Terms
ReAct Pattern, short for Reasoning and Acting, is a prompting paradigm introduced in the 2022 paper ReAct: Synergizing Reasoning and Acting in Language Models by…
