Patterns
Pattern: Routing
Pattern: Routing
Category: Orchestration Source: Internal usage (trigger-based agent activation), FOR-0012 Status: Active
When to Use
When incoming requests need to be analyzed and directed to the right specialist agent based on content, intent, or classification. Essential when you have multiple specialized agents and need to avoid sending every request to a generalist.
How It Works
- An incoming request arrives (user message, task, query)
- A router analyzes the request to determine intent or category
- Based on classification, the request is sent to the appropriate specialist agent
- The specialist processes the request and returns a result
- Edge cases or unclassifiable requests can be flagged for human review or sent to a fallback agent
Example
Every factory worker agent has trigger phrases (should activate) and non-trigger phrases (should not activate, with redirection). When a user says "validate this role," routing sends it to Quinn (QA Engineer). When they say "which agentic pattern should I use," it routes to Ada (Agentic Pattern Designer). The trigger/non-trigger system in each agent.md is an explicit routing table.
Tradeoffs
| Pro | Con |
|---|---|
| Each specialist stays focused and optimized | Misrouting sends work to the wrong agent |
| Scales well — add new routes without changing others | Router needs to understand all possible categories |
| Reduces wasted tokens by avoiding generalist processing | Ambiguous requests are hard to classify |
| Can include confidence scores for routing decisions | Maintaining routing rules as agents grow gets complex |
Factory Usage
- Agent trigger system: Every agent.md in the factory defines trigger and non-trigger phrases, creating an implicit routing table across all factory workers.
- CEO delegation: Oscar routes work to the right specialist ("who should handle this?") rather than doing it himself.