Concept
A single agent owns the conversation and the outcome. It can gather information, call tools, answer, and complete the request without transferring ownership. A specialist design separates the front door from the business owners. A supervisor receives the user request, chooses the right owner, and usesHANDOFF when another agent should take over. A specialist owns one capability, such as account access, order status, billing, claims, device care, or employee benefits.
The design question is ownership. If one team, policy set, permission model, and success criteria can own the outcome, keep one agent. If different teams, tools, policies, or escalation paths own different parts of the experience, use specialists.
Decision guide
Do not split agents just because a domain is large. Splitting adds routing, context-passing, target-agent readiness, testing, monitoring, and fallback design.
Minimal working example: one agent owns the outcome
This example is one agent file. It is enough when order-status work has one owner and one required field.Working example: supervisor with specialist agents
This example is a project-level set. The supervisor and all referenced specialists must exist in the same project. The specialists are short stand-ins. Replace theirCOMPLETE rules with your real business logic.
agents/support-supervisor.agent.abl
agents/account-support-agent.agent.abl
agents/order-status-agent.agent.abl
agents/live-agent.agent.abl
HANDOFF is the executable routing surface. The platform ignores AGENTS:. It does not route and does not check the names, so keep it only as a readable roster. Each HANDOFF entry becomes a routing action the supervisor model can choose. The WHEN rule is checked before the transfer.
Each PASS field becomes a typed input on that routing action. The model fills it from what the customer already said. Each specialist also gathers customer_id, so a missing value is requested again. Live_Agent is a machine agent. It reaches a person through ESCALATE. Escalation reaches a person only when the project has a human-agent connection and the ESCALATE block has a routing block with connection, queue, or skills. See the ESCALATE reference.
If a HANDOFF entry omits HISTORY, the specialist receives the full conversation history. A project-level coordination default can change this value. Set HISTORY on the entry when one route needs summary_only, none, auto, or the last few messages.
When to use handoff
UseHANDOFF when the target agent should own the next part of the conversation, including when it must ask the customer questions.
Use RETURN: true when the specialist should do bounded work and return control to the supervisor. The specialist returns when its COMPLETE rule matches, or when it uses the built-in return action for a request outside its scope. Use RETURN: false when the target agent or human channel should keep ownership.
When to use delegate
UseDELEGATE when the parent agent keeps the conversation but asks another agent for a one-shot result.
A delegate runs to completion and cannot wait for customer replies. Two rules follow from this:
- Map every required field of the child agent in
PASS. Otherwise the compiler reportsDELEGATE_CHILD_GATHER_INPUT_UNMAPPED. If the child must ask the customer, use aRETURN: truehandoff instead. - A supervisor with
ROLE: routercannot useDELEGATE. The compiler reportsAGENT_RETURNED_WORK_REQUIRES_ORCHESTRATOR.
total_fee, and the parent maps that result into quoted_fee. The parent completes only after the fee returns. The fixed $25 fee is a stand-in. Replace it with a call to your fee tool.
agents/booking-manager.agent.abl
agents/fee-calculator.agent.abl
RETURNSmaps a child value to a parent variable. If the child returns none of the declared values, the delegate fails andON_FAILUREruns.USE_RESULTnames a parent variable that stores the whole delegate result. Write a variable name, not an instruction. The platform ignores text with spaces.- Write
TIMEOUTwithout quotes, for example10s,500ms, or2m. A quoted value is ignored and the default of 30 seconds applies. ON_FAILUREacceptscontinue,escalate, orRESPOND "text". The default iscontinue.
Verification
- Validate all files in the project together, not only the supervisor.
- Send an account access utterance and confirm the trace shows
handoff_to_Account_Support_Agentand that ownership moves toAccount_Support_Agent. - Send an order-status utterance and confirm ownership moves to
Order_Status_Agent. - Send “I need a person” and confirm the route reaches
Live_Agentand that the model escalates. - Check the
handofftrace event. Confirmcustomer_idappears in itscontextwhen the customer stated it. CheckseededFieldsinhandoff_context_seedto see whichPASSfields reached the specialist. - For the delegate example, send “What would it cost to change this booking?” and confirm the trace shows
delegate_startanddelegate_complete, the parent stays active, and the reply includes the fee. - Force a delegate failure in a test project, for example with
TIMEOUT: 1ms. Confirm the customer sees theON_FAILUREtext.
Production readiness checklist
- Every
HANDOFF TOandDELEGATE TOtarget exists in the project or is configured as an external or remote agent. - Every
PASSfield is gathered, read from memory, produced by a tool, or supplied by the channel before it is needed. - Every delegate child maps all its required fields in
PASS. - Each route has a distinct business owner and success criteria.
- A human route exists for unclear, unsupported, or high-risk requests, and a human-agent transfer is configured for your channels.
- Test utterances cover every route, delegate failure, delegate timeout, and human escalation.
- Trace review confirms selected route, target agent, return behavior, history strategy, and context passed.