Agent-as-a-Router: Agentic Model Routing for Coding Tasks
On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks
Abstract (arXiv)
Real-world users typically have access to multiple Large Language Models (LLMs) from different providers, and these LLMs often excel at distinct domains, yet none dominate all. Consequently, routing each task to the most suitable model becomes critical for both performance and cost. Existing routers treat this as a static, one-off classification problem. However, we identify the performance bottleneck for these routers as information deficit: simply augmenting a vanilla LLM router with performance statistics at the task-dimension level yields a 15.3% relative gain, surpassing a heuristic router built on the same dimension-level priors. Motivated by this finding, we propose Agent-as-a-Router, a framework that formalizes routing as a C-A-F loop (Context->Action->Feedback->Context). It closes the information gap by accumulating execution-grounded experience during deployment. We instantiate this framework as ACRouter, composed of an Orchestrator, a Verifier, a Memory module, and introduce CodeRouterBench, an evaluation environment comprising ~10K task instances with verified scores from 8 frontier LLMs, enabling regret-based router comparison on streaming tasks. Experiments show that ACRouter achieves the lowest cumulative regret on in-distribution tasks and generalizes to out-of-distribution agentic-programming tasks, demonstrating that our routing framework actively closes the information gap. Codes and benchmarks are released at https://github.com/LanceZPF/agent-as-a-router.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 34 of its 48 references that are in the map. First posted on arXiv 22 Jun 2026.
Builds on
34 of 48 references.
Closest ancestors · 2
Same direction, newest first
- 2025MasRouter: Learning to Route LLMs for Multi-Agent Systems16 Feb
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework1 Aug
Other references · 32
- 2025Qwen3 Technical Reportcited by 8,820
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
- 2023ChatDev: Communicative Agents for Software Developmentcited by 919
- 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 682
20 more
- 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 587
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
- 2026Kimi K2.5: Visual Agentic Intelligencecited by 501
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 452
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 421
- 2024Hybrid LLM: Cost-Efficient and Quality-Aware Query Routingcited by 372
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2023Large Language Model Routing with Benchmark Datasetscited by 172
- 2023AutoMix: Automatically Mixing Language Modelscited by 125
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 108
- 2023Fly-Swat or Cannon? Cost-Effective Language Model Choice via Meta-Modelingcited by 95
- 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 48
- 2026LLMRouterBench: A Massive Benchmark and Unified Framework for LLM Routingcited by 38
- 2026FeatureBench: Benchmarking Agentic Coding for Complex Feature Developmentcited by 34
- 2026LongCLI-Bench: A Preliminary Benchmark and Study for Long-horizon Agentic Programming in Command-Line Interfacescited by 34
- 2026SWE-CI: Evaluating Agent Capabilities in Maintaining Codebases via Continuous Integrationcited by 23
- 2026Composer 2 Technical Reportcited by 22
- 2026Adaptive Vision-Language Model Routing for Computer Use Agentscited by 8
- 2026LLM Router: Rethinking Routing with Prefill Activationscited by 5
Built on by
Citing papers per year: 2026: 10.
10 papers.
- 2026Agentic Routing: The Harness-Native Data Flywheelcited by 4
- 2026TRACE-ROUTER: Task-Consistent and Adaptive Online Routing for Agentic AIcited by 1
- 2026Unified Hallucination Fuzzing for Multimodal Large Language Modelscited by 1
- 2026RSI-Router: Evolving Subtask-Level LLM Routing and Skills for Cost-Efficient Agentscited by 1
- 2026Improving Generalization Robustness of Multimodal RLVRcited by 0
- 2026SCOPE-Router: Cost-Aware Open-Set VLM Routing for Execution-Oriented Taskscited by 0
- 2026Beyond One-Size-Fits-All: Sample-Adaptive Strategy Routing for Vision Token Pruning in MLLMscited by 0
- 2026HM-ROUTER: Joint Model and Harness Routing for Agentic Systemscited by 0
- 2026Trust the Brand, Lose Control: How Identity Hijacks LLM Agent Orchestrationcited by 0
- 2026What Can Component-Replacement Evidence Establish? A Critical Scoping Review of Local Decisions in LLM Agentscited by 0
- 2026What Can Component-Replacement Evidence Establish? A Critical Scoping Review of Local Decisions in LLM Agents30 Sep 2026
- 2026RSI-Router: Evolving Subtask-Level LLM Routing and Skills for Cost-Efficient Agents28 Sep 2026
- 2026Trust the Brand, Lose Control: How Identity Hijacks LLM Agent Orchestration26 Sep 2026
- 2026HM-ROUTER: Joint Model and Harness Routing for Agentic Systems26 Sep 2026
- 2026Beyond One-Size-Fits-All: Sample-Adaptive Strategy Routing for Vision Token Pruning in MLLMs9 Sep 2026
- 2026SCOPE-Router: Cost-Aware Open-Set VLM Routing for Execution-Oriented Tasks12 Aug 2026
- 2026Improving Generalization Robustness of Multimodal RLVR9 Aug 2026
- 2026TRACE-ROUTER: Task-Consistent and Adaptive Online Routing for Agentic AI24 Jul 2026
- 2026Unified Hallucination Fuzzing for Multimodal Large Language Models15 Jul 2026
- 2026Agentic Routing: The Harness-Native Data Flywheel13 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2026TwinRouterBench: Fast Static and Live Dynamic Evaluation for Realistic Agentic LLM Routing
- 2026AgentRouter: Heterogeneous Model Routing for Cost-Optimal Multi-Step Agentic Workflows
- 2026Runtime Burden Allocation for Structured LLM Routing in Agentic Expert Systems: A Full-Factorial Cross-Backend Methodology
- 2025A Self-Improving Coding Agent
- 2026CASTER: Breaking the Cost-Performance Barrier in Multi-Agent Orchestration via Context-Aware Strategy for Task Efficient Routing
- 2025MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLM
- 2026Learning Agent Routing From Early Experience
- 2026Learning Compositional Meta-Routing for Agentic Workflows: An Executable Benchmark