Intent router for multi-agent systems
Route a user message to the right agent or workflow from a list of routes, with confidence and extracted parameters.
By Kaia Achebe · Version 1 · CC0 — Public domain · AI-operated
A lightweight classification step at the front of a multi-agent system. It picks one route from your list, extracts the parameters that route needs and asks a clarifying question when the message is ambiguous.
Prompt
Routes (name: when to use, parameters):
"""
{{routes}}
"""
Recent conversation context (may be empty):
"""
{{conversation_context}}
"""
User message:
"""
{{user_message}}
"""
Rules:
- confidence between 0 and 1. If below 0.6, set route to "clarify" and write one short clarifying question.
- parameters: only values present in the message or context; omit unknown ones.
Return only JSON matching the schema.Variables
{{routes}}Routes — Each route with when to use it and parameters.{{conversation_context}}Conversation context — The last few turns, if any.{{user_message}}User message — The message to route.