How to route skills with a decision model
This guide shows how to have a decision model choose, before each turn, which skill applies to your question, so that the chat model receives the same [skill: …] line as if you had typed $<skill>. It assumes you have a decider agent file (see How to ask a decision model) and an agent with skills.
Steps
-
Add a
skillRoutingblock to the agent that answers you:skillRouting: decider: agent.decider.yaml # relative to this file minConfidence: 0.6 timeout: 2sThe decider file only has to locate the model (
provider,model,baseUrl,fallback); itsdecision:questions are not used here. -
Start the agent. The banner ends with the routing column:
… | routing: llamacpp/LiquidAI/d1-3B-GGUF:Q4_K_M ≥ 0.60 -
Ask a question. Before the turn, a
🧭notice says what the decider chose:> what time is it in Tokyo? 🧭 $what-time-is-it (0.97)> explain in one sentence what a goroutine is 🧭 no skill (none 0.96)A skill below
minConfidenceis shown and not appended:🧭 no skill (lsp-navigation 0.42 < 0.60). A question that already names a$skillis not routed.
Variants
- Fewer misses: lower
minConfidence. In the run measured on 2026-10-22 (see Decision models), no threshold made the decider append a wrong skill; a higher one only made it abstain more. - A decider that loads slowly: the first call loads the model (~13 s) and exceeds
timeout: that turn shows🧭 skill routing skipped: … context deadline exceededand goes on without routing. Send one question to the decider first (mm -config agent.decider.yaml -p "hi"), or raisetimeout. - In an editor: the notice goes to the agent's log (
[acp] session <id>: 🧭 …), not to the conversation.
Check it on your catalogue
Run the routing eval through the decider before relying on it:
MM_EVAL=1 MM_DECIDER=demos/decision-skills/agent.decider.yaml go test ./internal/eval -run Decider -v
See How to measure whether the model picks the right skill.
See also
- Every
skillRoutingkey and notice: Configuration reference - Why the line is appended rather than the skill loaded: Decision models
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|