title: "Orchestration Patterns" last_updated: 2026-03-21 status: experimental difficulty: advanced prerequisites: [08-agent-teams, 09-headless-and-ci-cd]
Orchestration Patterns
Coming in V3. This module is scaffolded with an outline.
Core Question
What are the architecture options for coordinating multiple agents?
Module Outline
Concepts
-
The orchestration spectrum — From simple sequential tasks to complex multi-agent systems. Most developers need the simpler end; know when to reach for the complex end.
-
Pattern catalog:
- Pipeline: Agent A → Agent B → Agent C (sequential, each transforms output)
- Fan-Out/Fan-In: Parent dispatches N agents, collects results, synthesizes
- Hierarchy: Lead agent delegates to specialist sub-agents
- Swarm: Multiple autonomous agents with shared goals, minimal coordination
- Event-Driven: Agents triggered by external events (webhooks, file changes, schedules)
-
Choosing the right pattern — Decision framework based on: task independence, coordination needs, error tolerance, cost budget.
-
Orchestration infrastructure — Scripts, SDKs, and frameworks for building agent orchestration beyond the CLI.
-
State management — How to maintain shared state across agents: files, databases, structured artifacts.
-
Error handling at scale — When one agent in a 10-agent pipeline fails: retry, skip, rollback, escalate.
-
Cost optimization — Strategies for reducing token usage in multi-agent systems without sacrificing quality.
Tool-Specific Content
- Claude Code: Claude Agent SDK, custom orchestration scripts, headless pipelines
- Codex CLI: OpenAI Agents SDK, multi-instance patterns
Exercises
- Implement each pattern from the catalog on a real project task
- Build an orchestration script that coordinates 3+ agents
- Add error handling and recovery to a multi-agent workflow
- Benchmark: compare patterns on the same complex task