Provider-Agnostic Mixture of Agents: From Built-In Tools to Virtual Model Providers
Mixture of Agents (MoA) is evolving from a hard-coded workflow into a configurable virtual model provider for agent frameworks. This article explains the four-layer architecture, preset configuration, cost and latency trade-offs, evaluation considerations, and operational controls needed to combine multiple inference sources through a unified model interface.
1. From a Built-In Tool to a Virtual Model Provider
Mixture of Agents (MoA) is not a new concept in agent frameworks. Its basic approach is to have several reference models analyze the same problem in parallel, then use an aggregator model to synthesize their outputs into a more robust final answer.
Early implementations typically packaged MoA as a built-in tool or a fixed workflow. Reference models, the aggregator, and the model gateway were often hard-coded or fixed in configuration. This constrained model selection to a single routing platform, made costs difficult to control, and required orchestration changes when moving to another inference source. It also separated MoA calls from ordinary model calls at the conversation level.
The key architectural change is to treat each MoA preset as an independent virtual model provider. To the agent loop, a preset behaves like an ordinary model: it has a consistent model identifier, declared capabilities, and a standard invocation interface. It can appear in the model selection list and be selected through the same interface as other models.
Selecting that preset triggers the underlying workflow: parallel analysis by reference models followed by synthesis by the aggregator. When implemented as a full conversational model, the virtual provider supports tool calls, follow-up questions, and context continuity. It can also expose a single-call mode for one-off analysis of complex questions.
This is more than an additional entry point. It moves MoA from a hard-coded internal workflow into a configurable, reusable, and governable inference layer. The agent does not need to know where reference models are hosted, how the aggregator is authenticated, or how failures are handled. Those responsibilities belong to the virtual provider and orchestration layer.
The framework can therefore move beyond dependence on one model gateway and combine multiple inference sources.
2. Architecture: Four Layers of Responsibility
A provider-agnostic MoA architecture can be divided into four layers.
Configuration Layer
The configuration layer defines MoA presets, including:
- Reference models
- Aggregator model
- Concurrency
- Timeouts and retries
- Budget limits
- Fallback policies
Each preset should have a stable ID and a version number to support staged rollouts and rollbacks.
Adapter Layer
Inference sources differ in authentication, rate limits, error codes, streaming behavior, and structured output support. The adapter layer normalizes these differences behind an internal inference interface.
Reference models can then come from different APIs, existing subscriptions, or local deployments without requiring the orchestration layer to handle provider-specific behavior.
Orchestration Layer
The orchestration layer invokes reference models in parallel, collects their candidate analyses, builds the aggregation prompt, calls the aggregator, and performs any necessary final synthesis.
The aggregation prompt should instruct the aggregator to identify conflicts, remove repetition, and preserve key evidence—not simply concatenate the candidate outputs.
Observability and Governance Layer
This layer records token usage, latency, failure reasons, differences between candidate outputs and the final answer, estimated costs, and budget consumption.
For agent systems, observability is not an optional addition. It is a prerequisite for controlling costs and diagnosing quality problems.
The virtual model provider also needs to declare capability metadata, such as its context window and support for tool calls, structured output, and multi-turn conversations. The agent uses this information to decide whether a preset is suitable. For example, a preset without tool-call support should not be selected for a tool-intensive task.
3. Example Preset Configuration
The following pseudoconfiguration illustrates a generic MoA preset. It does not represent a specific vendor or API.
moa_preset:id: balanced_moaversion: 1reference_models:- provider: adapter_amodel: ref_small_1max_tokens: 1024timeout_ms: 20000- provider: adapter_bmodel: ref_small_2max_tokens: 1024timeout_ms: 20000- provider: local_adaptermodel: ref_local_1max_tokens: 1024timeout_ms: 25000aggregator:provider: adapter_cmodel: agg_largemax_tokens: 2048timeout_ms: 30000concurrency: 3fallback: single_modelbudget:max_total_tokens: 6000
At the agent level, invocation can retain the shape of an ordinary model call:
result = agent.run(prompt=user_input,model="moa:balanced_moa",tools=available_tools,)
The important point is not the syntax but the unified model selection interface. The agent loop does not need a separate branch that explicitly calls three reference models and then an aggregator. Instead, the MoA preset participates in the conversation as a virtual model provider.
4. Benefits and the Cost Model
Flexible Model Composition
Provider independence gives teams more freedom to combine models. Reference models can use APIs available through existing subscriptions, or local models can handle the reference stage while a more capable model handles aggregation.
For sensitive data, local reference models can reduce the need to send raw inputs externally. However, the aggregation stage still receives reference outputs, so data redaction and access controls remain necessary.
Cost Optimization
MoA costs should not be treated as the cost of a single inference call. A useful approximation is:
Total cost ≈ token costs for all reference models + aggregator token costs + orchestration overhead
Latency follows a similar pattern:
Total latency ≈ latency of the slowest parallel reference model + aggregator latency
Adding more reference models is therefore not automatically beneficial. Two to four reference models are usually sufficient. Candidate outputs should be truncated and aggregation prompts compressed to avoid sending large amounts of low-value text to the aggregator.
Budget caps, timeout-based fallbacks, and cache reuse are essential controls.
Centralized Governance
Routing reference and aggregator calls through a unified adapter layer makes it easier to centralize authentication, rate limiting, auditing, cost accounting, and failure handling.
Compared with separate scripts assembled by individual teams, a virtual model provider is easier to establish as a shared organizational capability.
5. Evaluation and Model Selection
Under a specific preset in an internal agent benchmark, an MoA configuration combining a strong aggregator with strong reference models achieved a pass rate of approximately 82.02%, an improvement of roughly 8–11 percentage points over the single-model baseline.
This result suggests that MoA can improve performance on tasks requiring multiple analytical perspectives, conflict detection, and synthesis. It is not a general guarantee. Results depend on the task distribution, reference-model diversity, aggregation prompt quality, and budget constraints.
When selecting models, prioritize diversity in the reference layer rather than simply adding more models from the same source. The aggregator should have strong instruction-following and structured synthesis capabilities.
Use real business workloads for regression testing instead of relying on a single benchmark. For high-value tasks with less stringent latency requirements, additional reference models may be appropriate. For latency-sensitive tasks, reduce the reference layer or apply more aggressive timeouts and fallback policies.
6. Engineering Checklist
For a production-oriented MoA implementation:
- Version presets and associate each version with its evaluation results.
- Declare capability metadata for every preset.
- Set concurrency limits, timeouts, retries, and failure fallbacks.
- Record differences between candidate outputs and the final answer.
- Redact sensitive information in logs.
- Configure budget alerts and circuit breakers.
- Retain human review for high-risk use cases.
- Use A/B testing to compare the actual benefits of single-model calls and MoA presets.
7. Conclusion
The evolution of MoA from a hard-coded tool to a virtual model provider turns multi-model orchestration from an internal framework technique into a configurable inference layer.
This approach reduces dependence on a single model gateway and provides a unified way to manage cost, latency, quality, and governance. The real value lies not in the number of models, but in whether preset design, evaluation gates, and runtime governance form an effective feedback loop.
