Skip to content

3.6 — Agent Patterns

An agent is a system with tools and decision-making ability. But how it makes decisions and sequences actions varies. These four patterns cover the most common architectures you’ll design with.

PatternHow It WorksWhen To Use It
ReAct (Reason + Act)Agent thinks about what to do, does it, observes the result, thinks again. Loops until done.Most common pattern. Claude Code works this way. Good for open-ended tasks where the path isn’t known in advance.
Tool chainAgent follows a predefined sequence of tool calls. Step 1 → Step 2 → Step 3.When the workflow is predictable and well-defined. Consistent, fast, easy to audit.
Human-in-the-loopAgent works autonomously but pauses at critical decision points for human approval before continuing.When mistakes are costly. Financial transactions, production deployments, communications sent to real people.
SupervisorOne agent oversees others, delegating tasks and synthesizing results.When a task needs multiple specialized capabilities that don’t belong in one agent.

ReAct is the default. It’s how most AI coding agents work — think, act, observe, repeat. The loop continues until the agent decides the task is done or hits a limit. Claude Code uses this pattern when you give it an open-ended goal.

Tool chain trades flexibility for predictability. You define the sequence up front. The agent executes it. Less creative, more reliable. Good for pipelines where every run should look the same: fetch data → process → format → send.

Human-in-the-loop is not a failure of automation — it’s a design decision. Some actions are too consequential to delegate fully. A well-designed human-in-the-loop system does 90% of the work autonomously and surfaces only the decisions that genuinely require human judgment. The goal is to protect against costly mistakes, not to slow down everything.

Supervisor is the first step toward the multi-agent architectures covered in Phase 4. One agent manages others. It breaks down a complex goal, assigns sub-tasks, collects results, and synthesizes a final output. You see this pattern when a task needs breadth — research + code + writing, each handled by a specialist.

Ask these questions:

  1. Is the path known? Yes → tool chain. No → ReAct.
  2. Are mistakes catastrophic? Yes → add human-in-the-loop checkpoints.
  3. Does the task need multiple specializations? Yes → supervisor with workers.

Most real systems combine patterns. A supervisor agent might manage ReAct worker agents, with human-in-the-loop gates before any output goes to production.


Next: 3.7 — Vocabulary | Phase overview: Phase 3