Intelligence Routing
Route tasks to the best agent and model based on learned patterns.
When to use
Before starting any task, use intelligence routing to get the optimal agent type, model tier, and confidence score. This replaces manual agent selection with data-driven decisions.
Steps
- Get routing recommendation — call
mcp__claude-flow__hooks_routewith the task description - Check model recommendation — call
mcp__claude-flow__hooks_model-routefor the optimal model tier (Haiku/Sonnet/Opus) - Search for similar patterns — call
mcp__claude-flow__hooks_intelligence_pattern-searchto find past successes - Predict outcome — call
mcp__claude-flow__neural_predictwith the task description - Spawn the recommended agent at the recommended model tier
- Record outcome — after task completes, call
mcp__claude-flow__hooks_model-outcometo train the router
3-Tier Model Routing
| Tier | Handler | When |
|---|---|---|
| 1 | Agent Booster (WASM) | Simple transforms — skip LLM entirely |
| 2 | Haiku | Low complexity tasks (<30%) |
| 3 | Sonnet/Opus | Complex reasoning, architecture, security |
CLI alternative
npx @claude-flow/cli@latest hooks route --task "description"
npx @claude-flow/cli@latest hooks pre-task --description "description"
npx @claude-flow/cli@latest hooks explain --topic "routing decision"
Viewing intelligence stats
Call mcp__claude-flow__hooks_intelligence_stats or:
npx @claude-flow/cli@latest hooks intelligence stats