Why architecture matters here

Multi-agent orchestration matters because context is finite and expertise is specialized. A coding agent that also does research spends too much context on citations; a researcher that also writes tests dilutes both skills. Splitting concerns lets each agent stay focused; the orchestrator glues results together.

Cost drives the trade-offs. A five-agent workflow might use a small cheap model for four of them and a large expensive model only where deep reasoning is needed. Total cost drops even as quality rises. The pattern only holds if you actually route by capability rather than sending everything to the biggest model.

Reliability is where multi-agent shines when it is bounded and disciplined. Budgets, deadlines, and step limits prevent runaway loops. Explicit hand-offs and typed messages make failures traceable. Without these, multi-agent becomes an unbounded LLM roulette.

Advertisement

The architecture: every piece explained

Walk the diagram from top to bottom.

User Task. A high-level goal with constraints: "build a report on Q3 sales trends in under $5 of LLM cost, using our internal data, in under 5 minutes."

Supervisor Agent. The orchestrator. Takes the goal, decomposes into subtasks, decides which worker handles each, tracks progress. It is the only agent with the full plan in context; workers see only their piece.

Task Graph. A DAG of subtasks with dependencies. Some nodes can run in parallel; others must wait. The supervisor updates the graph as work completes and re-plans on failure.

Worker Agents. Specialized. Each has a narrow system prompt, a limited tool set, and a specific domain: coder, researcher, data analyst, critic, formatter. The narrowness is the point.

Shared Memory / Blackboard. Where agents post results, facts, artifacts. Every agent can read; only owners write. The blackboard is the coordination substrate — instead of agents talking directly, they post to shared memory.

Coder Agent. One example. Given a task, produces code. Uses the code-execution tool. Reads specs from shared memory; writes generated code + test results back.

Researcher Agent. Given a question, uses search + RAG to produce cited facts. Writes structured findings to shared memory.

Critic Agent. Reads the assembled draft, checks for errors or gaps, sends feedback back to the appropriate worker or the supervisor.

Message Bus. The transport for typed events: task_started, task_completed, artifact_created, error_occurred. Event-driven message routing keeps the orchestrator loosely coupled to specific agents.

Budget + Deadline. Global caps: max total tokens, max wall-clock time, max steps. When exceeded, the orchestrator either returns the best-effort result or aborts. Without these, multi-agent runs unbounded.

Observability + rollback + HITL. Every agent action is traced. Rollback is possible for reversible actions. High-impact steps (external emails, payments, permanent changes) require human approval.

User Taskgoal + constraintsSupervisor Agentdecomposes + delegatesTask GraphDAG of subtasksWorker Agentsspecialized: coder, researcher, checkerShared Memory / Blackboardartifacts, facts, decisionsCoder Agentwrites codeResearcher Agentgathers factsCritic Agentchecks + refinesMessage Bustyped events between agentsBudget + Deadlinesteps, tokens, wallclockObservability + rollback + human-in-the-loop for high-impact steps
Multi-agent orchestration: supervisor decomposes tasks, worker agents specialize, shared memory holds artifacts, message bus routes events, budget bounds runaway loops.
Advertisement

End-to-end workflow

Trace a workflow. User asks for a Q3 sales trends report.

Supervisor decomposes: (1) gather Q3 sales data, (2) run comparative analysis vs Q2 and prior year Q3, (3) identify top three trends, (4) draft narrative, (5) critique + refine, (6) format as report.

Steps 1-3 run in parallel where dependencies allow. The researcher agent queries the internal data warehouse (tool), retrieves Q3 numbers, posts to shared memory. The data analyst reads and computes deltas, posts analysis to shared memory. Both use a small fast model — cost per call is pennies.

Step 4: a writer agent reads the analysis, drafts narrative sections. Uses a mid-tier model for quality prose. Posts draft to shared memory.

Step 5: the critic reads the draft, identifies weak claims, sends specific asks back ("cite this claim", "check this number"). Writer refines with targeted retrieval. Two iteration rounds; budget kicks in if more.

Step 6: formatter turns the refined text into a PDF or HTML report. Supervisor delivers to the user.

Total: 20 LLM calls, spread across three different model tiers, $2.30 in cost, 90 seconds wall clock. A single big-model agent would have taken longer and cost more.