Multi-Agent Consultation and Global Routing Configuration in LLM Systems
This article explains two engineering patterns for moving LLM applications from single-model workflows into production: multi-agent consultation (Mixture of Agents) and global intelligent routing. It breaks down the roles in a consultation setup, with read-only reference models for divergent analysis and a single aggregator model as the only executor, and includes neutral YAML and prompt examples. It then describes a three-layer routing design based on rules, classification, and consultation, with fallback and timeout considerations. The article closes with practical pitfalls, including permission isolation, budget caps, auditable traces, and pseudo cross-validation.
1. Background: Three Structural Flaws of Single-Model Workflows
When connecting a large language model to a real business system, the most common approach is to attach a single model to the entire conversation pipeline: all reasoning, retrieval, tool calls, and result validation are handled by that one model. This structure works well in demos, but three problems surface in production.
The first is rigid thinking. Once a single model forms a judgment within one forward pass, it struggles to meaningfully argue against its own conclusion, and errors are often packaged as reasonable answers in a self-consistent way. The second is coupling of permissions and responsibilities. The same model handles both divergent thinking and high-risk operations, so a reasoning error translates directly into real file changes or command execution. The third is an imbalanced cost structure. Simple Q&A and complex planning run on the same model tier, which makes high-frequency requests too expensive while low-frequency, high-difficulty requests do not get enough reasoning budget.
Multi-agent consultation and global routing are the engineering responses to these three points: the former splits “thinking” and “execution” into two role types and adds cross-validation, while the latter turns model selection from a manual decision into automated scheduling.
2. Breaking Down the Multi-Agent Consultation Pattern by Role
The core of multi-agent consultation (Mixture of Agents) is not “stacking more models to debate each other,” but a stable division of labor: multiple reference models give opinions in parallel, and one aggregator model handles convergence and execution.
2.1 Reference Models: Read-Only, Divergent, Low-Cost
Reference models act as a think tank. A practical configuration uses two or three lightweight or mid-sized models with different capability emphases, all kept read-only: they are granted no tool capabilities such as terminal access, file writes, or browser operations. Their output is strictly limited to analytical opinions, including problem decomposition, potential risk checks, overlooked boundary conditions, and comparisons of alternative technical approaches.
This constraint yields three direct benefits. First, higher divergence: differences in training data distribution and alignment strategies naturally produce complementary perspectives. Second, controllable cost: the reference stage only generates short-text reasoning and does not trigger tool calls or long-context replay. Third, better safety: a role without execution permissions cannot cause side effects.
2.2 The Aggregator Model: The Only Executor
The aggregator model is the only core model in the session that holds full permissions. It can read the full context and call tools such as terminal, filesystem, and browser. Its responsibility chain is explicit: collect all reference opinions → cross-validate and flag conflicts → adopt the verifiable parts → fill in gaps → produce a single canonical answer → execute and write back the results.
The key point is “only one.” If multiple roles are allowed to hold execution permissions at the same time, you get duplicate writes, state races, and changes that cannot be traced. This is the main reason many multi-agent efforts fail.
2.3 Illustrative Configuration
The following is a neutral illustration meant to show the structure rather than bind to any specific product interface:
agent_mode: mixture_of_agentsreference_models:- id: ref-planner # Focused on solution decompositiontemperature: 0.7tools: [] # Read-only, no tool permissions- id: ref-critic # Focused on risk and vulnerability checkstemperature: 0.3tools: []aggregator:id: core-executortools: [terminal, filesystem, browser]max_context: fullrequire_citation: true # Source role must be cited when adopting a reference opinion
The prompt for the aggregation stage should explicitly require the model to produce structured conclusions so they are easy to audit later:
Complete the task based on the opinions of the following reference models:1) List the points of agreement and the points of conflict;2) Provide the basis for each conflict decision (verifiable facts first);3) Output a single final plan and execution steps;4) After execution, report the actual changes and validation results.
3. Global Intelligent Routing: Three Layers with Fallback
Global routing replaces the manual act of switching models. It selects a model or a consultation combination automatically based on each request’s difficulty, scenario type, context length, and request type. A sound implementation usually has three layers, each acting as a fallback for the one above.
The first layer is the rules layer. Deterministic heuristic conditions handle requests with clear boundaries, such as very short Q&A, pure format conversion, and explicit code completion. The rules layer has the lowest overhead and the most predictable results, so it should cover high-frequency simple traffic first.
The second layer is the classification layer. For requests that miss the rules layer, a lightweight classification model determines intent and complexity and outputs structured labels (for example, “factual query / code generation / multi-step planning / high-risk operation”), which are then mapped to a model tier. This layer must retain a confidence field: low-confidence requests should fall back upward rather than be forced into a decision.
The third layer is the consultation layer. When classification confidence is insufficient, the task is judged as multi-step planning, or a high-risk operation is involved, the multi-agent consultation flow is triggered. If unresolved conflicts remain after consultation, the system degrades to “provide a plan only, do not execute automatically,” returning final confirmation to the user.
Clear degradation paths and timeout policies must be defined across the three layers so that routing itself does not become a new single point of failure.
4. Implementation Notes and Common Pitfalls
Permission isolation comes before model selection. First decide which roles are read-only and which role can write, then discuss which model to use; otherwise even a good routing design will amplify the risk of wrong operations.
Set a budget cap for consultation. The number of reference models, the total token budget, and the maximum number of rounds all need hard limits to prevent cost and latency from spiraling.
Keep an auditable trail. Record the basis for routing decisions, the opinions adopted and rejected, and the changes actually executed, so incidents can be reviewed and responsibility assigned.
Watch out for pseudo cross-validation. If multiple reference models share the same prompt and the same context slice, their conclusions are highly correlated and cross-validation adds little value; differentiate perspectives and input trimming strategies to a reasonable degree.
Finally, note that this article cites no specific performance improvement figures. Actual gains depend on task distribution, model tier, and tool complexity. Run a small-percentage canary with a control comparison on your own traffic before enabling it fully.
