Cost Optimization
~10 min readUpdated: November 2026

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

MeterRouter Budget-Aware Dynamic Multi-Agent Routing and GRPO Pareto Frontier

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.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

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.

Key Architectural Takeaways
Quick Implementation Examplemeterrouter-budget-gate.ts
meterrouter-budget-gate.tstypescript
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);
Video Guides

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}$:

  1. Termination $\tau_i$: Decide whether accumulated agent outputs already solve $\mathcal{Q}$.
  2. Role $r_i$: Pick the next functional role (e.g., planner, solver, verifier, coder).
  3. Backbone $m_i$: Choose a model from the filtered affordable subset $\mathcal{M}_i^m$.
  4. 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.5712.70 ± 0.4316.93 ± 0.340.02 ± 0.02
$B = \$5 \times 10^{-3}$91.06 ± 0.245.74 ± 0.127.71 ± 0.240.01 ± 0.02
$B = \$5 \times 10^{-2}$88.25 ± 0.480.03 ± 0.030.08 ± 0.120.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 / TopologyBackbone PoolOmniMath-2MMLU-ProMuSRBBEHMBPP+Avg Acc (%)Avg Cost ($×10⁻³)
MeterRouter ($B=0.05$)3-Tier Dynamic64.283.672.246.886.666.722.56
MeterRouter (w/o RL)3-Tier Dynamic53.775.967.234.279.257.342.55
MeterRouter ($B=0.005$)3-Tier Dynamic60.481.469.435.085.561.421.96
Tree TopologyMiniMax-M3 (~428B)59.883.769.841.282.663.5216.87
Chain TopologyMiniMax-M3 (~428B)58.383.366.340.781.262.3212.68
CoT Single Agentgpt-oss-120b61.878.371.542.478.062.981.84
Vanilla Single Agentgpt-oss-20b43.664.458.516.079.045.180.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.

bash
# 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.

Google Search Questions & Answers

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 guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness