# AI Agent Routing
AI Agent Routing is the mechanism that maps user intent to the appropriate [[AI Agents|agent]], [[AI Agent Panels|panel]], or team. It determines which agent handles a given request, ensuring that the right expertise is applied to the right problem.
## Two-Tier Architecture
Effective routing uses two tiers to balance speed and accuracy:
**Tier 1: Lightweight hints (always loaded)**
A routing table embedded in the bootstrap configuration (e.g., `AGENTS.md`) that maps common domains to agents. Covers obvious cases without loading additional context. Costs almost zero tokens.
**Tier 2: Dynamic receptionist (on-demand)**
For ambiguous requests, a full [[Receptionist AI Design Pattern|Receptionist]] skill loads, reads the agent registry, classifies intent, and routes dynamically. More expensive but more accurate.
## Classification Order
1. **Direct name match**: User mentions an agent by name
2. **Domain match**: Request clearly falls in one agent's expertise
3. **Panel match**: User asks for multi-angle feedback
4. **Team match**: Goal requires multiple agents collaborating
5. **Ambiguous**: Could go to 2+ agents; one clarifying question, then routes
6. **No match**: Handles generically or suggests creating a new agent
## Design Principles
- **Never cache the registry**: Always read fresh. Agents get added, removed, or modified. Stale routing produces wrong results.
- **Prefer specificity**: Route to the most specific agent possible. A business pricing question goes to the Pricing Advisor, not the generic Strategist.
- **Ask before guessing**: When ambiguous, one clarifying question is cheaper than routing to the wrong agent and wasting a full exchange.
- **Routing is not orchestration**: Routing picks the destination. [[AI Agent Orchestration]] manages the collaboration once agents are active.
## Connection to Context Engineering
Routing is the first major [[Context Engineering]] decision in any multi-agent session. The choice of which agent to activate determines which context gets loaded. Good routing keeps context lean and relevant. Bad routing wastes the token budget on irrelevant context.
## References
-
## Related
- [[AI Agents]]
- [[AI Agent Identity]]
- [[AI Agent Panels]]
- [[AI Agent Orchestration]]
- [[AI Assistant Architecture]]
- [[Receptionist AI Design Pattern]]
- [[Context Engineering]]
- [[Prompt Lazy Loading AI Design Pattern (PLL)]]