Skip to main content
Mixture-of-Agents (MoA) runs the same prompt across several models in parallel (the proposers) and then uses an aggregator to synthesize a single high-quality answer from all proposals. With layers, the proposers first review each other’s answers for one or more rounds, so the aggregator works from answers that were already cross-examined. The technique is based on Wang et al., arXiv:2406.04692, whose reference implementation (togethercomputer/MoA) uses the same layered design.

/moa --layers 2 with four providers: independent answers, a cross-review round where each model keeps or revises its position, then the synthesis. Later, the coder calls the @moa tool with layers and the panel streams inside the tool box.

MoA is distinct from Multi-Agent Orchestration: there the axis is specialist agents (planner, reviewer…) dispatched in parallel within a task. Here the axis is model/provider diversity answering the same question. Triggered by the /moa command.

How it works

  1. Shared briefing — the same structured system prompt of a chat turn (contexts attached via /context attach, workspace memory, skills, per-turn retrieval) is assembled once per round and handed to every participant.
  2. Parallel proposal — each proposer receives the same prompt and the same briefing, concurrently, and may pull knowledge, CCR and memory (read-only) before answering.
  3. Fault tolerance — a proposer’s error is tolerated; MoA proceeds as long as at least one answered. It only fails if the aggregator itself fails.
  4. Panel positions — each proposer’s position prints the moment its answer lands, with its elapsed time, so you see where the models agree and where they split before the synthesis arrives.
  5. Aggregation — the aggregator gets a synthesis prompt with all proposals, plus the same briefing and the same tools, and produces one correct, cohesive answer. When the proposals disagree on a material point, the answer ends with a short “Where the answers diverged” section: the competing positions and which one it took, and why. Models are never named.
A 5-minute timeout wraps each round (so --layers 2 gets 10 minutes). /moa also works in one-shot: chatcli -p "/moa <prompt>" (exits non-zero if the round fails).

Layers: the models review each other

By default /moa runs one layer: independent answers, then the synthesis. Ask for more layers and every round after the first is a cross-review: each model reads its own previous answer and the other models’ answers, then writes an improved answer of its own. The aggregator synthesizes the last round.
What each model gets in a review round:
  1. The user’s request, exactly as asked, with the same briefing and read-only tools as round 1.
  2. Its own previous answer, marked as its own.
  3. The other models’ answers, anonymous and rotated: model A reads B then C, model B reads C then A, model C reads A then B. No answer always sits in the first slot, so no model’s view gets the advantage of being read first.
  4. The instruction: evaluate all of them critically (its own included, since some may be biased, outdated or wrong), keep the positions it can defend, adopt a better argument where another model made one, fix every error, and don’t agree just to converge.
Each model opens its review with a [kept] or [revised] marker. ChatCLI strips the marker before anyone reads the answer and shows it in the panel, so you can see whether the panel converged or held its ground:
The envelope over the synthesis reports the rounds: 4/4 models · 2 rounds · 65.7s.

What changes with more layers

Each extra layer is one more cross-review: every model reads the answers of the round before, which were already reviewed once, and revises again. The aggregator always reads only the last round. In general: N models × L layers + 1 calls, and each round waits for its slowest model. A review call is also bigger than a first-round call: its prompt carries the model’s own answer plus the N−1 other answers, so input tokens grow with the panel size. What you gain:
  • Errors get caught by peers. A model that cited a deprecated API or a wrong number sees another model’s correct version and fixes it before the synthesis.
  • Better arguments spread. A point only one model raised in round 1 reaches all of them in round 2.
  • You see who changed their mind. The ↻ revised / = kept badges show, round by round, which positions held up under review.
What to watch for:
  • Convergence by conformity. Models tend to agree with what they read. The review instruction tells them to keep any position they can defend and not to agree just to converge, and the aggregator still reports where the answers diverged. Each round stays visible in the panel, so a position that was dropped is never lost from view.
  • Diminishing returns. The MoA paper counts the aggregator as the last layer, so its main 3-layer configuration is --layers 2 here. It reports that “the first response aggregation has the most significant boost on generation quality”, and its per-layer ablation shows smaller gains from the next layer on. Each layer still costs as much as the one before.
When to use layers. Keep 1 layer for everyday questions. Use 2 layers for contested or high-stakes questions, where independent answers are likely to split: architecture trade-offs, migrations, security decisions. Go to 3 or 4 when the panel still splits after a review round and the decision justifies the extra calls.

Panel briefing and tools

Every panel participant — proposers and aggregator — is as capable as a regular conversation turn: it gets the session’s full briefing plus three strictly read-only tool exceptions, executed in a bounded loop (up to 4 tool rounds per participant), over both native tool-use and XML for providers without native support: When any tool is active, the round’s status line reports it: Expert tools enabled for this panel: knowledge, recall, memory.
Read-only by construction. Memory access is pinned to the recall subcommand by the executor itself — the mutating forms (remember, profile, forget) are unreachable from a panel turn, even if a model smuggles one into the call arguments. ask_user and graphview are excluded on purpose: participants run in parallel and unattended. No exec, file or search tools, ever — the same rule chat mode enforces.

Configuration

Auth: works with OAuth, not just API keys — when a proposer/aggregator matches the session’s active provider, MoA reuses the session client, honoring the OAuth token (preferred over an API key when logged in) or forwarded tokens (server/gateway mode). Provider names are resolved case-insensitively (openai → OPENAI). The /moa command and the @moa tool share the same resolution and defaults, CHATCLI_MOA_AGGREGATOR and CHATCLI_MOA_LAYERS included.
Use different providers as proposers to maximize diversity — that’s where MoA’s quality gain comes from. The aggregator usually performs best as a strong model (Opus, GPT-5).

Usage

Pass --layers N (or --layers=N) before the prompt to run cross-review rounds; the completer suggests the flag and its values:
A proposer that fails shows the provider’s error on one line (✗ googleai:… API error: status 404 …) and the round goes on with the others. Any configured provider can participate as a proposer or aggregator. See Supported Models.

@moa tool (for the agent)

Besides the /moa command, there’s the @moa tool, which the agent can invoke inside an agent/coder flow. It has the same capabilities as /moa: layers, the panel positions, the divergence section.
While it runs, the tool streams the panel into the tool box: a header per round, each model as it answers with its ↻ revised / = kept badge, then Synthesizing with …. What the agent gets back is the panel’s positions per round, then the synthesis (with its “Where the answers diverged” section when the models disagreed), then, with positions: full, every whole answer. The order matters: a long result cut to fit the agent’s context loses the appendix, never who said what or the verdict. That way the calling model sees the same divergence you see in /moa, and can tell you which model changed its mind:
@moa members answer the prompt alone: they do not see the agent’s transcript (its system prompt, tool protocol, tool calls and results), which would make them act as the agent instead of answering. The calling model writes a self-contained prompt with the facts, constraints and excerpts the panel needs, as the tool’s description tells it to. Members keep the read-only panel tools (knowledge, memory). It degrades gracefully: a single successful proposer is returned directly; if the aggregator is unavailable, the positions and the longest answer are returned instead of failing.
In /coder, @moa ask follows the coder policy like any tool: allow it in coder_policy.json ({"pattern": "@moa ask", "action": "allow"}) to skip the confirmation.

See also