In multi-agent systems, incoming requests need to reach the right agent. Routing is the classifier that picks which agent to invoke based on the request. Get routing wrong and users talk to the wrong specialist.
Hard-coded logic. If message contains "password" → auth agent. If contains "billing" → billing agent. Simple, fast, brittle.
A lightweight LLM reads the request and emits a category. Flexible, handles novel phrasings. Costs one LLM call per route.
Embed the request, find nearest agent by similarity to their capability description. Fast, doesn't require LLM call per route.
Rules for obvious cases, LLM fallback for ambiguous. Best balance of speed and accuracy.
Sometimes a request needs multiple specialists. Router can:
Always have a fallback generalist agent for requests that don't match any specialist. Without one, unusual queries fall through the cracks.