Skip to main content
AI Agents & Automation

⏱ About 20 min20 XP

Orchestrate a Team

Every concept this module has introduced — the supervisor-worker pattern, handoffs, communication protocols, parallel execution, shared state coordination, emergent risk mitigation, and framework selection — is a tool in your architectural toolkit. The test of a toolkit is what you build with it. In this lesson, you will put the tools together and design a complete multi-agent orchestration system for a complex, realistic task from start to finish. Design work at this stage is not a warm-up to real work: it IS real work. The decisions you make on paper before writing code are the decisions that determine whether a system succeeds or fails in production.

What a Complete Orchestration Design Covers

A complete orchestration design answers seven questions. First, goal decomposition: what are the subtasks, and what are the dependencies between them? Second, agent specification: what is each agent's role, its inputs, its tools, and its output format? Third, execution topology: which agents run in parallel, which run sequentially, and what is the critical path? Fourth, communication protocol: what does each inter-agent message look like, and how are errors signaled? Fifth, shared state: what state must be shared, and what coordination mechanism protects it? Sixth, emergent risk inventory: what feedback loops, error cascades, or goal misalignments could emerge, and how are they mitigated? Seventh, framework choice: which orchestration framework fits this design, and what will you need to build on top of it? A design that can answer all seven questions concisely and correctly is a design that is ready to be implemented. A design that cannot answer them is not ready — and skipping to implementation will simply surface the unanswered questions as production bugs.

Design Is Executable Thinking

The purpose of the design phase is not to produce a document. It is to force every architectural decision to be made consciously, before the cost of changing it is high. A design that forces you to discover a fatal flaw in the coordination architecture saves hours of debugging. Treat every question above as a test you must pass before writing code.

Worked Example: Automated Investigative Journalism Assistant

To ground the design process, consider a partial worked example. The goal: given a public figure's name, produce a thoroughly researched, fact-checked, and properly sourced investigative article draft. Goal decomposition yields subtasks: (A) gather biographical and career history from public records; (B) search recent news coverage for significant events; (C) retrieve public financial disclosures and any relevant legal records; (D) for each factual claim in A, B, C, identify a primary source URL; (E) cross-check claims for internal consistency and flag contradictions; (F) draft the article with citations; (G) review the draft for potential defamation risks. Dependency analysis: A, B, C can run in parallel (no dependencies). D depends on A, B, C all completing. E depends on D. F depends on E. G depends on F. The critical path is A/B/C (parallel) -> D -> E -> F -> G — five sequential stages after the initial parallel gather. Agent specifications for each stage include: the specific tools needed (web search, legal database API, citation resolver, language model for drafting), the exact input format, and the output schema. Each handoff carries only what the receiving agent needs — not the raw data from every prior stage, but a curated, structured summary. Risk inventory: error cascade (if stage D fabricates a citation, stages E, F, G build on false foundations — mitigated by citation-validation step); defamation risk from stage F output (mitigated by mandatory stage G review before any output leaves the system); information overload in stage F (mitigated by stage E producing a clean, deduplicated, conflict-resolved brief rather than passing raw data from A, B, C).

Risk Inventory Before Implementation

For every multi-agent system you design, write the risk inventory before you write any code. List every plausible failure mode. Mark each as mitigated or accepted (with justification). A system with an explicit, reasoned risk inventory is dramatically safer than one where risks were discovered in production.

Full System Design: Your Choice of Domain

  1. This is the core activity of the lesson. Choose one of the following complex tasks, or propose your own with instructor approval. Design a complete multi-agent orchestration system for your chosen task. Your design must address all seven architectural questions listed at the start of the lesson.
  2. Option A — Automated Academic Scholarship Finder: Given a student's academic profile, find, evaluate, and rank relevant scholarships, then draft personalized application essays for the top 5.
  3. Option B — Competitive Intelligence Platform: Given a product and its market, continuously monitor competitor announcements, pricing changes, and customer reviews; synthesize weekly intelligence briefings.
  4. Option C — AI-Assisted Clinical Trial Screening: Given a new clinical trial protocol, identify eligible patients from an anonymized database, check each candidate's current medications for contraindications, and prepare the outreach list for the coordinator.
  5. Option D — Open domain of your choice: propose a complex multi-step task that genuinely requires multiple specialist agents.
  6. Your deliverable is a structured design document with these seven sections:
  7. 1. Goal Decomposition: List every subtask. Identify the dependencies. State which subtasks are truly independent.
  8. 2. Execution DAG: Draw (or describe precisely) the dependency graph. Identify the critical path and the minimum number of sequential steps.
  9. 3. Agent Specifications: For each agent, define its role name, its inputs (with types), its required tools, and its output schema. Be specific — vague specs produce vague agents.
  10. 4. Communication Protocol: Define the message types your system uses. Show the full JSON structure of at least two message types — one task request and one task result.
  11. 5. Shared State Design: Identify any shared state. Specify the coordination mechanism for each piece of shared state. Justify your choice.
  12. 6. Risk Inventory: List at least four plausible emergent failure modes. For each: describe the mechanism, assess the severity (low / medium / high / critical), and specify the mitigation.
  13. 7. Framework Recommendation: Which orchestration framework would you use? Map at least two of your design's requirements to specific framework features. Name one thing you would need to build yourself.
  14. Present your design to the class. Be prepared to defend your parallelism decisions, your coordination choices, and your risk mitigations under peer questioning.

During the design of a multi-agent system, a student lists subtasks A, B, C, D, and E. They find that A and B can run in parallel. C depends on A. D depends on B. E depends on both C and D. What is the critical path and the minimum number of sequential steps required?

A student's design uses a single shared 'progress tracker' object that all 12 agents in the system read and write. No coordination mechanism is specified. What is the most immediate architectural problem with this design?