Client
Router Agent
Classification
Support Handler
Sales Handler
When to Use
Use routing when you have distinct request types that benefit from specialized handling, such as customer service systems with support, sales, and billing inquiries. It’s ideal when different domains require different prompts, tools, or context. Avoid routing when requests are too similar to benefit from specialization or when the classification overhead outweighs the benefits of specialized handling.Implementation
This example demonstrates a customer service router that classifies incoming messages as Support, Sales, or Other requests, then directs them to specialized handlers optimized for each domain.Agent Code
Classification Tool: Request Categorization
Classification Tool: Request Categorization
Support Handler: Technical Assistance
Support Handler: Technical Assistance
Sales Handler: Commercial Inquiries
Sales Handler: Commercial Inquiries
canHelp
boolean indicates whether the system can assist with the request.