Router
A central agent inspects each request and routes it to the most appropriate specialist agent based on content and context.
Overview
Routers keep front-line interactions lightweight: they triage requests, choose which specialist should respond, and optionally provide fallbacks when no match is found. Common use cases include customer support triage and language translation hubs.
Demo Scenario: Language Help Desk
Three agents collaborate:
Spanish expert – handles Spanish translation and explanations
Japanese expert – handles Japanese translation and explanations
Router agent – analyzes each question and delegates to the correct expert
The router uses simple heuristics in its instruction to decide which expert to invoke.
Diagram
Implementation Steps
Create language experts
Create the router agent and point it at the specialists
Process incoming requests
Clean up the demo agents
How to Run
From the repository root glaip-sdk/python/glaip-sdk:
Set the usual environment variables in .env:
Output
Notes
Extend the instruction with additional heuristics (language detection, confidence scores) or add more specialists for other languages.
Combine with an aggregator to produce a unified transcript of all routed interactions.
Monitor routing outcomes and adjust the prompt rules as queries evolve.
Related Documentation
Agents guide — Configure nested agents, memory, and streaming renderers.
Automation & scripting — Log routing results or wire the router into scheduled jobs.
Security & privacy — Apply memory and PII controls when routing sensitive requests.
Last updated