Skip to content
Course · Agent Design Patterns

Build with judgment

Patterns are cheap to name and expensive to misuse. This course teaches when to reach for which — not a zoo of diagrams for their own sake.

For developers and product people who have used an AI chat or called a language-model API. 15 short lessons (about 31 minutes of reading in total), three quizzes, a capstone and a cheat sheet. Each lesson has an optional practice build.

// Before you start

Key terms in plain words

The lessons use these words a lot. Skim them once before you start.

Language model (LLM)
The AI model that reads text and writes text. In this course it is the part that decides what to do next.Source: Anthropic: Building effective agents
AI agent
A program where a language model decides its own next steps and which tools to use, instead of following a fixed script.Source: Anthropic: Building effective agents
Tool (function calling)
A function your code offers the model, such as search, look up an order, or send an email. The model asks for a tool call; your code runs it and hands back the result.Source: OpenAI: Function calling
Schema
A description of a tool’s inputs: their names and types (for example, “city” must be text). Your code can reject a call that does not match.Source: MCP spec: Tools (inputSchema)
MCP (Model Context Protocol)
An open standard for connecting tools and data to AI apps. An MCP server lists tools that a model can call.Source: MCP spec: Tools
Stub
A fake version of a tool that returns a canned answer. Every practice build in this course uses stubs, so you can try a pattern without API keys or real side effects.Source: Martin Fowler: Mocks Aren’t Stubs
Rubric
A short checklist of what “good” means, used to score a draft. For example, the Reflection lesson’s rubric: clarity, no blame, one clear ask, under 120 words.
Multi-agent
Several agents, each with its own role and its own context, working on one task. It can help with large tasks but costs more: Anthropic reports its multi-agent research system used about 15× the tokens of a chat.Source: Anthropic: How we built our multi-agent research system
Feedback loop
A step that checks the work and can send it back for another try: a critic, a retry, or a person reviewing it.Source: Anthropic: Building effective agents (evaluator-optimizer)
HITL (human-in-the-loop)
The agent pauses and waits for a person to approve, edit, or reject before a risky step, such as moving money or emailing a customer.Source: LangGraph: Interrupts

// The one decision framework

Single-agent, multi-agent or feedback loop?

Asks 1 and 2 pick the shape: single-agent or multi-agent. Ask 3 applies to either shape: add a feedback loop when quality depends on critique, retries or a human gate. The capstone combines three patterns.

  1. Ask 1 · Foundations

    Can one agent keep track of the goal and all its tools without getting confused?

    Stay single-agent. Start with Tool Use, ReAct, Plan-and-Execute or Reflection.

  2. Ask 2 · Orchestration

    Do you need separate skills or separate background information that get in each other’s way in one prompt?

    Go multi-agent. Orchestrator-Subagent, Supervisor, pipelines, fan-out, MapReduce or Debate. Expect it to cost more to run than a single agent.

  3. Ask 3 · Feedback loops

    Does quality depend on a critic, retries, or a person signing off (human-in-the-loop, HITL)?

    Add a feedback loop. Evaluator-Optimizer, Critic-Actor, Self-Healing or HITL.

// Journey map

Fifteen patterns. Three tiers. One decision.

Click a pattern name to open its lesson. Mark “Got it” when it clicks; marks last while you move between these pages.

  1. Tier 1FoundationsSingle-agent loops that reason, act and check themselves0 of 4 marked “Got it”
  2. Tier 2OrchestrationMulti-agent shapes that divide work without losing the plot0 of 7 marked “Got it”
  3. Tier 3Feedback loopsFeedback loops that keep agents honest under real load0 of 4 marked “Got it”

// Tier 1 · Foundations

Foundations

Reach for this tier when: One agent can keep track of the goal and its tools without getting confused.

  • Tool Use / Function Calling

    When the model must call structured tools instead of inventing facts.

    ~2 min read

  • ReAct

    When the next step depends on what the last tool returned.

    ~2 min read

  • Plan-and-Execute

    When you can sketch the whole plan before touching tools.

    ~2 min read

  • Reflection / Self-Critique

    When a first draft is cheap and a second pass catches real mistakes.

    ~2 min read

// Tier 2 · Orchestration

Orchestration

Reach for this tier when: No single agent can hold all the skills or background information the job needs.

  • Orchestrator-Subagent

    When one agent can’t hold all the skills or background information it needs without getting muddled.

    ~2 min read

  • Supervisor

    When workers need a referee that picks who goes next and can reject their output.

    ~2 min read

  • Hierarchical Agents

    When goals nest: strategy → tactics → tools, with clear ownership per layer.

    ~2 min read

  • Sequential Pipeline

    When stages are fixed and each step’s output is the next step’s only input.

    ~2 min read

  • Parallel Fan-Out / Fan-In

    When independent sub-tasks can run at once and merge into one answer.

    ~2 min read

  • MapReduce

    When you split a large set of documents into chunks, run the same job on each, then combine the results.

    ~2 min read

  • Debate / Adversarial

    When two opposing arguments surface risks a single pass would miss.

    ~2 min read

// Tier 3 · Feedback loops

Feedback loops

Reach for this tier when: Quality depends on a critic, retries, or a person signing off.

  • Evaluator-Optimizer

    When a scorer can reject work until an optimizer improves it.

    ~2 min read

  • Critic-Actor

    When a dedicated critic reviews every actor draft before it ships.

    ~3 min read

  • Self-Healing / Retry Loop

    When failures are expected and a bounded retry with diagnosis beats giving up.

    ~2 min read

  • HITL (Human-in-the-loop)

    When irreversible or high-stakes actions need a human gate.

    ~2 min read

Open a lesson, then mark “Got it” to fill the map.

Progress stays while you move around these pages. Nothing is saved.

// Every step

All lessons and quizzes

All fifteen lessons are open. The capstone combines three patterns. Start anywhere on the map, or begin with Tool Use / Function Calling.

How this course works

Each lesson is a short read plus a small practice build. The builds use stubs: stand-in tools that return canned answers, so you can practise a pattern without API keys or real side effects. Your “Got it” marks last while you move between these pages; nothing is sent anywhere.