← Glossary AI

ReAct (Reason + Act)

A loop where an agent alternates between thinking out loud and taking an action, over and over until the task is done.

Explained simply.

ReAct stands for 'Reasoning and Acting.' It's a pattern for building agents: the model writes a THOUGHT (what it wants to do next and why), then an ACTION (the tool call it picks), then gets back an OBSERVATION (the tool result), then thinks again. This cycle continues until the goal is met. The interleaving of reasoning with acting makes the agent much more reliable than having it decide all steps upfront.

An example.

Task: 'Find 3 competitors of Acme and summarize their pricing.' Thought: I should search for Acme's industry first. Action: web_search('Acme company industry') Observation: 'Acme sells project management software' Thought: Now I'll search for competitors. Action: web_search('project management software competitors') ... and so on until 3 competitors are found and analyzed.

Why it matters.

ReAct is the most common pattern under the hood of agentic systems. Claude's agent harness, LangChain's AgentExecutor, and most open-source agents implement some flavor of ReAct. Knowing the pattern helps you debug when your agent misbehaves - usually it's because the thought→action linkage broke somewhere.