Animation10 min

Orchestrator-Workers

A lead model decomposes dynamically and delegates.

Orchestrator-workers looks like parallelization with one profound difference: the subtasks aren't predefined. A central orchestrator LLM examines each task at runtime and decides what subtasks it needs, spawning workers dynamically — the graph draws itself.

The animation makes the dynamic count the point. A simple task arrives: the orchestrator studies it and spawns two workers. A complex task arrives: five workers materialize, each with its own instruction bubble — its specific objective, written by the orchestrator for this particular input. Contrast this with the fixed fan-out of the previous lesson, where the lanes existed before the input did.

Workers run in parallel and stream results back; the orchestrator synthesizes them into one answer. This is the shape for tasks where you can't predict the decomposition: which files a code change touches depends on the bug; which searches a question needs depends on the question. It's also the backbone of Anthropic's production research system, where a lead agent spawns 3-5 parallel subagents.

Watch the moment the orchestrator pauses before spawning — that planning step is an LLM call making a structural decision. Delegation quality lives there: vague worker instructions cause duplicated or missing work, which is why detailed task descriptions are the pattern's make-or-break skill.