Skip to content

Vol. III · Single-Agent Patterns · III.2

Routing

Classify the input, then send it to a specialist prompt, model, or workflow. Separation of concerns for language.

5 min read

Doctrine

  • Route when categories are stable and classification is cheap and accurate.
  • Hard questions to large models, easy ones to small models — routing is also a cost control.
  • A misroute should be recoverable: include an 'other' specialist, not a silent drop.

Router as a tiny agent

OpenAI handoffs and Google ADK's LLM-routed hierarchy are routing with an identity. The router should have almost no tools. Its only job is to pick the next specialist. That specialist gets a clean context, not the router's indecision.

Anti-patterns

  • A router with twenty fuzzy classes and no eval on the classifier.
  • Routing in natural language without a structured label.

Related