TL;DR
Teams of collaborating Large Language Models (LLMs) solve complex problems much better than lone models, but their back-and-forth chatter burns through API tokens—especially when every agent runs on a pricey frontier model. MeterRouter acts like a budget-conscious project manager: given a problem and a strict dollar limit, it builds a custom team of heterogeneous AI agents one by one, watching a live spending meter after every step. It matches the accuracy of top-tier multi-agent systems while slashing costs by 82%.
What Problem Does This Paper Address?
Multi-Agent Systems (MAS)—where multiple LLMs take on roles like "Coder," "Critic," or "Verifier" and pass messages to solve a task—consistently beat single-agent setups on tough reasoning and coding benchmarks. However, all that inter-agent communication creates massive token overhead.
Historically, system builders have fallen into two expensive traps:
- Over-provisioning: Assigning a massive, expensive LLM to every role, even when a cheap, lightweight model could easily handle basic sub-tasks.
- Static blueprints: Relying on fixed communication graphs (like chains or debates) or decoupling who talks to whom (topology) from which LLM powers whom (routing).
Furthermore, most existing LLM routers only balance cost and accuracy implicitly using a fixed preference weight. They cannot handle a practical, real-world constraint: "Solve this specific query as accurately as possible, and do not spend more than $0.005."
Methods
Instead of picking a pre-made graph template upfront, MeterRouter synthesizes a custom directed acyclic graph (DAG) on the fly in an interleaved generate–execute loop.
At each step, a lightweight recurrent neural network (built with GRUs and MLPs) looks at the query, the conversation graph so far, and the exact remaining dollar budget, then makes four sequential decisions:
- Termination: Stop and output an answer, or hire another agent?
- Role Selection: Pick an expertise (e.g., Analyst, Bug Fixer).
- Backbone Selection: Assign an LLM from a multi-tier pool (20B, 120B, or ~428B parameters).
- Edge Generation: Decide which previous agents' outputs this new agent should read (since reading long messages costs input tokens!).
What's novel—The Meter: Because you don't know exact token counts until an LLM finishes speaking, MeterRouter executes each agent immediately before planning the next one. To guarantee budget safety, "The Meter" enforces hard constraints from two sides using a conservative byte-based token estimator: it prunes unaffordable LLMs from the action space, and sets a hard max_tokens completion cap on the upcoming API call—even factoring in the downstream cost if a future agent has to read that output!
Two-Stage Training: * Stage 1 (Imitation / SFT): Pre-defined graph templates are run using a mid-tier LLM and scored across various budgets. The router imitates the highest-utility affordable graphs to learn good topologies and roles, keeping LLM selection frozen. * Stage 2 (Group-Relative RL): Using Dr. GRPO, the router generates groups of full execution trajectories for random log-uniform budgets. It optimizes a utility reward that favors correct answers while penalizing spending relative to the budget, teaching it smart LLM allocation and live cost adaptation.
Datasets
No new benchmarks were introduced; the authors split five established public benchmarks into disjoint train, validation, and test sets across three domains:
- General Reasoning: MMLU-Pro, MuSR, and BBEH (Big-Bench Extra Hard).
- Mathematical Reasoning: Omni-MATH-2.
- Code Generation: MBPP+.
Key Insights and Ideas
- Different tasks buy different things with extra money: When given a larger budget on MMLU-Pro, MeterRouter keeps teams tiny (~1.4 agents) and buys smarter brains (upgrading from mid-tier models to the 428B MiniMax-M3). On Omni-MATH-2, it sticks with the mid-tier
gpt-oss-120bmodel 92% of the time and instead buys bigger teams (scaling from ~1.2 to ~3.1 agents) to verify math steps. - Topology beats model routing—but you want both: Ablations show that fixing the graph topology drops accuracy by over 7 percentage points, whereas restricting the router to a single LLM backbone only drops accuracy by ~3.2 points. Dynamic team structure does the heavy lifting; heterogeneous LLM routing seals the efficiency deal.
- Plug-and-play economics: Because model prices are fed directly into the network's embeddings alongside text descriptions, MeterRouter adapts naturally to price shifts. When the price of a favored model was artificially hiked 10×, its selection rate dropped from 92.1% to 0%.
Key Results
Evaluated across a three-tier pool (gpt-oss-20b, gpt-oss-120b, and MiniMax-M3), MeterRouter defines the Pareto frontier across all five benchmarks:
- Top-tier accuracy at a fraction of the price: At a $0.05 budget cap, MeterRouter achieves **66.72%** average accuracy at **$2.56 × 10⁻³ per query. It virtually ties the strongest baseline, MasRouter (66.80%), while costing 82% less ($14.15 × 10⁻³), and beats
gpt-oss-120bLLM-Debate (66.70%) at 4× lower cost**. - Near-perfect budget compliance: Across all tested budgets, queries stayed strictly within budget at least 99.98% of the time.
- RL is essential: Removing Stage 2 RL drops average accuracy from 66.72% down to 57.34% at nearly identical cost.
Limitations and Future Work
- Rare tokenizer overruns: The 0.02% budget overrun rate happens because The Meter uses a single byte-based heuristic to estimate input tokens across all models, whereas each LLM provider uses a different tokenizer. The authors note that running each model's exact tokenizer locally prior to API calls would eliminate overruns completely without changing the framework.
- Inherited model flaws: Because MeterRouter orchestrates frozen, black-box LLMs via external APIs, it remains susceptible to the biases, hallucinations, and privacy considerations of the underlying providers.
Summary updated