Concept
Clarifying means the customer answers one question before a route is chosen. ABL has three ways to ask. Pick by who controls the question.
A
GATHER block on a supervisor does not pause the conversation to ask a question. The supervisor model chooses a route on every turn. A supervisor GATHER field fills from the routing call, and only when the field sets infer: true. A route WHEN that reads a supervisor GATHER field stays false while the field is empty. The runtime then refuses the route. Use one of the approaches in the table instead.
Minimal working example: router supervisor
Arouter supervisor cannot answer in text. When no route fits the request, the model calls a built-in clarification action with one question. The runtime sends that question to the customer and ends the turn. The next message goes through routing again.
This example is a project-level set. The two specialists are short stand-ins for your real agents.
How the router asks
INTENTS:lists the categories. AWHENthat readsintent.categorymakes the model state a category when it calls the route.- The model sees the clarification action next to the routes. It uses the action only when no route fits. The action takes one
message, which is the question. - The
PERSONAtext shapes how the question reads. The action has no other settings. - The runtime offers the action only to supervisors with
BEHAVIOR: ROLE: routerand at least one route. A supervisor with noBEHAVIORblock can answer in text, so it asks in plain words and has no action. - A route with no
HISTORYpasses the full conversation history. The specialist sees the question and the answer. A project default can change this value. - The question does not set any variable. The customer’s answer is a normal message.
Ask with a fixed list of answers
Use an entry agent when the answer must be one of a known set. This example is a separate project. It replaces the router supervisor. The runtime asks the prompt, waits, and checks the answer againstOPTIONS. When the step ends, the runtime checks each route WHEN in order. The first true route runs.
route_topiccomes from theGATHERfield. Each route reads it and passes it on.- An answer outside
OPTIONSfails validation. The step asks again and no route runs. - Give every option a route. A valid value with no matching route reaches
THEN: COMPLETEand the session ends. - The
otheroption is the way out for unsupported requests. Point it at an agent that can triage. - A quoted plain-language
WHENnever matches in this scripted check. Use exact values here.
Ask which of several requests to handle first
A message can hold more than one request. Multi-intent handling is on by default. The defaultprimary_queue strategy serves the main request and queues the others. To ask the customer instead, set the strategy on the router supervisor. Add this block before the first AGENT: line of the router example.
Write quoted fallback text carefully
A quotedWHEN such as WHEN: "the request does not fit any listed category" is guidance for the model. It works when the model picks that route. It never routes on its own.
The runtime reads a quoted phrase as an expression when it has an uppercase AND, OR, or NOT. The same happens with a comparison symbol or a word such as contains. Write fallback text in lowercase words with no symbols.
Verification
Router supervisor:- Send “I need help”. Expect one question and no handoff. The trace shows a
tool_callnamed__clarify_routing__. - Answer “I was charged twice”. Expect a handoff to
Billing_Agent. The trace showshandoff_condition_checkwithresult: true. - Send “My app shows error 500”. Expect
Technical_Support_Agentwith no question.
- Start a session. Expect the
route_topicprompt. - Answer “pizza”. Expect a validation message and the prompt again. No
handoffevent appears. - Answer “billing”. Expect a
handoffevent toBilling_AgentwithreasonCode: handoff_permanent. The precedinghandoff_condition_checkshowssource: flow_transitionandcurrentStep: ask_topic. - Repeat with
technical_supportandother.
Production readiness checklist
- Every route target exists and has a clear owner.
- The router supervisor has
BEHAVIOR: ROLE: router. Without it, no clarification action exists. - Every category in a
WHENis declared inINTENTS:. - Every
OPTIONSvalue in the entry agent has a route. - One route leads to an agent that handles unsupported requests.
- Tests cover a clear request, a vague request, an invalid answer, and a message with two requests.
- Quoted fallback text uses lowercase words and no comparison symbols.
- The trace shows the question or the validation message before the handoff.