MeterRouter: Budget-Aware Multi-Agent DAG Routing via GRPO

MeterRouter (arXiv:2611.34327) is a budget-aware dynamic router that synthesizes multi-agent collaboration DAGs incrementally under an explicit per-query USD budget B. Trained via SFT graph imitation followed by constrained GRPO, it achieves 66.72% average accuracy across five benchmarks at $2.56e-3 per query—5.5x cheaper than MasRouter.
MeterRouter: Budget-Aware Multi-Agent DAG Routing via GRPO: MeterRouter (arXiv:2611.34327) is a budget-aware dynamic router that synthesizes multi-agent collaboration DAGs incrementally under an explicit per-query USD budget B. Trained via SFT graph imitation followed by constrained GRPO, it achieves 66.72% average accuracy across five benchmarks at $2.56e-3 per query—5.5x cheaper than MasRouter. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- Explicit Per-Query Budget Constraint: Conditions every routing step on remaining balance b_i = B - sum(C_j), preventing silent cost explosions.
- 82% Lower Spend Than Top MAS Routers: Matches MasRouter accuracy (66.72% vs 66.80%) while cutting average cost per query from ~$14.1e-3 to $2.56e-3 (5.5x cheaper).
- Hard Affordability & Token Metering: Masks out LLMs whose estimated worst-case charge exceeds remaining budget and caps max_tokens dynamically.
- Outperforms High-Tier Uniform Teams: Beats single-agent gpt-oss-120b (62.50%) and MiniMax-M3 (53.39%) while spending 4x less than LLM-Debate.
import { createAgent } from '@smoke-monkey/harness';interface TierPrice { id: string; inPer1M: number; outPer1M: number; }const POOL: TierPrice[] = [{ id: 'gpt-oss-20b', inPer1M: 0.06, outPer1M: 0.19 },{ id: 'gpt-oss-120b', inPer1M: 0.15, outPer1M: 0.595 },{ id: 'minimax-m3', inPer1M: 0.30, outPer1M: 1.20 },];export async function runBudgetedDag(query: string, budgetUsd = 0.005) {let remaining = budgetUsd;const affordable = POOL.filter((m) => (m.inPer1M * 2048 + m.outPer1M * 1024) / 1e6 <= remaining);const selected = affordable[affordable.length - 1] ?? POOL[0];const worker = createAgent({agentId: `meter-node-${selected.id}`,provider: 'custom',baseUrl: 'http://localhost:8000/v1',model: selected.id,workspacePath: process.cwd(),permissions: { read_file: 'allow', write_file: 'ask', run_command: 'ask' },});const result = await worker.run(query);console.log({ model: selected.id, remainingBudget: remaining, summary: result.summary });}runBudgetedDag('Verify edge cases in binary search implementation', 0.005);
Watch: Related Video Guides
Multi Agent Systems Explained: How AI Agents & LLMs Work Together
Build Advanced Multi-Agent AI Systems with LangGraph | Sub-Agents, Handoffs & Router Patterns
What Is MeterRouter? Incremental Budget-Conditioned DAG Synthesis
MeterRouter (arXiv:2611.34327, University of Minnesota, Databricks, and Mila) is an autoregressive multi-agent router that constructs an execution DAG one agent at a time while strictly tracking remaining USD budget. Unlike static cascades or implicit penalty routers, MeterRouter takes an explicit dollar ceiling $B$ per query and adapts topology, agent roles, and backbone models dynamically.
Existing multi-agent systems (MAS) frequently assign frontier LLMs to every node in a fixed chain, tree, or debate graph. Across 3,654 test queries spanning OmniMath-2, MMLU-Pro, MuSR, BBEH, and MBPP+, a 3-tier model pool (gpt-oss-20b at $0.06/$0.19 per 1M tokens, gpt-oss-120b at $0.15/$0.595, and MiniMax-M3 ~428B at $0.30/$1.20) showed that naive multi-agent graphs burn 4x to 10x more capital without improving accuracy.
MeterRouter models collaboration as a sequential policy $\pi_\theta(\mathcal{G} \mid \mathcal{S})$ that outputs four coupled decisions per step $i \le N_{\max}$:
- Termination $\tau_i$: Decide whether accumulated agent outputs already solve $\mathcal{Q}$.
- Role $r_i$: Pick the next functional role (e.g., planner, solver, verifier, coder).
- Backbone $m_i$: Choose a model from the filtered affordable subset $\mathcal{M}_i^m$.
- Incoming Edges $e_{ji}$: Wire dependencies from prior nodes $j < i$ via a reverse-order GRU edge encoder.
The Meter: Hard Affordability Masking & Constrained GRPO
To prevent budget overruns at inference time, MeterRouter pairs a deterministic runtime accounting layer (The Meter) with a two-stage training recipe: supervised imitation of oracle execution graphs followed by Group Relative Policy Optimization (GRPO).
Before selecting a model $m_i$, The Meter computes an upper bound on input token cost using UTF-8 byte length ($\kappa_b = 2$ bytes/token), prompt reserve ($\kappa_p = 1664$ tokens), chat format overhead ($\kappa_c = 768$ tokens), and per-predecessor margin ($\kappa_m = 256$ tokens). Any model whose estimated invocation plus downstream reserve $R_i$ exceeds remaining budget $b_i$ is masked out, and the remaining balance clamps max_tokens ($q_i$) before dispatch.
| Budget Setting ($B$) | Learned Stop Rate (%) | Budget-Cap Stop (%) | Truncation (%) | Overrun Rate (%) |
|---|---|---|---|---|
| $B \in \{\$1, \$4\} \times 10^{-3}$ | 86.77 ± 0.57 | 12.70 ± 0.43 | 16.93 ± 0.34 | 0.02 ± 0.02 |
| $B = \$5 \times 10^{-3}$ | 91.06 ± 0.24 | 5.74 ± 0.12 | 7.71 ± 0.24 | 0.01 ± 0.02 |
| $B = \$5 \times 10^{-2}$ | 88.25 ± 0.48 | 0.03 ± 0.03 | 0.08 ± 0.12 | 0.00 ± 0.00 |
During GRPO fine-tuning, the clipped surrogate objective optimizes utility $U(\mathcal{Q}, B, \xi) = S(\mathcal{Q}, \xi) - \gamma \frac{C(\xi)}{B}$ ($\gamma = 0.05$) with explicit penalties for budget overruns, raising average accuracy from 57.34% (SFT-only) to 66.72% (+RL).
5-Benchmark Accuracy & Cost Frontier Comparison
Evaluated across five reasoning and coding suites (1,000 OmniMath-2, 1,000 MMLU-Pro, 516 MuSR, 1,000 BBEH, and 138 MBPP+ test problems), MeterRouter dominates the accuracy-cost Pareto frontier—achieving 82% lower spend than top MAS routers while beating single-agent baselines.
| Method / Topology | Backbone Pool | OmniMath-2 | MMLU-Pro | MuSR | BBEH | MBPP+ | Avg Acc (%) | Avg Cost ($×10⁻³) |
|---|---|---|---|---|---|---|---|---|
| MeterRouter ($B=0.05$) | 3-Tier Dynamic | 64.2 | 83.6 | 72.2 | 46.8 | 86.6 | 66.72 | 2.56 |
| MeterRouter (w/o RL) | 3-Tier Dynamic | 53.7 | 75.9 | 67.2 | 34.2 | 79.2 | 57.34 | 2.55 |
| MeterRouter ($B=0.005$) | 3-Tier Dynamic | 60.4 | 81.4 | 69.4 | 35.0 | 85.5 | 61.42 | 1.96 |
| Tree Topology | MiniMax-M3 (~428B) | 59.8 | 83.7 | 69.8 | 41.2 | 82.6 | 63.52 | 16.87 |
| Chain Topology | MiniMax-M3 (~428B) | 58.3 | 83.3 | 66.3 | 40.7 | 81.2 | 62.32 | 12.68 |
| CoT Single Agent | gpt-oss-120b | 61.8 | 78.3 | 71.5 | 42.4 | 78.0 | 62.98 | 1.84 |
| Vanilla Single Agent | gpt-oss-20b | 43.6 | 64.4 | 58.5 | 16.0 | 79.0 | 45.18 | 0.14 |
Notably, when model prices change at inference time (e.g., scaling MiniMax-M3 pricing by 0.1x vs 10x), MeterRouter's first-choice selection rate adapts automatically from 92.1% down to 0.0% without retraining.
# Simulate dynamic budget-aware routing across Smoke Monkey Canvas worker tiers
npx @smoke-monkey/harness route --budget 0.005 --max-agents 5 \
--pool "gpt-oss-20b:0.06/0.19,gpt-oss-120b:0.15/0.595,minimax-m3:0.30/1.20"Price-Conditioned Embeddings
Encode log(c_in) and log(c_out) directly inside your router's model embedding z_m so provider price drops immediately shift traffic without re-running RL.
Frequently Asked Questions
Q:How much cheaper is MeterRouter than MasRouter and LLM-Debate?
Across five benchmarks, MeterRouter averages $2.56e-3 per query at 66.72% accuracy—5.5x cheaper than MasRouter (66.80% accuracy) and 4x cheaper than LLM-Debate with gpt-oss-120b (66.70% accuracy), yielding 82% cost savings overall.
Q:How does MeterRouter prevent a multi-agent workflow from exceeding its USD budget?
Before dispatching each agent node, The Meter estimates worst-case input and downstream reader token costs using byte-length heuristics and prompt reserves, masks out unaffordable LLMs, and clamps max_tokens to the remaining balance b_i. Overrun rates stay between 0.00% and 0.02%.
Q:Why does MeterRouter combine SFT with GRPO?
SFT initializes the router by imitating oracle execution DAGs, reaching 57.34% average accuracy, while constrained GRPO refines role, backbone, edge, and termination policies against real execution accuracy and spend, boosting average accuracy by +9.38 points to 66.72%.
Q:Does MeterRouter adapt if an API provider changes token pricing?
Yes. Because each backbone embedding z_m concatenates log input and output prices, multiplying a flagship model's price by 10x shifts MeterRouter's first-choice selection rate from 23.2% to 0.0% zero-shot.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.