03.24Practice
Model routing and agent economics
How AR Labs routes each AI agent task to a model and effort level, when a subagent costs more than it saves, and why quality evidence, not price, decides.
On this page
AR Labs routes each task an AI agent (a language model run in a loop with tools) performs to a model and an effort level chosen by the kind of work, not by the session that happens to launch it. Judgement that ends up in merged code gets the strongest model; extraction and mechanical transforms get cheaper ones; review goes to a model from a different vendor for independence. Before any of that, we ask whether the work needs an agent at all.
The problem it answers
In a harness such as Claude Code's (the harness is everything around the model that shapes what an agent does: the agent program, its instructions, skills, hooks, tools and checks), a subagent launched without a stated model inherits the model of the session that launched it. A lead session usually runs the most capable model, so every unstated launch runs at the top tier, including work that is pure extraction. We found this pattern across the launches written into our own commands and skills. The opposite mistake is as real: a cheaper model making small decisions inside an implementation, where each one ends up in merged code and none is checked one by one.
The decision, step by step
flowchart TD
T["A piece of work"] --> S{"Can a script do it?"}
S -->|"yes"| SC["Script it"]
S -->|"no"| G{"Under about ten tool calls?"}
G -->|"yes"| IN["Do it inline"]
G -->|"no"| IND{"Independent slices?"}
IND -->|"no"| IN
IND -->|"yes"| C["Classify the work"]
C --> M["Name model and effort on every launch"]
M --> D{"Lead verifies every result?"}
D -->|"yes"| DN["May drop one tier"]
D -->|"no"| KP["Keep the default tier"]1. Deterministic first. A link check, a grep sweep, a format conversion or a test-output filter is a script, not an agent. A script is cheaper, faster and gives the same answer every time.
2. Delegate only when it pays. Spawning a subagent costs a brief, a fresh context that has to rediscover what the lead already knows, and a synthesis pass afterwards. If one agent can finish in fewer than about ten tool calls, or the subtasks share state or need a decision part-way, the work stays in the lead session.
3. Assign the model by work class.
| Work class | Model tier | Effort | Examples |
|---|---|---|---|
| Extraction | Smallest | Low | Transcript processing, pulling fields from documents |
| Codebase survey | Mid | Low | Mapping where a function is used, tracing a data flow |
| Research gathering | Strongest | Medium | Web research where the choice of sources is the output |
| Implementation, architecture, design | Strongest | High | Building from a spec, design reasoning |
| Adversarial verification | Strongest | Medium | A fresh agent told to refute each finding |
| Code review | A different vendor's model | Configured by the reviewer | The cross-model review gate |
Every launch states its model and, where the harness supports it, its effort level. Silence means inheritance, and inheritance means the top tier.
4. The supervision discount. A worker may drop one tier when all three of these hold: the lead wrote a tight brief, so the worker executes rather than decides scope; the result will be cross-checked, by triangulation, an adversarial pass or the lead reading the raw output; and a weak result would be visible and re-runnable rather than silently absorbed. The discount never applies to unattended runs, to a single researcher whose choice of sources is the result, or to implementation.
5. Bound the fleet. State the number of agents and each one's slice before launching any. Never "as many as needed". A second, bounded wave against named gaps is better than one oversized first wave. Workers stay leaves: research agents are given no tool for launching further agents, so a fan-out cannot recurse.
6. Executors report, they do not thrash. A worker that is stuck reports what it tried and what blocked it, and the lead re-plans. Silent retries spend tokens on the same wall.
Quality evidence before cost
We kept the strongest model for implementation, architecture and design: the case for moving standard implementation to a mid-tier model rested on cost alone. It cited no comparison of quality, and its evidence about cheaper models came from uncontrolled community reports. These classes run on the strongest available model at high effort, and the mid tier is kept for mechanical transforms, tests and survey fan-outs. A switch would need a comparison on real tasks, not a price table.
Routing to other vendors
We route across vendors for two reasons: independence and capability. Independence is settled practice. Code review runs on a different vendor's model through the Codex CLI, because models from different families make different mistakes, and the author of a change should not be its only judge (see the code review gate). The author of each task's spec can also be chosen per task.
For capability, our method is staged. Try the other model by hand on a few representative tasks first. If it wins repeatedly on one kind of task, wrap it as a single tool the main agent can call. Only when several models win on several kinds of task does a general router earn its complexity, and only sustained multi-turn work justifies running a second harness. Each step is taken on evidence from the one before.
Throughput is not agent count
Our research on software factories found that the limit on how much agent work lands is verification, review and merging, not how many agents run. Adding agents to a pipeline whose review and merge steps are already full adds queue, not output. See multi-agent orchestration.
A worked example
Illustrative example. A lead session must audit 40 pages of documentation for code samples that no longer match an API.
A script first lists every code block that calls the changed function, which narrows 40 pages to 11. The 11 split into three independent groups, so the lead launches three agents, names their slices and the output schema, and assigns the mid tier at low effort, because the brief is tight, each result includes the exact line and quoted sample, and the lead will check every finding against those quotes. The fix pass that edits the pages is implementation and goes to the strongest tier. A final fresh agent, at the strongest tier, is asked to refute each claimed mismatch before anything is changed.
Where it came from
The fleet-size calibration follows Anthropic's account of its multi-agent research system, which found that simple fact-finding needs one agent with a handful of tool calls and comparisons need two to four. The work classes, the supervision discount and the quality-before-cost rule are our own. The briefing format is described under Orchestrate.