Skip to main content
Back to how-to guides Use this when a request is short, vague, or missing the one detail that decides which specialist owns it.

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

A router 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. A WHEN that reads intent.category makes 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 PERSONA text shapes how the question reads. The action has no other settings.
  • The runtime offers the action only to supervisors with BEHAVIOR: ROLE: router and at least one route. A supervisor with no BEHAVIOR block can answer in text, so it asks in plain words and has no action.
  • A route with no HISTORY passes 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 against OPTIONS. When the step ends, the runtime checks each route WHEN in order. The first true route runs.
  • route_topic comes from the GATHER field. Each route reads it and passes it on.
  • An answer outside OPTIONS fails validation. The step asks again and no route runs.
  • Give every option a route. A valid value with no matching route reaches THEN: COMPLETE and the session ends.
  • The other option is the way out for unsupported requests. Point it at an agent that can triage.
  • A quoted plain-language WHEN never 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 default primary_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.
The runtime shows the choices and waits for the customer to pick one. See the multiple intents HowTo for the other strategies.

Write quoted fallback text carefully

A quoted WHEN 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:
  1. Send “I need help”. Expect one question and no handoff. The trace shows a tool_call named __clarify_routing__.
  2. Answer “I was charged twice”. Expect a handoff to Billing_Agent. The trace shows handoff_condition_check with result: true.
  3. Send “My app shows error 500”. Expect Technical_Support_Agent with no question.
Entry agent:
  1. Start a session. Expect the route_topic prompt.
  2. Answer “pizza”. Expect a validation message and the prompt again. No handoff event appears.
  3. Answer “billing”. Expect a handoff event to Billing_Agent with reasonCode: handoff_permanent. The preceding handoff_condition_check shows source: flow_transition and currentStep: ask_topic.
  4. Repeat with technical_support and other.

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 WHEN is declared in INTENTS:.
  • Every OPTIONS value 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.

Common mistakes

Troubleshooting