# SkillOrchestra: Agent Routing via a Skill Handbook


> **Paper**: *SkillOrchestra: Learning to Route Agents via Skill Transfer* ([arXiv:2602.19672](https://arxiv.org/abs/2602.19672)) · Jiayu Wang et al. (UW-Madison, Salesforce AI Research) · February 2026 · `github.com/jiayuww/SkillOrchestra`

Say you are building a research-assistant agent. A user asks, “Exactly how many days passed between these two historical events?” The system has to look up two dates online, write a bit of Python to compute the gap, and then write up the answer. You have GPT-5, GPT-5-mini, Qwen3-32B and Qwen2.5-Coder-32B on hand. Sending a date lookup to GPT-5 makes the bill ugly; handing the arithmetic to a chatty model invites a wrong answer. Deciding who handles each step is the job of the **orchestrator**, and its judgment sets both the accuracy ceiling and the inference bill of the whole **compound AI system**.

The existing options don't hold up well. A static model router reads the first message and assigns the whole task to one model, so it can't follow how needs change from step to step. An orchestrator trained with reinforcement learning (RL) does decide step by step, but training is expensive, the knowledge is locked inside its weights (change the model pool and you retrain), and it tends toward **routing collapse**: calling the most expensive model almost every time, regardless of difficulty.

SkillOrchestra's fix sounds modest and works remarkably well. It leaves the orchestrator's parameters alone. Instead, it distills a small set of successful and failed execution traces, offline, into a **Skill Handbook** that records “what capability this step needs” separately from “which agent is best and cheapest at it”. At inference time the orchestrator simply consults the handbook, and the same handbook can be carried over to a different orchestrator without retraining.

{{< kpi-grid cols="4" >}}
{{< kpi label="FRAMES accuracy / total cost" value="84.3% / $72.7" tone="emerald" >}}
Beats ToolOrchestra (76.3% / $92.7), and beats using GPT-5, Claude Opus 4.5 or Gemini 3 Pro as the orchestrator.
{{< /kpi >}}
{{< kpi label="Math reasoning vs. Router-R1" value="up to +22.5 pp" tone="blue" >}}
The paper's figure caption, with cost down about 2× (see the experiments section for a gap in this number).
{{< /kpi >}}
{{< kpi label="Cross-orchestrator, no retraining" value="+14.8 to 24.3 pp" tone="amber" >}}
A handbook learned with Qwen2.5-3B, applied as-is to 7B, 8B and Mixtral orchestrators.
{{< /kpi >}}
{{< kpi label="Claimed learning-cost reduction" value="700× / 300×" tone="rose" >}}
Versus Router-R1 and ToolOrchestra respectively; the paper doesn't spell out how these were computed.
{{< /kpi >}}
{{< /kpi-grid >}}

Below we first pin down why multi-turn routing is hard and how bad routing collapse gets, then open up the handbook, how it is learned offline and used online, and finally go through the numbers, the limitations, and the engineering principles you can take back to your own system.

---

## Why multi-turn routing is hard

### Every step is really two decisions

Let's state the problem precisely. A user instruction \(q\) triggers an interaction trajectory of at most \(T\) turns, \(\tau = (s_0, a_0, z_0, o_0, \ldots, s_T)\). The state \(s_t\) at step \(t\) holds the original question plus the interaction history so far. Picking the action \(a_t\) from every “model × tool” combination would blow up the search space, so the paper splits it into two levels, \(a_t = (\psi_t, A_t)\):

1. **Decide what to do: pick an operational mode** (\(\pi_{\text{mode}}\)). Based on \(s_t\), the orchestrator chooses an **operational mode** \(\psi_t \in \Psi\): retrieve information (search), write and run code (code), or put together the answer (answer).
2. **Decide who does it: pick an agent** (\(\pi_{\text{route}}\)). In the paper an **agent** is a pair of “backbone model + tool subset”, \(A = (m, T_A)\). Once the mode is set, the orchestrator picks an executor from the agents valid for that mode, \(\mathcal{A}_{\psi_t}\). The agent produces an execution trace \(z_t\), and the system receives an observation \(o_t\).

The extra mode layer earns its keep for three practical reasons:

- **It narrows tools, models and skills in one move.** Once the mode is chosen, the toolset \(T_\psi\), the candidate model pool \(M_\psi\) and the skill subset \(\Sigma_\psi\) to consult in the handbook all shrink together. Enter code mode and only coding skills matter; retrieval skills drop out entirely, which removes a lot of noise from the orchestrator's reasoning.
- **The same model behaves and costs very differently across modes.** SkillOrchestra keeps a separate agent profile per mode. GPT-5 in search mode is expensive and not necessarily more accurate than open models, yet in answer mode it is the workhorse for hard reasoning. Only with a mode layer can you estimate each model's real win rate and cost per stage.
- **It gives “time to switch stages” a place to live.** Many multi-turn failures aren't about picking the wrong model; they come from not switching stages when you should. With an explicit mode layer, cross-stage lessons such as “with multi-step arithmetic or several date gaps, switch to code right away instead of continuing to search” can be recorded on their own.

### “search” means different things in the two experiments

The paper validates the same method in two quite different settings. The most common stumble on first read: the pure model-routing experiment has no search engine, so why does it have a search mode? Because it keeps the label used by the Router-R1 baseline, where search means “ask the external model pool”, not web search.

| Setting | search mode | code mode | answer mode |
|---|---|---|---|
| **Experiment 1: multi-turn model routing** (no external tools, aligned with Router-R1; orchestrator Qwen2.5-3B, up to 4 turns) | **Not web search**: calls external LLMs in the pool (Qwen2.5-7B, Llama-3.1-8B/70B, Mistral-7B, Mixtral-8x22B, Gemma-2-27B) to solve subtasks or supply knowledge | Not present | The orchestrator combines earlier results and answers; for easy questions it can skip search entirely and answer with zero external calls |
| **Experiment 2: full agent orchestration** (FRAMES, aligned with ToolOrchestra; orchestrator Qwen3-8B, up to 50 turns) | Tools: WebSearch (Tavily), LocalSearch (FAISS + Qwen3-Embedding-8B); models: GPT-5, GPT-5-mini, Qwen3-32B | Tools: PythonExec sandbox; models: GPT-5, GPT-5-mini, Qwen2.5-Coder-32B | No external tools; models: GPT-5, GPT-5-mini, Llama-3.3-70B, Qwen3-32B, Qwen2.5-Math-72B, Qwen2.5-Math-7B |

### Where the two existing approaches get stuck

**Static model routers** such as FrugalGPT, RouteLLM, RouterDC and GraphRouter use classifiers, similarity or cascades to decide once, the moment a query arrives. That bakes in the assumption that one model can handle the whole task. Once a task alternates between retrieval, coding and multi-step verification, query-level routing breaks down.

**End-to-end RL orchestrators** such as **Router-R1** (PPO on 14,000 samples) and **ToolOrchestra** (GRPO) do make multi-turn decisions, at the price of burning many interaction traces and a lot of compute. The routing knowledge sits implicitly in the weights, so adding one model to the pool means retraining. Worse, they collapse, and the paper's numbers are stark:

{{< compare >}}
{{< compare-item title="Router-R1 (PPO) · multi-turn model routing" tone="rose" >}}
**98.02%** of calls go to Llama-3.1-70B. The other five options sit almost idle at no more than 0.92% each; the option meaning “the Qwen2.5-3B orchestrator answers itself” gets 0.00% (in Experiment 1, answering itself counts as a routing option), and Mixtral-8x22B gets 0.04%.
{{< /compare-item >}}
{{< compare-item title="ToolOrchestra (GRPO) · full agent orchestration" tone="rose" >}}
**99.7%** of search calls go to GPT-5-mini and **97.9%** of answer calls go to GPT-5, even though cheaper, capable options such as Qwen3-32B and math-specialist models are in the pool.
{{< /compare-item >}}
{{< /compare >}}

The three approaches side by side:

| Approach | Representative methods | Decision granularity | How capability is modeled | Bottleneck or strength |
|---|---|---|---|---|
| Static routing | FrugalGPT, RouteLLM, RouterDC, GraphRouter | Single shot, decided when the query arrives | Input features mapped directly to a model | Can't follow multi-turn state or tool switching |
| End-to-end RL | Router-R1 (PPO), ToolOrchestra (GRPO) | Multi-turn, decided per state | Implicit in the orchestrator's weights | Costly training, hard to extend the pool, prone to collapse |
| **SkillOrchestra** | This paper | Multi-turn, mode first, then skill-based routing | Explicit external **Skill Handbook** | Decouples capability from identity, cheap on data, balanced routing, transfers across backbones |

---

## The core idea: write routing knowledge down as a handbook

The system runs in three stages. On the left, offline learning grows a global handbook \(H^*\) from execution traces; in the middle, Pareto selection picks a base subset \(H_{\text{base}}^{(O)}\) with just the right granularity for a given orchestrator; on the right is the four-step loop run at every turn during inference.

{{< diagram desktop="diagrams/diagram-01-desktop.svg" mobile="diagrams/diagram-01-mobile.svg" caption="Figure 1 | SkillOrchestra in three stages: offline learning → Pareto selection → the online four-step loop. (Drawn by this site from the paper)" >}}

The column worth remembering is the middle one: finer is not always better. The handbook should be cut at a granularity the target orchestrator can actually digest, and that idea comes back several times.

### What the handbook looks like

The handbook is not an opaque set of parameters. Underneath it is a graph \(G_H = (V_\Psi \cup V_\Sigma \cup V_P, E)\) whose three node types are mode-selection insights, the skill registry and agent profiles. The edges \(E\) build a mode-to-skill index \(M: \Psi \to 2^\Sigma\), so once a mode is chosen the system jumps straight to that mode's skills \(\Sigma_\psi := M(\psi)\) without scanning the whole library. At inference time the chosen subgraph is serialized into **structured Markdown text** and dropped straight into the orchestrator's system prompt.

In size, a freshly learned global handbook \(H^*\) can hold over a hundred fine-grained skills; the example in the paper's Figure 3 has 98 for search, 43 for code and 65 for answer. After Pareto selection trims it, the appendix examples show roughly 3.5 pages of prompt text for the AMC math task and 7 to 8 pages for the multi-tool FRAMES task.

The paper's Figure 4 lays out a learned handbook with its three components side by side:

{{< image src="fig4-handbook.png" alt="A learned skill handbook: mode-level switching insights on the left, a hierarchical skill registry in the middle, per-mode agent profiles on the right" caption="Figure 2 | A learned skill handbook, recording “what capability is needed” separately from “which agent to send”. (Original paper Figure 4)" >}}

The way to read it is by what each column answers. The left column answers “which mode should I be in now?”, the middle “what capability does this mode need?”, and the right “who is good at that capability, and what does it cost?”. Every routing decision is a left-to-right lookup.

**Component 1: mode-selection insights (\(V_\Psi\)).** Stored as \(R_\psi\), these are rules for switching between modes, with evidence question IDs and a confidence score. The paper's example:

```text
Insight ID: 4f49b05a | Confidence: 0.9
Usage: [✓ Coding] [✗ Search] [✗ Answer]
Rule: For multi-step calculations or multiple dates/time spans,
      switch to coding instead of search mode.
Evidence: qid_1, qid_4 ...
```

**Component 2: the skill registry (\(V_\Sigma\)).** Capabilities each mode needs, organized as a hierarchy. Each skill is defined as \(\sigma \equiv (D, I)\): \(D\) is a natural-language description and \(I\) is a set of contextual indicators (keywords, structural features of the question), plus example questions:

```text
Skill: Coding.data_processing.symbolic_logic
Description: Implement rule-based or constraint-based reasoning
             programmatically over structured entities and relations.
Indicators:
  • Explicit logical or relational constraints (e.g., ordering, equivalence)
  • Structured inputs that can be encoded as rules, graphs, or tables
Examples: qid_3, qid_5, qid_8
```

The skill name is itself a hierarchical path (mode → category → sub-skill), and that hierarchy matters later when granularity is chosen.

**Component 3: agent profiles (\(V_P\)).** For “agent \(A\) in mode \(\psi\)”, the profile records four things:

$$
P_{A,\psi} = \left(\{\phi_{A,\sigma}\},\ \hat{C}_A(\psi),\ R_{A,\psi},\ \Gamma_A\right)
$$

\(\phi_{A,\sigma}\) is the estimated win rate per skill, \(\hat{C}_A(\psi)\) the estimated cost in this mode, \(R_{A,\psi}\) mode-specific routing signals, and \(\Gamma_A\) a strengths-and-weaknesses summary. Here is what actually goes into the prompt (Mixtral-8x22B on AMC, plus the cost tiers):

```text
### Mixtral-8x22B-Instruct
Overall: 20% success (4/20)
Skill scores:
- Pell-type equations: 100%
- Rational/linear manipulation: 50%
- Logarithm/exponent identities: 50%
- Constrained pairing/matching: 0%
Strengths: algebra.logs_and_exponents, general algebraic manipulation
Weaknesses: combinatorics.constrained_pairing_matching

## Cost Tiers (cheapest to most expensive)
Cheap: Qwen2.5-7B, LLAMA-3.1-8B, Mistral-7B
Medium: Gemma-2-27B
Expensive: LLAMA-3.1-70B, Mixtral-8x22B
```

A FRAMES profile adds cost statistics, so all four fields are visible:

```text
### Coder: GPT-5 (Python env.)
Skill Perf. est.:
- data_processing: 40% | symbolic_logic: 30%

Agent Routing Insights (R_A,ψ):
- Use when requiring exact time differences & multiple time spans
- Avoid when primary need is new information retrieval

Pros & Cons (Γ_A):
+ Reliable constraint verification
- Longer latency; over-structuring simple reasoning tasks

Est. Cost (Ĉ_A(ψ)):
- Avg. Completion Tokens: 2,580
- Avg. Latency: 4.2s | Total Avg Cost: 0.20 USD
```

Keep Mixtral's “20% (4/20)” in mind: the overall rate rests on 20 questions, and per-skill rates rest on even fewer. We return to this under 〈Limitations and open questions〉.

---

## Offline: growing the handbook from traces

The obvious shortcut is to ask GPT-5 to write a skill list from scratch, and it hits two problems. First, imagined categories are often disconnected from the real capability differences among the models in your pool: if every model has about the same win rate on a skill, that skill tells the router nothing. Second, generated or hand-written lists fill up with paraphrased duplicates that add noise. So SkillOrchestra insists on **inferring skills from real success-versus-failure traces**, then refining and selecting with statistics, in three steps.

### Step 1: discovery and profiling

Offline learning needs very little data. By default the paper samples fewer than 50 questions per dataset (\(k < 50\)) into a discovery set \(D_{\text{train}} = \{(q_i, B_i)\}\).

The key detail: the system does not send each question to an external model for a single turn. **The base orchestrator, with no handbook yet, still drives the whole multi-turn trajectory** (naturally moving among search, code and answer), and within a given mode it **reruns the step with different candidate agents in turn**. Each question thus accumulates a contrast set \(B_i\) holding both successful traces \(\tau^+_\psi\) and failed traces \(\tau^-_\psi\).

Because every trace is a full multi-turn interaction, the Discoverer can extract two levels of knowledge from the same contrast set:

| Knowledge produced | What is compared | Analysis and output |
|---|---|---|
| Fine-grained skills | **Within one mode**, the success/failure difference between agents, \(D_{\text{diff}}(\tau^+_\psi \parallel \tau^-_\psi)\) | “Both entered code mode; why did A pass and B fail?” The LLM discoverer abstracts the missing capability into a new skill (e.g. `code.math.date_calculation`) in the registry |
| Mode-selection insights | **Across modes**, the outcome of different switching paths | “Why did this trace stall in search while the other recovered by switching to code?” Recurring switches, systematic failures and recoveries are distilled into \(R_\psi\) |

Discovery also builds a report card for every agent. For each agent \(A\), mode \(\psi\) and skill \(\sigma \in \Sigma_\psi\), the success probability is modeled as a Beta distribution \(\phi_{A,\sigma} \sim \text{Beta}(\alpha_{A,\sigma}, \beta_{A,\sigma})\). Intuitively \(\alpha\) counts wins and \(\beta\) counts losses, and both go up with each batch of contrast traces:

$$
\alpha_{A,\sigma}^{(t+1)} \leftarrow \alpha_{A,\sigma}^{(t)} + \sum_{\tau \in B_i} \mathbb{I}[A \text{ succeeds on } \sigma \text{ in } \tau]
$$

$$
\beta_{A,\sigma}^{(t+1)} \leftarrow \beta_{A,\sigma}^{(t)} + \sum_{\tau \in B_i} \mathbb{I}[A \text{ fails on } \sigma \text{ in } \tau]
$$

\(\mathbb{I}[\cdot]\) is the indicator function: 1 when the condition holds, 0 otherwise. Average tokens, latency and cost per agent are tracked at the same time.

A quick worked example (illustrative numbers): the discovery set has 5 date-arithmetic questions that cross a leap year. Agent A wins 4 and loses 1 (\(\alpha = 4, \beta = 1\)), for a mean win rate of \(4 / (4 + 1) = 80\%\). Agent B wins 1 and loses 4, only \(1 / (1 + 4) = 20\%\). From then on, date arithmetic leans toward A.

{{< admonition type="info" title="Details the paper leaves out" >}}
The paper doesn't disclose how the \((\alpha, \beta)\) priors are initialized, whether discovery exhaustively tries every agent in the pool, the prompt template used to distill mode-selection insights, or how a score like Confidence 0.9 is computed. It also doesn't say how the base orchestrator chooses modes before any handbook exists; since the no-handbook ablation (No HB) still runs end to end, a reasonable inference is that the base orchestrator makes multi-turn mode decisions from its system instructions alone.
{{< /admonition >}}

### Step 2: statistical refinement

A freshly grown handbook is messy: some skills are too broad, others are paraphrased duplicates. The system periodically scans the win-rate statistics in the agent profiles, flags anomalies, and hands them to an **LLM Reflector (GPT-5 in the paper)** that rewrites skill definitions and updates \((\alpha, \beta)\) accordingly, producing a clean global handbook \(H^*\). Refinement goes in two directions:

- **Split skills that are too coarse.** If one agent shows **high variance** across the questions under a skill, the skill is mixing several capabilities. For example, among 10 geometry questions Qwen2.5-7B gets all 5 “3D vector dot product” questions right (5/5) and all 5 “2D circle tangency” questions wrong (0/5). Combined it looks like 50%, but these are two unrelated abilities, so the skill is split in two.
- **Merge redundant skills.** If, for two skills \((\sigma_i, \sigma_j)\), the win-rate distributions of all candidate agents show **no statistically significant difference** (say every model scores about the same on `date_lookup` and `event_year`), keeping both adds no routing signal, so they are merged along with their statistics.

The paper doesn't disclose the variance threshold that triggers a split or the significance threshold for merging.

### Step 3: Pareto selection to match the orchestrator

First, what “Pareto” means here. With two goals, accuracy and cost, a **Pareto-optimal** choice is one where no other option is both more accurate and cheaper; together these choices form the **Pareto frontier**. In practice the paper folds the two goals into one score with a weight \(\lambda\), as the formula below shows.

Behind this step is the paper's most instructive finding: **finer skills are not always better; the best granularity depends on the orchestrator's reasoning ability.**

Fine-grained skills only help if the orchestrator can tell which sub-skill the current situation belongs to. Take `symbolic_logic` versus `numerical_approximation` under code mode. A strong model separates them easily, but a small orchestrator like Qwen2.5-3B readily mistakes “verify logical constraints” for “numerical approximation”, looks up the wrong win-rate table, sends the task to a model that only does numerics, and ends up worse end to end. With a coarser `data_processing` skill the small model rarely misjudges, and routing gets more stable.

So the system cuts \(K\) candidate subgraphs of different granularity from \(H^*\), \(H^{(1)}, \ldots, H^{(K)} \subseteq H^*\). There aren't always exactly three; the paper doesn't give \(K\) or the cutting algorithm, and a reasonable guess is truncating the skill hierarchy at different depths or keeping snapshots from different points of refinement. Each candidate is installed on the target orchestrator \(O\) and run on full multi-turn trajectories over a held-out validation set \(D_{\text{val}}\) (again \(k < 50\) per dataset). The winner, the orchestrator's **base subset**, maximizes:

$$
H_{\text{base}}^{(O)} = \arg\max_{H \subseteq H^*} \ \mathbb{E}_{q \sim D_{\text{val}}} \left[ R(\tau_H(q)) - \lambda \sum_{t=0}^{|\tau_H(q)|} C(\psi_t, A_t) \right]
$$

In plain words: a correct answer scores 1 and a wrong one 0, minus “cost weight × money spent on this question”; average over the validation set and keep the handbook with the highest average.

Two questions, worked through (illustrative numbers): \(D_{\text{val}} = \{q_1, q_2\}\) and \(\lambda = 0.5\), meaning every extra dollar costs half a point. Install candidate \(H^{(2)}\) on the orchestrator:

- **\(q_1\)**: 3 steps (search $0.10 → code $0.20 → answer $0.10), $0.40 in total, answered correctly (\(R = 1\)). Score: \(1 - 0.5 \times 0.40 = 0.80\).
- **\(q_2\)**: 2 steps (search $0.10 → answer $0.10), $0.20 in total, answered wrong (\(R = 0\)). Score: \(0 - 0.5 \times 0.20 = -0.10\).
- **Average**: \((0.80 + (-0.10)) / 2 = 0.35\). Repeat for every candidate and keep the top scorer as \(H_{\text{base}}^{(O)}\).

{{< fold "Symbol cheat sheet (mapped to the two-question example)" "info" >}}
| Symbol | Meaning | In the example |
|---|---|---|
| \(H \subseteq H^*\) | One candidate subset of the global handbook | The candidate under test, \(H^{(2)}\) |
| \(D_{\text{val}}\) | Held-out validation set | \(\{q_1, q_2\}\) |
| \(\tau_H(q)\) | Full trajectory for question \(q\) with handbook \(H\) | \(q_1\)'s search → code → answer |
| \(R(\tau_H(q))\) | Final task reward (0 or 1) | 1 for \(q_1\), 0 for \(q_2\) |
| \(\lvert\tau_H(q)\rvert\) | Number of steps in the trajectory | 3 for \(q_1\), 2 for \(q_2\) |
| \(\sum C(\psi_t, A_t)\) | Cumulative cost of each step's mode and agent | $0.40 for \(q_1\) |
| \(\lambda\) | Accuracy/cost trade-off; larger means more cost-conscious | 0.5 |
| \(\mathbb{E}_{q \sim D_{\text{val}}}[\cdot]\) | Average per-question score over the validation set | \((0.80 - 0.10) / 2 = 0.35\) |
| \(\arg\max\) | Returns the winning handbook, not the score | The winner becomes \(H_{\text{base}}^{(O)}\) |
{{< /fold >}}

You can try this “accuracy minus \(\lambda\) times cost” trade-off yourself with the paper's real ablation numbers. The widget plots each configuration as accuracy against cost; drag \(\lambda\) and watch who comes out on top:

{{< widget name="pareto-explorer" title="Explore the accuracy–cost Pareto trade-off" hint="Switch datasets and drag λ to see who maximizes accuracy − λ × cost" >}}

On the ablation data, the full system wins while \(\lambda\) is below about 0.97; beyond that the cheapest No Selection variant takes over. Switch to the FRAMES main results and SkillOrchestra wins at every \(\lambda\), because it is both the most accurate and the cheapest. One caveat: the paper's actual selection compares candidate handbooks of different granularity; the ablation rows are borrowed here only to make the shape of the objective visible.

---

## Online: what happens when a question arrives

### Step 0: assemble a per-question handbook in two layers

A new query \(q\) doesn't get the hundred-plus skills of \(H^*\) stuffed into its prompt. Think “pocket handbook plus an encyclopedia you consult on demand”:

1. **Layer 1: load \(H_{\text{base}}^{(O)}\).** The resident base subset chosen offline for this orchestrator, at a granularity that matches its ability, so most common question types route reliably.
2. **Layer 2 (optional): add \(N_k(q)\) by semantic retrieval.** If the base subset might miss rare long-tail skills, embed \(q\), retrieve the \(k\) closest skills from \(H^*\) along with their agent profiles, and splice them in to form the per-question handbook \(H_q\).

### The four-step loop at every turn

With \(H_q\) loaded, the multi-turn loop begins. At each step \(t\) the orchestrator:

1. **Mode Selection**: picks the mode \(\psi_t\).
2. **Identify Active Skills**: writes the active skills \(\Sigma_t\) and their weights \(w_{t,\sigma}\) inside a `<skill_analysis>` tag.
3. **Competence-Aware Routing**: consults the agent profiles and scores each candidate.
4. **Execute & Update**: outsources the step, gets the observation back, checks its quality to decide whether to re-route or wrap up, and moves to \(s_{t+1}\).

The intuition for step 3 is “weighted win rate minus cost”: sum each agent's win rates weighted by how much this step needs each skill, then subtract its expected cost in this mode:

$$
A_t^* = \arg\max_{A \in \mathcal{A}_{\psi_t}} \left[ \sum_{\sigma \in \Sigma_t} w_{t,\sigma} \frac{\alpha_{A,\sigma}}{\alpha_{A,\sigma} + \beta_{A,\sigma}} - \lambda_c \cdot \hat{C}_A(\psi_t) \right]
$$

\(\frac{\alpha}{\alpha + \beta}\) is the Beta mean win rate from earlier, and \(\lambda_c\) is the online cost weight. Who does what, and which steps actually cost money (the table splits step 4 into “outsource” and “check the result”, since only the former is paid):

| Step | Who | External model call? |
|---|---|---|
| 1. Read the question and history, pick a mode | Resident small orchestrator (e.g. Qwen2.5-3B) | No |
| 2. Analyze skills and weights (`<skill_analysis>`) | Resident small orchestrator | No |
| 3. Weigh win rate against cost, pick an agent | Resident small orchestrator (see the caveat below) | No |
| 4. Outsource the call (e.g. `<search>Mixtral: ...</search>`) | External expert model + its tools | Yes: an API call that returns an observation |
| 5. Check the result, re-route or wrap up | Resident small orchestrator | No (re-routing goes back to step 4) |

{{< admonition type="warning" title="The formula and the actual prompt don't quite match" >}}
The main text and Algorithm 1 present step 3 as an explicit weighted-minus-cost formula, which reads as if external code parses `<skill_analysis>` and computes scores. But the actual prompts and traces in Appendix D print the win-rate tables and cost tiers straight into the prompt and let the orchestrator LLM weigh them in `<think>` and output a model name. Whether it is purely the LLM approximating the decision from the tables, or external code doing the arithmetic, the paper doesn't say; most likely the prompt asks the orchestrator to approximate this objective.
{{< /admonition >}}

### Walking through one FRAMES question

Back to the opening question, “exactly how many days between event A and event B?” Here is a schematic of how the Qwen3-8B orchestrator handles this kind of task over three turns:

{{< diagram desktop="diagrams/diagram-02-desktop.svg" mobile="diagrams/diagram-02-mobile.svg" caption="Figure 3 | A schematic FRAMES run: look up two event dates, then write code to count the days. (Drawn by this site from the paper)" >}}

1. **Turn 1, search.** Tools narrowed to WebSearch and LocalSearch, three candidate models; active skills `date_lookup` (70%) and `entity_lookup` (30%). Qwen3-32B has 100% on both and is the cheapest ($0.8 per million tokens), so it looks up both dates; the state becomes \(s_1\).
2. **Turn 2, code.** “Two dates, need the gap” fires insight 4f49b05a, and PythonExec is locked in. The active skill is `code.math.date_calculation` (100%). Qwen2.5-Coder-32B has a 100% win rate versus GPT-5's 60% and costs less, so it computes the day count with `datetime` in the sandbox.
3. **Turn 3, answer.** No external tools and six candidate answer models; the pick is split by difficulty and cost (not GPT-5 by default), and the final answer is assembled.

One question exercises all three components: a mode-selection insight triggers the switch to code, the skill registry supplies the skill names, and the agent profiles supply win rates and costs to compare.

### Three real traces from the appendix

The appendix includes three real traces from Experiment 1 (orchestrator Qwen2.5-3B), each showing a different routing behavior. Step through all four cases below, turn by turn; on turns with skill weights, drag the weight to see the weighted win rates recompute:

{{< widget name="routing-trace" title="Step through the orchestrator's routing, turn by turn" hint="Switch cases and step through turns; drag the weight slider on two-skill turns" >}}

**Case 1: multi-turn error correction (AMC complex numbers).** How many complex numbers satisfy \(z^5 = \bar{z}\)? In turn 1 the orchestrator splits the need into “exponent and log identities (70%)” and “rational/linear manipulation (30%)”. Mixtral-8x22B has 50% on both, so 50% weighted; Gemma-2-27B has 0% and 25%, only \(0.7 \times 0\% + 0.3 \times 25\% = 7.5\%\). Mixtral goes first. It derives the polar solution \(\theta = k\pi/3\) but forgets to restrict \(\theta \in [0, 2\pi)\) and answers “infinitely many”. The orchestrator catches the counting gap, escalates to Llama-3.1-70B in turn 2, which confirms 6 solutions for \(k = 0, \ldots, 5\) plus \(z = 0\), and the final answer is 7.

**Case 2: zero external calls (AMC geometry).** What is the ratio of the circumcircle areas of the 3-4-5 and 5-12-13 right triangles? With the full handbook available, the orchestrator decides it can handle this alone: the hypotenuse is the circumcircle's diameter, so the radii are \(5/2\) and \(13/2\) and the area ratio is \(25/169\). It skips every `<search>`, works it out in `<think>`, and outputs `<answer>194</answer>` (\(25 + 169 = 194\); the problem presumably asks for the sum of numerator and denominator in lowest terms). External calls are optional, not mandatory, and an easy question can save 100% of external API cost.

**Case 3: recovering from noise and cross-checking (PopQA).** Who composed “It's Going to Take Some Time”? Turn 1 tries the cheap Qwen2.5-7B, which hallucinates badly (claiming the song is from the musical *The Wedding Singer*) amid a lot of repetition. Turn 2 switches to Llama-3.1-70B, which says the song was written by Toni Stern and Carole King but isn't sure who the composer is. Turn 3 sends it to Mixtral-8x22B to cross-check, and only in turn 4 does the orchestrator commit to Carole King.

Taken together, the orchestrator does more than pick the top score from a table: it escalates after a wrong answer, handles easy questions itself, and seeks a second opinion when an answer looks shaky.

Finally, how the offline artifacts map to the online steps:

| Offline stage | Output | How it is used online |
|---|---|---|
| Discovery and profiling | Mode-selection insights \(R_\psi\), fine-grained skills, Beta win rates \((\alpha, \beta)\), costs \(\hat{C}_A\) | Online step 1 switches mode by insight; step 2 assigns skill weights; step 3 compares win rate and cost |
| Statistical refinement | Clean global handbook \(H^*\) after splits and merges | Keeps duplicates from confusing the orchestrator, and serves as the encyclopedia for online step 0's retrieval \(N_k(q)\) |
| Pareto selection | Base subset \(H_{\text{base}}^{(O)}\) matched to the orchestrator | Resident prompt content that keeps a small model from misjudging overly fine skills |

---

## Results and a critical read

### Metrics, and why cheap tokens don't mean a cheap bill

Experiment 1 covers 7 general and multi-hop QA datasets plus math reasoning on MATH and AMC23, scored by **Exact Match (EM)** and total inference cost in cents. Experiment 2 uses GPT-5-mini as the judge for accuracy on FRAMES and reports total system cost in dollars.

The paper makes a point that is easy to miss: **a low per-token price does not mean a low total cost.** Total cost is price × generation length × number of steps. Cheap small models often lack the reasoning ability, so they produce long, useless chains of thought or retry repeatedly and burn more money. SkillOrchestra weighs total cost explicitly, which is how it raises accuracy and lowers the bill at once.

### Main results: more accurate and cheaper

Router-R1 and SkillOrchestra both use Qwen2.5-3B as the orchestrator; SkillOrchestra+ runs the same handbook on a stronger orchestrator backbone (which one isn't stated in the material we have):

| Setting | Method | Accuracy (%) | Total cost | Reading |
|---|---|---|---|---|
| 7 QA datasets, avg. (EM) | Router-R1 (PPO) | 41.6 | 51.8¢ | 98.02% of calls collapse onto Llama-3.1-70B |
| 7 QA datasets, avg. (EM) | SkillOrchestra | 47.4 (+5.8) | 38.4¢ | Same Qwen2.5-3B orchestrator, more accurate and cheaper |
| 7 QA datasets, avg. (EM) | SkillOrchestra+ | 51.6 (+10.0) | 41.6¢ | Same handbook on a stronger orchestrator, on the Pareto frontier |
| MATH / AMC23 | Router-R1 | 55.8 / 25.0 | 6.5¢ / 1.6¢ | |
| MATH / AMC23 | SkillOrchestra | 73.6 / 52.5 | 3.6¢ / 0.5¢ | Large lead in math reasoning |

The math gap is large enough that the paper gives it its own chart:

{{< image src="fig5-math-vs-router-r1.png" alt="Bar chart comparing accuracy and inference cost of SkillOrchestra and Router-R1 on math reasoning" caption="Figure 4 | Accuracy and cost of SkillOrchestra versus Router-R1 on math reasoning. (Original paper Figure 5)" width="560px" >}}

The caption says “up to a 22.5 percentage-point improvement in accuracy while reducing inference cost by about 2×”. Subtracting the table's numbers, though, gives +17.8 points on MATH and +27.5 on AMC23, and neither is 22.5. Cost comes out at about 55% (3.6 vs. 6.5) and 31% (0.5 vs. 1.6) of Router-R1's, consistent with “about 2×”. Which dataset or average the 22.5 refers to can't be confirmed from what we have, so if you quote it, quote the gap too.

Now full agent orchestration. The paper's very first figure plots accuracy against cost for both experiments:

{{< image src="fig1-pareto.png" alt="Accuracy-versus-cost scatter plots for both experiments, with SkillOrchestra and SkillOrchestra+ on the upper-left Pareto frontier" caption="Figure 5 | Performance–cost trade-off in multi-turn model routing (left) and agent orchestration (right); SkillOrchestra sits on the Pareto frontier. (Original paper Figure 1)" >}}

Upper left is better (more accurate, cheaper). SkillOrchestra sits on the Pareto frontier: at its cost level, no other method is both more accurate and cheaper. The FRAMES numbers:

| Method | Accuracy (%) | Total cost ($) | Reading |
|---|---|---|---|
| ToolOrchestra (GRPO) | 76.3 | 92.7 | search 99.7% GPT-5-mini; answer 97.9% GPT-5 |
| GPT-5 (single-model orchestrator) | 74.6 | 120.4 | A big model brute-forcing many turns; poor value |
| Claude Opus 4.5 | 77.9 | 758.1 | More than ten times SkillOrchestra's cost |
| Gemini 3 Pro | 78.9 | 1729.3 | Long multi-turn token bills add up fast |
| **SkillOrchestra (Qwen3-8B)** | **84.3 (+8.0)** | **72.7 (−21.6%)** | Most accurate and cheapest |

An 8B open orchestrator with a handbook beats Gemini 3 Pro by 5.4 points at about 4% of its cost. The +8.0 and −21.6% are relative to ToolOrchestra: \(84.3 - 76.3 = 8.0\) and \((92.7 - 72.7) / 92.7 \approx 21.6\%\).

### Routing distribution: no more betting on one model

To confirm SkillOrchestra actually divides the work, rather than collapsing onto a different model, look at the call distribution. The paper puts it in the same figure as cross-orchestrator transfer:

{{< image src="fig6-routing-transfer.png" alt="Left: model call distributions of Router-R1 and SkillOrchestra, with Router-R1 almost entirely on Llama-3.1-70B; right: accuracy gains when the same handbook is applied to different orchestrator backbones" caption="Figure 6 | Skill-based orchestration mitigates routing collapse (left) and transfers across orchestrators (right). (Original paper Figure 6)" >}}

The left half is Experiment 1: Mixtral-8x22B 44.53%, Qwen2.5-7B 25.99%, Llama-3.1-70B 15.38%, 11.50% answered by the Qwen2.5-3B orchestrator itself, and the remaining ~2.6% spread over other models. Next to Router-R1's 98.02% on Llama-3.1-70B, the difference is obvious.

FRAMES is more interesting still: search goes 100% to Qwen3-32B, the cheapest model that is good enough; answer uses GPT-5 only 58.4% of the time and spreads the rest over GPT-5-mini (10.0%), Qwen3-32B and the math specialists (their individual shares aren't listed here; together about 31.6%).

### Transfer: same handbook, different backbone

The right half of Figure 6 makes the best case for writing knowledge down as text. The handbook learned from Qwen2.5-3B traces is applied unchanged to other backbones, with no retraining, averaged over 3 general QA datasets:

| Orchestrator backbone | Without handbook | With handbook | Gain (points) |
|---|---|---|---|
| Qwen2.5-3B (handbook source) | 40.7 | 56.1 | +15.4 |
| Qwen2.5-7B | 35.7 | 60.0 | +24.3 |
| Mistral-7B | 36.5 | 59.8 | +23.3 |
| Llama-3.1-8B | 35.5 | 58.0 | +22.5 |
| Mixtral-8x22B | 46.5 | 61.3 | +14.8 |

Every backbone improves substantially, and absolute accuracy with the handbook roughly rises with backbone strength, topping out at 61.3% for Mixtral-8x22B. Notably, the biggest gains go not to the source model but to the 7B and 8B models that never took part in learning (+22.5 to +24.3), which suggests the handbook captures routing knowledge that isn't tied to one particular model.

### Ablation: what each component does

The paper's Table 2 removes components one at a time on 100 random FRAMES tasks with a Qwen3-8B orchestrator (HB: handbook, Ref: refinement, Sel: Pareto selection, FG: fine-grained skills):

| Ablation | Accuracy | Total cost | Reading |
|---|---|---|---|
| No HB (no handbook) | 71.0% | $122.9 | No structured guidance: wanders, burns money, still inaccurate |
| No Ref + Sel (discovery only) | 79.0% | $5.5 | Even a rough handbook saves over 95% of cost and adds 8 points |
| No Selection (discovery + refinement) | 79.3% | $3.4 | Cheapest after merging duplicates, but granularity isn't matched, so accuracy stalls |
| No FG Skills (coarse skills only) | 80.4% | $15.1 | Too coarse: routing is imprecise, costlier and less accurate |
| **Full System** | **85.0%** | **$9.3** | Best balance of accuracy and cost |

The division of labor is clear: **discovery plus refinement stop the bleeding on cost** ($122.9 down to $3.4), and **fine-grained skills plus Pareto selection push accuracy up** (79.3% to 85.0%). Three details deserve a second look. First, the full system actually costs more than No Selection ($9.3 vs. $3.4); it trades a little cost for 5.7 points, exactly the trade-off you saw in the widget earlier. Second, No FG Skills losing points may seem to contradict “small orchestrators prefer coarse skills”, but it doesn't: the point is not always-coarse or always-fine, but having fine-grained options for Pareto selection to choose a digestible depth from; removing fine-grained skills takes those options away. Third, this 85.0% comes from a random 100-task subset, not the same questions as the main FRAMES result of 84.3%, so the two needn't match.

---

## Limitations and open questions

The paper's main contribution is showing, at very low data and engineering cost, that externalizing routing policy as a structured text handbook can beat expensive end-to-end RL in practice. Before taking it to production, four issues need thought.

1. **A distillation bonus from a strong model, and a gap in the cost math.** The Reflector used in offline refinement is GPT-5, which in effect distills a top commercial model's summarizing ability into the handbook; part of the small orchestrator's gains may come from there. The headline 700× and 300× learning-cost reductions come without a stated method, for instance whether they include collecting contrast traces and GPT-5 reflection API costs.
2. **Prompt overhead over long horizons.** Even after selection, the FRAMES system prompt in the appendix runs 7 to 8 pages. Over up to 50 turns, every decision re-reads this handbook, which eats input context and adds latency; deployment leans heavily on prefix or KV caching to compensate.
3. **Noise from tiny samples, and “benign” concentration.** Fewer than 50 discovery questions saves data, but the AMC profiles in the appendix show some win rates resting on just 20 questions; per skill, it is reasonable to infer only 1 or 2 questions remain (the paper doesn't list per-skill sample counts), so Beta estimates easily land at extreme 0% or 100%. Mixtral's “Pell-type equations: 100%” and “Constrained pairing/matching: 0%” earlier may well be such cases (our speculation). And in our view, sending 100% of FRAMES search calls to Qwen3-32B is also a kind of concentration, one that happens to land on a cheap, capable option; whether it differs from RL routing collapse in mechanism remains an open question.
4. **Dependence on gradable traces, and cold-start cost.** Contrastive discovery and Pareto validation both need traces with a ground-truth answer or automatic pass/fail. For a new domain, a newly added tool, or open-ended generation without a single right answer, you still need to design trial runs and a reliable judge.

On top of that, the implementation details noted earlier (Beta priors, split and merge thresholds, \(K\) and how subgraphs are cut, how confidence is computed, and whether step 3 is computed by code or read off tables by the LLM) all make reproduction harder.

---

## Engineering principles that outlive the paper

Even if you never copy SkillOrchestra, these apply directly when designing multi-agent systems.

**Move routing knowledge out of weights into a version-controlled handbook.** Multi-model, multi-tool routing doesn't have to start with RL fine-tuning. Writing capability needs and each agent's win rates and costs down as human-readable, Git-tracked structured text makes learning and debugging much cheaper, and later hot-swapping a model, replacing a tool or upgrading the orchestrator only needs a local edit.

**Use operational modes as the first gate.** Don't make the orchestrator choose from every model × tool combination. Split each step into “pick a mode, then an agent”: choosing the mode immediately locks in valid tools, candidate models and the relevant skills, and gives rules like “when to stop searching and start coding” a clear home.

**Match skill granularity to the orchestrator, and assemble in two layers.** Finer rules aren't always better; too fine and a small orchestrator misreads the sub-skill and picks the wrong agent. Use Pareto selection on a validation set to choose the resident base, then pull in 2 or 3 related skills by semantic retrieval for long-tail questions. It's the most practical balance of accuracy, stability and token budget.

**Maintain the rulebook with contrastive traces and statistical split/merge.** Hand-written routing prompts inevitably bloat and duplicate. Borrow the paper's loop: infer capability gaps from the difference between successful and failed traces, then periodically reorganize with “split when variance within a skill is high, merge when win rates across skills don't differ”.

{{< admonition type="tip" title="Two pitfalls to avoid in production" >}}
**Protect against cold starts and tiny samples.** Don't mark a model 0% (permanently banned) or 100% (blindly trusted) on a skill based on 1 or 2 questions. Give the Beta distribution a conservative prior (e.g. \(\alpha_0 = 2, \beta_0 = 2\)) and a minimum sample count, falling back to the mode-level win rate when data is thin. With the earlier 4-wins-1-loss example, the prior gives \((2 + 4) / (2 + 2 + 4 + 1) = 6/9 \approx 67\%\): more conservative than 80%, and less easily swayed by a handful of questions.

**Separate “the LLM identifies skills” from “code computes the score”.** Rather than stuffing the whole win-rate and price table into the prompt and asking a small orchestrator to do the arithmetic in its head, let it focus on emitting the structured mode and skill weights (`<skill_analysis>`), and hand the “weighted win rate − \(\lambda\) × cost” scoring and ranking to deterministic code. Decisions get more stable, you save a lot of repeated prompt tokens, and it closes the formula-versus-prompt gap mentioned earlier.
{{< /admonition >}}

If you're interested in treating agent experience as an evolving document, read our [SkillOpt walkthrough](../skillopt/) next (optimizing skill files as if they were trainable weights); for a cost-driven take on choosing model combinations, see [AgentOpt](../agentopt/).

---

## Conclusion

- **Problem**: in multi-turn compound AI systems, static routers can't follow changing state, and RL orchestrators are expensive, hard to transfer and prone to routing collapse (Router-R1 puts 98.02% on one model; ToolOrchestra 99.7% and 97.9% in search and answer).
- **Approach**: pick a mode, then an agent; learn a three-part handbook from contrastive traces on fewer than 50 questions, refine it with statistical splits and merges, and use Pareto selection to match its granularity to the orchestrator; online, assemble it in two layers and route with a four-step lookup each turn.
- **Results**: 84.3% at $72.7 on FRAMES, beating ToolOrchestra and three top commercial models; the same handbook lifts other backbones by 14.8 to 24.3 points without retraining; calls are spread across models.
- **Watch out for**: the GPT-5 Reflector's distillation bonus and the unexplained cost multiples, long-prompt overhead, tiny-sample noise, and the reliance on traces that can be graded automatically.

Routing knowledge can be a readable, version-controlled, portable document, and its granularity should fit the model that reads it.

