Route by a declared intent
When an application has a bounded set of handlers, it can ask a choice question to select among the criteria it provides. Include the relevant user request in state; make the criteria specific to the application's supported routes.
{
"state": "Can you check my balance?",
"questions": {
"intent": {
"type": "choice",
"instructions": {"question": "Which account operation is requested?"},
"criteria": {
"balance": "Check an account or wallet balance",
"transfer": "Send or transfer money to another person",
"dispute": "Report a charge the customer does not recognize"
}
}
}
}
Inspect outcome, the selected choice, and its evidence. A missing or ambiguous route should remain unresolved or refused for application handling. Before a handler reads or changes customer data, the application must check identity, permissions, required fields, and transaction policy itself.
See choice questions and the outcome-handling pattern.