Multi-Agent Orchestration: Planning, Execution, Review, and Production Communication
A practical guide for teams moving from a validated single agent to production multi-agent systems. It covers when multi-agent work is worth the cost, how to route tasks, how to turn goals into an executable DAG, and how Planner, Executor, Critic, and an orchestrator use structured state and auditable messages to keep quality, recovery, and cost under control.
Multi-Agent Orchestration: Planning, Execution, Review, and Production Communication
Multi-agent systems are not simply “running several agents.” Once they enter production, teams usually hit three problems first: which tasks deserve a multi-agent setup, how to split work into executable units, and how agents pass results that can be audited. Solving those three problems is what makes a Planner–Executor–Critic architecture useful. Otherwise it only amplifies a single agent’s context bloat, goal drift, and failed self-checks at a higher call cost.
This article is for engineering teams that have already validated a single agent and are preparing to move into a production system. It discusses a multi-agent orchestration approach that can actually be operated. The core idea is straightforward: use routing to control the boundary of use, stabilize execution with structured task decomposition and a state graph, then close the quality loop with an independent Critic and a traceable communication protocol.
1. Set the boundary: what multi-agent systems solve, and what they do not
The first principle is not “more capability is always better.” It is “use multi-agent systems only for tasks a single agent cannot complete reliably.”
In sample practice across enterprise knowledge-base Q&A and multi-source data verification, multi-agent call cost is often two to three times that of a single agent, while usability on complex tasks may rise from roughly 30 percent to above 60 percent. That tradeoff can make sense for complex business tasks, because the rework, manual review, and business risk of one wrong conclusion often exceed the extra model cost. These figures are experience from specific scenarios, not a general promise.
What does not pay off is sending simple tasks into multi-agent orchestration. Format conversion, single-document summarization, fixed-field extraction, and single-turn query rewriting can usually be done reliably with a prompt chain or one agent. Forcing them through a Planner, several Executors, and a Critic raises cost and latency with little gain in correctness.
The first production step is therefore a routing layer, not more prompt tuning. The router judges task complexity, risk, whether multiple sources of evidence are required, whether asynchronous execution is allowed, and whether human review is required. It then chooses a prompt chain, a single-agent reason–act loop, or multi-agent orchestration. After routing is in place, overall cost can usually be held in a more controllable range, and the effect appears faster than optimizing prompts at a single point.
A usable decision table:
| Task characteristics | Suggested pattern | Why |
|---|---|---|
| Fixed steps, 1–3 steps, clear output format | Prompt chain | Lowest cost; linear, controllable context |
| Several tool calls; path not fully fixed | Single-agent reason–act loop | Simple to implement; fits medium complexity |
| Multi-source verification and cross-checking | Planner–Executor–Critic | Decomposable and independently reviewable |
| High-risk decisions with high factual requirements | Multi-agent plus deterministic checks and human fallback | Needs an evidence chain and audit |
| Low value, high frequency, strict latency | Single agent, or rules/templates first | Multi-agent return is insufficient |
2. Where a single agent actually fails
In online knowledge Q&A and multi-source verification, single-agent failures usually fall into three groups.
2.1 Context bloat drowns the instructions
A reason–act loop typically pushes every tool result back into the message history. After about ten steps, the context may be packed with intermediate artifacts: structured data, log fragments, query results, page summaries, and table excerpts. A longer window does not fix this. The root cause is not total length; it is diluted attention. The constraints that matter—output format and prohibitions—get buried in low-information content, and the model misses them.
In one sample set, the same model chose tools accurately early in a task, then accuracy dropped clearly after a dozen steps and it began to forget the original system constraints. A production system cannot rely only on a larger context window. Intermediate results should be taken out of the dialogue and stored as structured state and artifact references.
2.2 Goal drift without explicit subgoal anchors
A single agent often holds only one ever-longer trajectory. When a tool returns an unexpected result, it tends to keep reasoning from that local result and drift. A typical case: the user asks for a comparison of contract breach clauses for parties A and B. While reading party A’s clauses, the agent sinks into detail and finally explains only A, omitting B entirely.
The fix is not asking the model to “be more careful.” The task needs explicit anchors: the current subgoal, dependencies, deliverable, acceptance criteria, and the evidence scope that is allowed. The Planner turns the overall goal into a task graph with acceptance conditions. An Executor is responsible only for the current node. The Orchestrator checks the task graph for complete coverage.
2.3 Self-correction mostly fails
Asking the same model to “check its own answer” often produces a reworded restatement. The reason is simple: checking and generation share the same context and the same preference weights, so the model has a confirmation bias toward its own output. In sample practice, a single agent’s self-check miss rate can be high. An independent Critic—different prompt, different context view, different acceptance criteria—can lower that miss rate substantially.
A Critic should not be an extra sentence that says “please review.” It must be a separate role that receives a structured task contract, evidence references, and acceptance rules, returns a parseable review, and can trigger replanning or additional evidence.
3. Choosing a pattern: prompt chain, single agent, or multi-agent collaboration
A prompt chain fits fixed steps where the DAG is known in advance, usually one to three steps. Context grows linearly and stays controllable, and goal consistency is relatively strong because each step’s prompt can be written explicitly. The weakness is limited flexibility when branches, tool failures, or evidence gaps appear.
A single-agent reason–act loop fits medium-complexity tasks whose path is not fully fixed and that need several tool calls. Implementation cost is low, but it needs a step cap, a budget cap, a structured stop condition, and deterministic checks. Without those, it drifts into long trajectories.
Multi-agent collaboration fits tasks that can be decomposed and need cross-checking. Typical signs: several information sources must be reconciled, the work splits into independent subgoals, generation and review should be separated, an evidence chain must be audited, or the cost of failure is high. It is a poor fit for low-value, high-frequency work, and for tasks that cannot really be split but are split anyway.
A mature system is usually not a three-way choice. After routing, it is layered: simple tasks use a prompt chain, medium tasks use one agent, and complex tasks enter Planner–Executor–Critic. Inside the multi-agent path, some nodes can be downgraded to deterministic functions or smaller models to reduce cost.
4. Target architecture: Planner–Executor–Critic plus an Orchestrator
Split the system into these roles and components:
- Router: the entry point. It judges complexity, risk, latency needs, and whether multi-agent execution is allowed.
- Planner: turns the user goal into a structured task graph with subtasks, dependencies, inputs, outputs, acceptance criteria, and budget.
- Executor pool: runs concrete nodes. Capabilities may include retrieval, querying, extraction, calculation, writing, and code execution.
- Critic: independently reviews node results, evidence sufficiency, coverage, format, and instruction consistency.
- Orchestrator: schedules nodes on the state graph and handles dependencies, concurrency, timeouts, retries, replanning, and termination.
- Tool Gateway: the single entry for tool calls. It handles permissions, rate limits, timeouts, audit, and result normalization.
- Shared State: stores the task graph, node status, artifact references, evidence references, review conclusions, and budget consumption.
- Event Log/Memory: stores key events, versions, and a replayable trail for recovery and evaluation.
A recommended state machine:
ROUTE -> PLAN -> VALIDATE_PLAN -> DISPATCHDISPATCH -> EXECUTE -> VERIFY -> MERGEVERIFY -> ACCEPT | REPLAN | FAILMERGE -> ACCEPT | REPLANACCEPT -> END
The important boundaries:
- The Planner outputs only an executable plan and acceptance criteria. It does not write the final answer.
- An Executor handles only the current node and must not widen the task on its own.
- The Critic does not generate. It reviews against rules and returns actionable fixes.
- The Orchestrator owns final scheduling. Unconstrained free conversation between agents is not allowed.
5. Task decomposition: from natural language to an executable DAG
Task decomposition is the core of multi-agent stability. The Planner’s output should not be a natural-language “plan.” It should be a structured task graph. Each node should at least include an identifier, goal, input references, dependencies, tool scope, output contract, acceptance criteria, timeout, retry policy, and budget.
record TaskNode(String id,String goal,List<String> dependsOn,List<ArtifactRef> inputs,List<String> allowedTools,OutputContract output,List<AcceptanceCriterion> acceptance,RetryPolicy retry,Budget budget) {}record Plan(String planId,int version,String userGoal,List<String> constraints,List<String> deliverables,List<TaskNode> nodes,Budget totalBudget) {}
Decomposition principles:
- MECE as far as practical: reduce overlap between subtasks, and make sure the merge covers the overall goal.
- One intent per node: a node does one class of action—retrieve, extract, check, calculate, or write.
- Verifiable output: every node has a structured output contract so downstream steps do not guess.
- Explicit dependencies: a DAG expresses order and lets independent nodes run in parallel.
- Limits on depth and node count: cap maximum depth, node count, and concurrency so decomposition does not run away.
- Budget up front: during planning, allocate token, tool-call, time, and cost budgets.
- Limited replanning: when the Critic finds an evidence gap or a node fails, replan from the delta instead of throwing the whole plan away.
A common anti-pattern is opening an agent for every tiny step. Agent count is not a quality metric. Retrieval, cleaning, formatting, and simple calculation should prefer tools or deterministic code. Use a model where semantic judgment, open reasoning, or evidence integration is required. Two to five execution nodes in a plan are often enough. Complex work should expand through subgraphs, not through an unlimited set of roles.
6. Communication between agents: message contracts, not free chat
Agent-to-agent communication must be protocol-based and auditable. It should not be “several models discussing freely.” Free chat tends to produce unstructured messages, cross-contaminated context, unclear responsibility, uncontrolled cost, and failures that cannot be reproduced.
Define a common message envelope that at least includes:
- messageId, traceId, planId, nodeId: for tracing.
- fromAgent, toAgent, messageType: to distinguish dispatch, result, evidence, review, replan, and error.
- schemaVersion: so the protocol can evolve.
- inputs, artifacts, evidence: pass references, not large object bodies.
- payload: the structured business payload.
- deadline, budget: execution bounds.
- idempotencyKey: safe retries.
record AgentMessage(String messageId,String traceId,String planId,String nodeId,String from,String to,MessageType type,int schemaVersion,List<ArtifactRef> inputs,List<EvidenceRef> evidence,JsonObject payload,Deadline deadline,Budget budget,String idempotencyKey) {}
Prefer central orchestration, with local peer exchange only where it helps. Central orchestration is easier to audit, rate-limit, recover, and cost-control. Local peer exchange can negotiate inside a subgraph, but it must stay inside the parent budget and timeout. Long tasks should use asynchronous messages and status queries. Large results go to object storage or a database; the message keeps only an artifact reference and a summary.
Reliability needs to cover:
- Idempotency: duplicate delivery must not repeat side effects.
- Timeouts: messages carry a deadline; expired work fails or falls back.
- Retries: retry only transient errors. Business errors go to a human or to replanning.
- Order and causality: use correlationId and causationId to chain messages.
- Dead letters and audit: failed messages enter a dead-letter record with the reason and enough information to replay.
- Security: the Tool Gateway isolates permissions, masks sensitive fields, and treats external content as untrusted input so prompt injection does not spread across agents.
7. Engineering the Critic: an independent view, evidence first, measurable output
The Critic’s value comes from independence, not from asking the model again. In engineering terms:
- Independent context: the Critic sees the task contract, the candidate result, evidence references, and acceptance criteria. It does not reuse the full intermediate dialogue from generation.
- Independent prompt: the generator aims to complete the task; the Critic aims to falsify it.
- Structured output: return pass, score, issues, requiredFixes, missingEvidence, and confidence.
- Rules first: format, required fields, numeric ranges, and citation integrity can be checked deterministically before a model review.
- Tool verification: numbers, dates, entity relations, and statistical definitions should be checked by query or calculation where possible.
- Human calibration: use labeled samples to calibrate thresholds, and periodically sample the Critic’s false rejects and misses.
record Review(boolean pass,double score,List<Issue> issues,List<String> requiredFixes,List<EvidenceRef> missingEvidence,double confidence) {}
The Critic’s output should drive a clear action: pass and merge; insufficient evidence and retrieve more; incomplete coverage and replan; format errors and repair locally; repeated failure and fall back to a single agent or human review. Do not let the Critic nitpick forever. Set a maximum number of review rounds and a threshold for marginal gain.
8. State, persistence, and recoverable execution
Multi-agent tasks usually last longer than a single turn, so execution must be recoverable. State can be split into:
- Plan state: task-graph version, node dependencies, acceptance criteria.
- Execution state: whether a node has started, finished, or failed, and how many retries it has used.
- Artifact state: large results, files, tables, and reference locations.
- Evidence state: source, summary, confidence, and access time.
- Budget state: tokens, tool calls, elapsed time, and cost.
- Review state: conclusions, fixes, and round count.
Storage is usually a combination of cache or state store plus a relational database and object storage. Hot state stays in low-latency storage. Critical state and audit logs are persisted. Large artifacts go to object storage and are kept by reference. Checkpoint at each node-state boundary, and use versions plus optimistic locking so concurrent writes do not overwrite each other. End-to-end exactly-once delivery is rarely a realistic promise. At-least-once delivery plus idempotent handling is the practical target.
Orchestrator pseudocode:
run(userTask):route = router.classify(userTask)if route == SIMPLE:return singleAgent.run(userTask)plan = planner.plan(userTask)validate(plan)state.save(plan)while not state.finished():ready = state.readyNodes(plan)execute ready nodes with concurrency limit:result = executor.run(node, state.loadInputs(node))state.saveResult(node, result)reviews = critic.verifyReadyNodes(plan, state)if reviews.allPass(plan.acceptance):return merger.merge(plan, state)if state.canReplan():plan = planner.replan(plan, reviews.issues)state.save(plan)else:return fallback(userTask, state)
9. Cost control: routing, budgets, cache, and early stop
Cost control has to run through planning, execution, and review.
Routing is the first gate: simple tasks never enter the multi-agent path. The plan budget is the second: the Planner must give a total budget and a budget per node. During execution, cap concurrency, tool calls, and timeouts. During review, cap the number of rounds so the Critic cannot bounce work forever. During merge, reuse existing artifacts instead of regenerating them.
Practical optimizations:
- Use a cheaper model for extraction, classification, and formatting; use a stronger model for planning, critical reasoning, and the final review.
- Cache tool results and reuse them by input fingerprint and validity window.
- Store large results by reference; pass summaries and hashes in messages.
- Parallelize subgraphs, but limit concurrency so tail latency and cost spikes stay bounded.
- Define early-stop conditions: stop when evidence coverage is sufficient, marginal information gain is too small, or the budget is exhausted.
- Record why each route and each replan happened, and keep tuning the thresholds.
Core metrics to watch: task success rate, first-pass rate, replan rate, Critic rejection rate, average node count, tool error rate, P95 latency, cost per successful task, and human intervention rate. Do not look only at the cost of a single call. Look at the cost per successful delivery.
10. Production reliability: observability, fault tolerance, security, and evaluation
For observability, at least thread together traceId, planId, nodeId, agentId, and toolCallId. Logs should record input summaries, output summaries, state transitions, budget use, and failure reasons. Do not write full sensitive content into logs. Group metrics by task type, route type, model, tool, and version so regressions can be located.
For fault tolerance, distinguish transient failures from deterministic errors. Tool timeouts and network jitter can be retried. Bad parameters, missing permissions, and missing evidence should go to repair or to a human. Put circuit breakers and fallbacks on critical nodes: if the multi-agent path fails, fall back to a single agent; if that fails, hand off to a person. Every tool with side effects must be idempotent or compensatable.
For security, treat all externally retrieved content as untrusted input. Tool calls go through one gateway for permission checks, parameter allowlists, rate limits, and audit. Different agents get the minimum tools they need. Mask sensitive data in messages and logs, and isolate tenants. Prompt-injection defense cannot be a single system prompt. Constrain data on the way in, model generation, and tool execution.
For evaluation, keep a fixed eval set, online shadow traffic, and human sampling. Compare single-agent, multi-agent, and different routing strategies on success rate, cost, and latency. Samples should cover long-tail cases, conflicting evidence, tool failures, format constraints, and multiple languages. Run regression on every orchestration change so a stricter Critic does not silently cut the pass rate.
11. A migration path from proof of concept to production
Stage one: add routing and metrics. Identify which tasks are worth a multi-agent path, build a baseline eval set, and record single-agent failure types and a cost baseline.
Stage two: introduce the Planner and state-graph orchestration. Start with two or three Executor nodes. Outputs must be structured, the task graph must be validatable, and state must be persisted at node boundaries.
Stage three: add an independent Critic and limited replanning. Start with deterministic checks, then model review. Calibrate thresholds with human labels and cap the number of rounds.
Stage four: complete the communication protocol, recoverable execution, circuit breaking, fallback, and the security gateway. Compare online behavior with shadow traffic, then roll out to a small share of traffic.
Stage five: optimize cost and model mix. Choose models by task type, turn on caching and early stop, and keep watching cost per successful delivery.
12. Common anti-patterns
- Sending every task through multi-agent orchestration and skipping routing.
- Treating chat history as shared state and polluting context.
- Over-decomposing: many agents, little value per node.
- A Planner that emits a natural-language plan that cannot be validated.
- A Critic that shares the generator’s full context and loses independence.
- Messages with no structure, no version, and no idempotency key, so they cannot be replayed.
- No budget, timeout, or maximum round count, so the system cannot stop.
- Copying large artifacts through messages again and again, so cost and latency run away.
- Recording only the final result, not intermediate evidence and state transitions.
- Treating model self-check as quality assurance, without tool verification or a human fallback.
Closing
What makes a Planner–Executor–Critic architecture valuable is not “more agents.” It is clear division of work, manageable state, and results that can be checked. A production system should route first and keep simple tasks out of the multi-agent path; then decompose work into a structured graph so each subgoal has a boundary; then close the quality loop with an independent Critic, evidence checks, and traceable communication; and finally make the system operable with persistence, observability, fault tolerance, and cost control. For a team moving off a single agent, the usual order is: routing and evaluation, planning and state, independent review, communication protocol, then recovery and cost optimization. Follow that order, and multi-agent work can become part of reliable delivery rather than a demo.
