C1 · Agent loop (ReAct)

Family: Single agent

The model alternates reasoning, tool call and observation until a stop condition is met.

Principle

The model thinks, picks an action (a tool call), observes the result, then starts again. The loop stops when it judges the job done or a cap is reached. The model, not the code, decides the path.

The problem it solves

Some problems are open-ended: you cannot predict how many steps will be needed, or which ones.

When to use it

  • The problem is open-ended and the number of steps impossible to predict: coding agent, document research.
  • A workflow is not enough and you want a sensible default before any multi-agent design: Microsoft and Databricks recommend it as a starting point.

When to avoid it

  • The path is known in advance: a workflow (B1, B6) is cheaper, faster and more predictable.
  • Irreversible actions are possible with neither a verification oracle nor human approval: cap the loop and put a human on those actions (F1).

Common pitfalls

The anti-patterns that misuse this pattern, best established first. Each sheet describes the symptoms, the public incidents and the remedies.

Framing and choice of level

Tools and agent-computer interface

Instructions

Context and memory

Loop, stopping and orchestration

Security and permissions

Oversight, operations and governance

  • AP80 · Cost blind spots — Spend is tracked per call or per main agent; sub-agents, retries and failures slip under the radar.

All anti-patterns

Synonyms by vendor

  • Agents (Anthropic (2024))
  • Single-agent system (OpenAI, Google Cloud, Databricks)
  • ReAct (Yao et al. (ICLR 2023), Google Cloud)
  • Multi-step agent (Hugging Face)
  • Single agent with tools (Microsoft)

Neighbouring patterns

Sources

Content reviewed on 2026-10-02

Pattern catalogue