Concept
Intent routing uses three ABL surfaces working together:- INTENTS declares the classifier categories. Each category has a description that tells the model what kinds of requests belong to it.
- HANDOFF is the executable routing surface. Each entry names a target agent, the condition that triggers the handoff, and the context the child receives.
- WHEN conditions on each handoff entry can be deterministic expressions (
intent.category == "billing") or semantic natural-language text ("the user request is unclear"). The platform detects the form automatically: multi-word quoted text without structured operators routes through model reasoning; expressions with operators like==route through deterministic evaluation.
- History strategy — By default, the child agent receives the full parent conversation history (
history: full). This is the platform default whenhistoryis omitted. Choosesummary_only,none,auto, orlast_nwhen the child should see less. See Common variations for the options. - Return behavior —
EXPECT_RETURN: false(the default) transfers ownership permanently.EXPECT_RETURN: truepauses the parent and resumes it when the child returns. UseON_RETURNto map child results back to parent variables.
Minimal working example
MEMORY section declares customer_id and account_id as session variables so the pass fields have a defined source. Any variable you pass must come from MEMORY, GATHER, a tool result, or runtime context.
How it works
- The supervisor receives the user message and retains ownership until a handoff condition matches.
- The platform evaluates the INTENTS classifier against the user message, producing
intent.category. - HANDOFF entries are evaluated in authored order (override with
PRIORITYwhen needed). The first matching condition wins. - The matched child receives: the
passvariables, thesummarytext, and conversation history controlled by thehistorystrategy. Whenhistoryis omitted, the child receives the full parent conversation — this is the platform default (full). - If
EXPECT_RETURN: false(the default), the child owns the conversation permanently. IfEXPECT_RETURN: true, the child runs and returns control to the parent, optionally mapping result variables throughON_RETURN. - If no HANDOFF condition matches, the supervisor continues with its own GOAL. A semantic fallback entry (like the
General_Service_Agentabove) prevents unmatched requests from going unhandled.
Common variations
Control conversation history with history
When the child should not receive the full parent transcript, set history explicitly:
Choose
summary_only or none when the child is a focused specialist that should not be influenced by earlier conversation turns. Choose full (or omit) when the child needs the complete conversation record.
Shorthand context syntax
pass, summary, and history can appear as direct siblings of the handoff entry instead of nested under CONTEXT::
CONTEXT: form is preferred when you also need set or memory_grants.
Return to the parent with ON_RETURN
When a specialist should report back to the supervisor after completing its task:EXPECT_RETURN: true pauses the parent. When the child returns, ON_RETURN.map copies child variables into the parent scope. action: continue resumes the parent’s flow; action: resume_intent re-runs routing with the original user intent and the returned context.
The legacy keyword RETURN is accepted as an alias for EXPECT_RETURN.
Set evaluation order with PRIORITY
When multiple handoff conditions could match the same utterance, usePRIORITY to control evaluation order. Lower values are evaluated first:
PRIORITY, entries are evaluated in authored order.
Handle dispatch failures with ON_FAILURE
ON_FAILURE defines what happens when the handoff dispatch itself fails — for example, the target agent is not found or pre-transfer validation fails. It does not handle child-agent runtime errors.
Verification
- Send a test utterance for each intent category and confirm the correct child agent is selected. Check the trace for the matched HANDOFF entry and the condition result.
- Send an ambiguous utterance and confirm the fallback entry handles it. Verify the trace shows the semantic WHEN evaluation.
- Inspect the trace for passed context: confirm
passvariables are present in the child’s session and thesummaryappears in the child’s context. - If
EXPECT_RETURN: trueis used, verify the parent resumes andON_RETURN.mapvariables appear in the parent’s session after the child returns. - Verify the
historystrategy by checking what conversation messages the child receives. Withfull(or omitted), the child should see the complete parent transcript. Withsummary_only, the child should see only the summary text.
Production readiness checklist
- Every specialist route has a clear owner and a concise context summary.
- Every
passvariable has a declared source (MEMORY, GATHER, tool result, or runtime context). - Deterministic conditions use declared fields; semantic conditions are quoted as natural-language
WHENtext. - Choose a
historystrategy appropriate for each child. The defaultfullpasses the entire parent transcript, which may include irrelevant turns and increase token usage. - Add
ON_FAILUREto critical handoff entries so dispatch failures have a defined recovery path. - Fallback behavior is explicit and does not hide missing intent coverage.
- Test at least one utterance per intent category, one ambiguous utterance, and one utterance outside all categories.
- Temporary child agents (
EXPECT_RETURN: true) produce every field mapped inON_RETURN. - Verify handoff depth does not exceed the platform limit of 10 nested handoffs.