Robots Atlas>ROBOTS ATLAS
ACRouter
Active

ACRouter

ACRouter (Agent-as-a-Router) is an open-source (MIT), academic implementation of an agentic AI model router for coding tasks. The system dynamically routes a single task to one of several backend LLMs (e.g. cheap model → verifier → escalation to a stronger model), optimising the Pareto curve between response quality and inference cost. Source code is publicly available on GitHub at LanceZPF/agent-as-a-router (507 stars as of July 13, 2026).

Architecture: the ACRouter class (module acrouter_repro.inference) takes a candidate list, cheap chains, an escalation model (escalate_to), and a k parameter (attempts per stage). For each task: (1) calls the cheap model, (2) runs a user-supplied verifier (e.g. unit tests, execution checks), (3) on failure — escalates to a stronger model. The decision returns as a Decision(chosen_model, final_response) object. The system was benchmarked on CodeRouterBench: 9,999 in-distribution tasks × 8 models + 176 harder OOD (results: OOD176 AvgPerf=73.30 at $Total=86.72).

Runtime integrations: two ready-to-adapt adapters for popular Claude Code and Codex routing tools ship out of the box — claude-code-router (gateway-level routing, before dispatching to the chosen backend) and cc-switch (proxy-level routing, before static provider mapping). The repo also contains two router demos — api_coding_solver (via OpenRouter/OpenAI-compatible) and commercial_cli_router (for local Codex, Claude Code, Opencode).

Auxiliary assets on HuggingFace: dataset Lance1573/CodeRouterBench (benchmark), model Lance1573/acrouter-qwen35-08b-router-lora (optional router LoRA on Qwen3.5 0.8B). Requirements: Python 3.11, offline replay needs no API keys or live model calls.

Publication: Zhou et al., Agent-as-a-Router: Agentic Model Routing for Coding Tasks, arXiv:2606.22902 (2026). Authors: Pengfei Zhou (lead), Zhiwei Tang, Yixing Ma, Jiasheng Tang, Yizeng Han, Zhenglin Wan, Fanqing Meng, Wei Wang, Bohan Zhuang, Wangbo Zhao, Yang You. Homepage: omnisource.cn/agent-as-a-router. License: MIT.

SDKCLIPluginFree
Released 1 Jun 2026Updated 13 Jul 2026Global

Overview

System type
Input
TextStructured dataDocuments
Output
TextCodeStructured data

Access & Pricing

PUBLIC
Access channels
SDK
Developer library for embedding the AI system in other applications.
CLI
Access via command-line interface.
Plugin
Plugin for another application or platform (e.g. Figma, Slack, Notion).
Availability scope
Global

Open-source academic project (MIT license) — full code, benchmark, and pretrained router LoRA are publicly available with no regional restrictions. Offline benchmark replay requires no API keys.

Subscription model
Free
Pricing
Updated 13 Jul 2026Official pricing

The system is free and open source (MIT). Inference costs are paid by the user at chosen backend LLM providers (OpenRouter, OpenAI, Anthropic, local models). The router itself charges nothing.

Other
Free MIT license — no charge for the software itself. Backend inference costs are billed separately by the chosen providers.
standardflat$0—$0

Capabilities

2 capabilities
Agency & Action
Task Specialization

Integrations

Product features

Security & Enterprise

Audit Logs
The `outputs/` directory stores complete router decisions, model calls, and verifier results per task — auditable replay.
Private Networking
The router can run entirely locally with local LLM backends (Ollama, llama.cpp) — no external API calls required.

Academic project without formal enterprise certifications. All data is processed locally by the user; the router does not send any information beyond user-selected backend providers. Source code fully auditable (MIT).

Notes
Upd. 13 Jul 2026

The `scripts/check_no_secrets.sh` script verifies that no hardcoded secrets are present in the code. Requires Python 3.11; optional sandboxing via Docker/Apptainer (see `requirements-sandbox.txt`).

Sources

5 sources
GitHub — LanceZPF/agent-as-a-router
RepositoryFetched: 13 Jul 2026
ACRouter — homepage (omnisource.cn)
Official siteFetched: 13 Jul 2026
CodeRouterBench dataset — HuggingFace
DocumentationFetched: 13 Jul 2026
ACRouter router LoRA — HuggingFace
DocumentationFetched: 13 Jul 2026