Skip to content
Agent Builder
Module 6Full course10 min read

The Orchestrator–Worker Pattern

Build a lead agent that breaks work into subtasks, dispatches workers, and synthesizes results — the most useful multi-agent pattern.

If you build only one multi-agent pattern, make it this one. An orchestrator (also called the lead) receives a goal, breaks it into independent subtasks, hands each to a worker agent, and then combines the workers' reports into one answer. It's the architecture Anthropic has described for Claude's Research feature, and it's the shape behind most multi-agent systems that hold up in practice.

In this lesson you'll build a working orchestrator in TypeScript on top of the agent you wrote in the previous module. The lead plans with structured output so its plan is always valid data, workers run in parallel with narrow tools and a cheaper model, and the lead synthesizes their reports while flagging gaps and disagreements. You'll also learn the levers that separate a toy orchestrator from a useful one.

The anatomy of an orchestrator–worker system

Every orchestrator–worker system runs in three phases:

              goal
               │
        ┌──────▼──────┐
        │  1. PLAN    │  lead model: goal -> list of self-contained briefs
        └──────┬──────┘
     ┌─────────┼─────────┐
┌────▼───┐ ┌───▼────┐ ┌──▼─────┐
│worker A│ │worker B│ │worker C│   2. DISPATCH: independent agent loops, in parallel
└────┬───┘ └───┬────┘ └──┬─────┘
     └─────────┼─────────┘
        ┌──────▼──────┐
        │3. SYNTHESIZE│  lead model: reports -> one answer, gaps flagged
        └──────┬──────┘
             answer

The split of responsibilities is the whole point. The lead does the work that needs the full picture: understanding the goal, deciding how to divide it, judging and combining results. The workers do the work that needs focus: reading pages, running tools, getting one piece right. Workers never see each other, and that's a feature. Each starts with a clean context containing only its brief.