Multi-Agent Consultation (MoA) and Global Routing Configuration Guide

    This article explains how the Mixture of Agents (MoA) consultation pattern separates divergent thinking from convergent execution through a reference layer and an aggregator layer, and how a global routing layer automatically selects models or MoA combinations by request complexity. It covers the layered design, a sample configuration structure, three routing tiers, implementation steps, common pitfalls, and observability and cost-control practices.

    1. The Starting Problem: Structural Bottlenecks of a Single-Model Architecture

    When building AI assistant applications, the issue teams run into most often is not that “the model is not strong enough,” but the structural flaws of a single-model pipeline: one inference call has to understand intent, retrieve information, invoke tools, and produce output. With every responsibility compressed into the same call, any error in judgment at one stage gets amplified into a wrong final answer.

    There are three typical symptoms. First, rigid thinking: the model reinforces the line of reasoning it generated initially and lacks an external perspective to correct it. Second, hallucination: without cross-validation, the model tends to fill information gaps with plausible-sounding statements. Third, chaotic tool operations: once reasoning and execution are coupled, repeated calls, incorrect parameters, and uncontrollable side effects become likely.

    Two common responses exist in the industry. One is to let multiple agents debate freely, but without a final convergence mechanism, the output becomes verbose and unstable. The other is to simply switch to a larger model, which raises cost but does not necessarily fix logical flaws. The multi-agent consultation pattern (Mixture of Agents, MoA) offers a third path: layered responsibilities plus a single execution exit.

    2. Layered Design of the MoA Consultation Pattern

    The core of MoA is not “voting across multiple models,” but completely separating “divergent thinking” from “convergent execution.”

    2.1 Reference Layer: A Think Tank That Only Thinks

    The reference layer typically consists of 2 to 3 models with different capability focuses. The key point is that none of them is granted any tool permissions. They receive only the user question and necessary context, and output analytical perspectives, potential risks, overlooked boundary conditions, and alternative options.

    Withholding permissions is a design choice, not a limitation. Once reference models can write files or execute commands, multiple actors compete for the same resource, results become non-reproducible, and the source of errors is hard to locate. Keeping the reference layer “read-only thinking” ensures its output is comparable, discardable, and recomputable.

    For model selection, aim for differentiated perspectives rather than simply stacking similar models: one focused on logical reasoning and code walkthroughs, one on domain knowledge and specification constraints, and one on enumerating boundary conditions and failure scenarios. Multiple models with overlapping perspectives deliver returns far below their cost.

    2.2 Aggregator Layer: The Only Actor with Full Permissions

    The aggregator layer is the only role on the pipeline with tool-calling ability. It can read the full conversation context and invoke capabilities such as the terminal, file system, and browser. Its job has four steps: summarize the reference layer’s views, cross-validate conflicting conclusions, integrate an executable plan, and output the final answer while carrying it out.

    This design yields an implicit benefit: auditability. All side effects are concentrated at a single exit, so logging, permissions, and rollback policies only need to be implemented at this layer, with no distributed consistency handling across multiple agents.

    2.3 Illustrative Configuration Structure

    The following is a neutral illustration to express the division of responsibilities; it does not point to any specific product interface:

    1. moa:
    2. reference_layer:
    3. count: 2-3
    4. tools: [] # Key: no tool permissions granted
    5. output: analysis_only # Outputs views only, not the final answer
    6. timeout_ms: 8000
    7. aggregator_layer:
    8. tools: [terminal, file, browser]
    9. context: full # Reads the full context
    10. verify: cross_check # Cross-validates conflicting conclusions
    11. output: final_and_execute

    3. Global Intelligent Routing: Handing Model Selection to the Dispatch Layer

    Global routing solves a different problem: people should not have to judge which model to use for each request. The routing layer analyzes each question’s difficulty, scenario type, output length requirement, and request category, then automatically matches a single model or an MoA combination, replacing manual switching.

    Three-Tier Routing Structure

    The first tier is the fast lane. Low-complexity requests such as chitchat, format conversion, and single-point factual Q&A go directly to a lightweight model, optimizing for latency and cost.

    The second tier is the standard lane. Medium-complexity requests such as routine business Q&A, single-file edits, and structured extraction use a well-balanced model, with a two-role consultation of one reference plus the aggregator enabled when necessary.

    The third tier is the deep lane. Requests such as cross-file refactoring, complex troubleshooting, and multi-constraint solution design enable the full MoA combination and allow an increased reasoning budget and multiple rounds of validation.

    Fallback between the three tiers is mandatory: when the deep lane times out or the aggregated result has low confidence, degrade to the standard lane with a notice rather than failing outright.

    Routing Decision Dimensions

    1. Input -> Feature extraction -> Lane decision -> Model/combination match -> Execution -> Result evaluation -> Feedback loop
    2. | |
    3. +-> complexity, scenario, length, risk level +-> degrade and retry on failure

    Keep the decision dimensions to four or five; too many make routing itself an unexplainable black box. Risk level matters especially: requests involving deletion, bulk writes, or production configuration changes should be forced into a high-privilege review path rather than routed by complexity alone.

    4. Configuration Implementation Steps

    Step 1: Inventory the scenarios. List the real request distribution and annotate each category’s average length, tool requirements, and error tolerance as the basis for lane division.

    Step 2: Define the roles. Write the input and output contracts for the reference layer and the aggregator layer before choosing models. When contracts are unclear, the reference layer tends to output final answers and the aggregator degrades into simple concatenation.

    Step 3: Converge permissions. The reference layer gets zero permissions; the aggregator layer is authorized on the least-privilege principle, with a second confirmation for high-risk operations.

    Step 4: Budgets and timeouts. Set an independent timeout and token limit for each layer to avoid one point blocking the entire pipeline.

    Step 5: Canary release and evaluation. Run accuracy, hallucination rate, tool-call success rate, and average latency on an offline sample set first, then ramp up traffic gradually.

    5. Common Pitfalls and Tuning Advice

    Pitfall 1: More reference models is better. The marginal return of additional views diminishes while latency rises linearly; 2 to 3 is usually enough.

    Pitfall 2: Letting the reference layer vote directly on the answer. Voting cannot handle the case where “the majority jointly overlook the same premise”; cross-validation must be done by the aggregator layer.

    Pitfall 3: Routing on keywords only. Keywords are easily bypassed by phrasing, so decisions should combine task type with historical execution results.

    Pitfall 4: Missing the feedback loop. Routing accuracy depends on continuous feedback: only by accumulating degradation counts, retry reasons, and human correction records as samples can lane boundaries be iterated.

    6. Observability and Cost Control

    For each request, record: the lane hit, the participating model roles, per-layer latency, number of tool calls, whether degradation occurred, and whether a human modified the final result. With these fields, you can pinpoint whether the cause is a routing misjudgment, a missing perspective in the reference layer, or insufficient integration capability in the aggregator layer.

    On cost, MoA’s increment comes mainly from the reference layer. Prioritizing lightweight models for the reference layer, limiting output length, and not enabling consultation for low-complexity requests is the most cost-effective combination. In engineering practice, making “consultation” a switchable capability configured per scenario rather than always on globally usually achieves a more stable balance between accuracy and cost.