Agentic Mixture-of-Agents Architecture: A Practical Guide to Implementation
This article explains how to move from a single-model AI assistant to a Mixture-of-Agents (MoA) system, where multiple models propose answers independently and an aggregator model reviews and converges on a final decision. It covers the three-layer architecture, three orchestration patterns, model selection and routing, reliability and cost controls, and common implementation pitfalls, with a reference deployment pattern on Baidu AI Cloud.
1. From a Single Advisor to an Expert Review Panel: Why the Paradigm Shifts
Most early AI applications assumed a single model performing a single inference: one prompt in, one answer out. This is the simplest pattern to build, but it exposes three structural problems on complex tasks.
First, the perspective is narrow. A single model produces only one reasoning path per forward pass. Even with techniques such as chain of thought, that path is essentially a self-extension of the same line of thinking, with no genuinely independent second viewpoint.
Second, errors are invisible. When a model states something wrong with complete confidence, the caller receives no confidence signal. The error propagates downstream through the business flow and eventually becomes a user-visible incident.
Third, the capability ceiling is locked to one model. Models differ in their relative strengths across code, math, long context, multilingual tasks, and tool calling. Using only one of them means deliberately giving up the strengths of the others.
Mixture-of-Agents (MoA) is an organizational-level answer to these three problems. Its core idea is not new: it brings the mature human mechanism of “multiple expert reviews plus a lead decision that converges” to the model layer. Several models answer independently, and then an aggregator model compares them side by side, resolves conflicts, and forms a conclusion. The value is not a longer answer, but turning a one-shot gamble into a review with cross-validation.
2. How It Works: Layered, Not Stacked
A usable MoA system typically has three layers, connected by explicit data contracts.
Proposer layer: Multiple models are called in parallel with the same task description and context, each producing a candidate answer. This layer pursues diversity, so model selection, prompt wording, and temperature settings should be intentionally varied.
Review and aggregation layer: This layer receives all candidates, first normalizes and aligns them, then has the lead decision model make trade-offs against predefined criteria (correctness, executability, risk, cost) and outputs the final answer along with the rationale.
Execution and feedback layer: The answer is not the endpoint. The conclusion is handed to tool calls or the business flow for execution, and the execution results flow back as context for the next round, closing the loop.
MoA is not simply “call a few more times and average the results.” If the system only votes, it degrades into blind deference to the majority. What actually does the work is the aggregation layer’s explicit review criteria and conflict-resolution logic.
3. Three Orchestration Patterns
Parallel proposals with a single aggregation. Lowest latency and simplest to implement. Suited to latency-sensitive scenarios with clear task boundaries.
Multi-round iteration (an advanced MoA form). The first aggregation result is fed back to the proposer layer together with the candidates for a second round of proposal and aggregation. More rounds significantly increase token consumption, so convergence conditions should be set, for example a stable conclusion, review scores that stop improving, or a round limit.
Hierarchical mixture. The proposer layer is further grouped by domain; each group aggregates locally first, and then a top-level aggregation runs. Suited to enterprise workflows whose tasks can be split into multiple subdomains.
Illustrative orchestration pseudocode:
async def moa_run(task, proposers, aggregator, max_rounds=2):history = []for r in range(max_rounds):# Proposer layer runs in parallel; one model failing does not break the whole runcands = await gather_safe([p(task, history) for p in proposers])decision = await aggregator(task, cands, history)history.append((cands, decision))if is_converged(history):breakreturn decision
4. Model Selection and Routing: The Real Difficulty
The gains from mixing come from difference, not from quantity. In practice, build the model pool along capability dimensions rather than brand dimensions, for example four labels: strong reasoning, long context, low cost with high concurrency, and strong tool calling, then route by task characteristics.
Routing can start with rules (task type, input length, compliance requirements) and gradually introduce weight-based scheduling driven by historical success rates. For cost-sensitive workloads, an asymmetric structure works well: cheap models handle all proposals while a strong model only aggregates. This is often more economical than using strong models everywhere.
Mainstream models available in China can also fit this framework. As long as the target platform can connect to model services from different sources in a unified way, MiMo, Qwen, GLM, DeepSeek, and Kimi can all participate in orchestration as proposers or aggregators. The key points are protocol adaptation, isolated authentication, and unified error semantics.
5. Reliability and Cost Control
MoA multiplies call volume, so governance capabilities must be built at the same time:
- Failure isolation: Any failed proposal degrades to “this perspective is missing,” and the aggregation layer must tolerate an insufficient number of candidates.
- Budget guardrails: Set per-request limits on tokens and call counts; when exceeded, fall back directly to a single-model path.
- Cache reuse: Short-term caching of proposal results for identical task fingerprints can substantially cut repeated cost.
- Observability: Record every candidate, every review score, and the final selection rationale, so it is easy to trace why A was adopted over B.
- Evaluation loop: Build a regression set with reference answers, and measure every orchestration change with four metrics: accuracy, consistency, average latency, and cost per request.
6. A Reference Deployment on Baidu AI Cloud
This architecture can be assembled on Baidu AI Cloud entirely from general-purpose cloud product categories, without relying on any proprietary interface: model services are connected through a unified gateway that handles authentication and quota management; the orchestration and execution layer runs on a container platform or a function-computing service for elasticity and isolation; tasks and candidate results go into a message queue for peak shaving and retries; long context and archived decisions are stored in object storage; end-to-end metrics flow into the logging service and monitoring alerts, which notify on-call staff automatically once thresholds are configured; and keys and prompt templates are managed centrally by a key management service to avoid hardcoding.
7. Common Pitfalls
One is treating the number of models as a performance metric; too many candidates dilute the aggregation layer’s attention and raise cost. A second is a vague aggregation prompt with no review dimensions, which degrades the lead decision model into “restating the longest answer.” A third is having no fallback, so the whole run fails once all proposals time out. A fourth is ignoring data compliance: sending sensitive data to multiple external sources at once is itself a risk point, so the set of eligible models should be decided by data classification.
8. Conclusion
The point of MoA is to move AI from “a smarter answerer” to “a governable decision system.” For enterprises, the real competitive edge is no longer which most expensive model was purchased, but whether multiple models can be organized into a production system with clear responsibilities, observability, and constraints. The recommendation is to start with low-risk, testable internal scenarios, get the two-layer structure working first, and then gradually introduce iteration rounds and hierarchical orchestration.
