Most of the agents running in production today are, at their core, a loop that was described in a 2022 paper: ReAct, short for "Reasoning and Acting," by Yao et al. The idea is simple enough to explain in a sentence, but it changed how people build with language models.
Reasoning and acting, interleaved
Before ReAct, you generally used a model in one of two modes. You could ask it to reason step by step ("chain of thought"), which improved answers but left the model reasoning about a world it couldn't observe or change. Or you could let it call a tool, but without space to think about what the tool returned.
ReAct interleaves the two. The model produces a thought, takes an action (a tool call), observes the result, and then thinks again — repeating until it reaches an answer. That observe-then-think step is the whole trick: the model gets to update its plan based on real feedback from the world instead of guessing in one shot.
The loop, concretely
A single ReAct step looks like this:
- Thought — the model reasons about what it needs next.
- Action — it calls a tool (search, database query, API) with specific arguments.
- Observation — the tool's result is fed back into the context.
- Repeat — the model reads the observation and decides whether to act again or answer.
Why it worked so well
Two things. First, grounding: because the model acts and then reads real results, it hallucinates less — it's reacting to facts instead of inventing them. Second, recoverability: when a tool call fails or returns something unexpected, the next thought can course-correct. A one-shot plan can't recover from a bad assumption; a ReAct loop can.
What modern agents changed
The pattern is still the backbone, but production systems layer things on top. Native tool-calling APIs made the "action" step reliable and structured instead of parsed out of free text. Reflection steps let an agent critique its own trajectory. And guardrails cap how many loops it can run and what actions it's allowed to take, so a confused agent fails safely instead of spinning forever.
The takeaway
If you understand the think-act-observe loop, you understand the majority of agent frameworks on the market — they're mostly ergonomics and safety wrapped around this core idea. When an agent misbehaves, the fastest way to debug it is to read the ReAct trace step by step and find the thought where the reasoning went wrong.