DELEGATE, HANDOFF, ESCALATE, COMPLETE) and the SUPERVISOR: declaration for top-level routing.
SUPERVISOR Declaration
A Supervisor is a top-level orchestrator that routes user messages to the appropriate child agent based on intent, context, and declarative rules. Supervisor documents use theSUPERVISOR: keyword instead of AGENT: and define agent references, routing rules, state schemas, policies, and communication settings.
Overview
While agents handle domain-specific tasks, the Supervisor decides which agent should handle each user message. It does not execute tools or gather information directly; it classifies intent and routes accordingly.Agent references
The Supervisor declares which agents are available for routing. Each reference includes a file path, an alias, and a list of capabilities.Syntax
Agent reference properties
Routing rules
Routing rules define conditional logic for directing messages to agents. Rules are evaluated in priority order.Syntax
HANDOFF: block within a Supervisor, following the same syntax as agent handoffs:
Routing rule properties
Routing actions
Intent-based routing
For more granular routing, useINTENT_MATCH with intent-to-agent mappings:
Routing flags
Conditional routing (WHEN clauses)
WHEN clauses use the same expression syntax as Expressions & functions. Common patterns include:Routing constraint blocks
Add constraints to limit when a rule applies beyond the WHEN condition:State schema
The Supervisor can declare a state schema that defines typed variables organized by namespace.State variable properties
Policies
Policies define high-level behavioral rules for the Supervisor, constraining what it is allowed and forbidden to do.Policy properties
Policy rule properties
Communication settings
Communication settings define the Supervisor’s language, tone, and vocabulary preferences.Communication properties
Behavior settings
TheBEHAVIOR block defines whether the Supervisor can respond directly to users or must always route to an agent.
Intents
In addition toINTENT_MATCH inside a routing rule, a Supervisor may declare a top-level INTENTS:
block listing intent labels (and optional lexical-fallback behavior) that routing and classification
draw on. Supervisors can also hand off to other supervisors, enabling hierarchical composition,
and may declare an ON_ERROR block to handle routing failures.
Execution pipeline (pre-classification)
This is an advanced, opt-in optimization. Most supervisors do not need it — routing works without
an
EXECUTION block.The classifier model is not selected in the agent’s
EXECUTION.pipeline block — it is resolved
from project-level runtime configuration via modelSource (default uses the platform’s
tool-selection model; tenant uses a specific tenant model identified by tenantModelId). A
model: key inside the pipeline block is deprecated and ignored by the runtime. The top-level
EXECUTION.model still sets the main reasoning model as usual.Pipeline options
For pure routing supervisors,
sequential mode with shortCircuit.enabled: true gives the best
cost savings. In parallel mode the classifier adds latency protection but no cost savings, since
both calls run regardless.
HANDOFF
HANDOFF transfers conversational control from the current agent to another agent, passing context and optionally expecting a return.Syntax
Properties
The primary keyword is
EXPECT_RETURN. The older RETURN keyword is still parsed for
backward compatibility, but new agents should use EXPECT_RETURN. The legacy top-level MAP
block is superseded by ON_RETURN.map (see Return expectations).Handoff context
TheCONTEXT block defines what information the target agent receives.
CONTEXT may also be expressed as a shorthand where pass, summary, and history appear as
direct siblings of the handoff entry rather than nested under CONTEXT:.
History strategies
Thehistory property controls how much conversation history the target agent receives.
The legacy shorthand
history: last_10 is still accepted during the compatibility window, but
new agents should use the typed mode + count block.Return expectations
WhenEXPECT_RETURN: true, the calling agent pauses and waits for the target agent to complete.
When the target explicitly returns control (via its built-in return capability), the parent resumes.
When EXPECT_RETURN: false, the handoff is a one-way transfer and the calling agent’s turn ends.
ON_RETURN controls what happens when the target returns. It accepts either a string (the name
of a named return handler, or a built-in action) or a structured block:
ON_RETURN properties
Return handlers
A top-levelRETURN_HANDLERS: block declares reusable named handlers that run on the parent after a
EXPECT_RETURN: true child returns. Reference one from ON_RETURN.handler.
Handoff failure strategies
ON_FAILURE defines a parent-side fallback for failures that occur before the target accepts the
handoff — for example target lookup, pre-transfer validation, or dispatch failures. It does not
replace the timeout path after an accepted returnable handoff, and it does not fire when a downstream
child later reports its own failure.
Experience modes
EXPERIENCE_MODE shapes how the transfer is presented to the end user. It is valid on both
HANDOFF and DELEGATE.
Async dispatch
For remote agents, setASYNC: true to dispatch the handoff asynchronously. The calling agent receives a notification when the remote agent completes rather than blocking.
Memory grants
Usememory_grants to give the target agent scoped access to specific persistent memory paths.
Without this, the target agent cannot read or write the parent’s persistent variables. Each grant
declares a path and an access level.
DELEGATE
DELEGATE invokes a sub-agent synchronously, waits for it to complete, and maps the result back into the calling agent’s context. The sub-agent runs in its own scope and does not have direct access to the parent’s session variables.Syntax
Properties
Input/output mapping
TheINPUT block maps values from the parent agent’s session context into the sub-agent’s input parameters:
RETURNS block maps the sub-agent’s result fields back into the parent’s session variables:
Delegate failure strategies
Structured failure example:
Remote agent support
DELEGATE supports invoking agents running on remote services. Add aREMOTE block to configure the connection.
Remote properties
LOCATION: remote is explicit and recommended, but the compiler also treats an ENDPOINT
without LOCATION as remote. The remote block can be authored either nested under REMOTE: or
as top-level LOCATION/ENDPOINT/PROTOCOL keys on the entry.Parallel delegation (fan-out)
There is no
FAN_OUT: section in ABL. Fan-out is a runtime capability, not an authored
construct — agents do not declare it directly.__fan_out__ system tool
(you never write this tool yourself) and is bounded to 2–5 sub-tasks per message.
Separately, when multiple DELEGATE entries have their WHEN conditions satisfied on the same
turn, the runtime can run those delegations concurrently. Each delegation runs in its own scope and
its RETURNS are mapped back into the parent context as it completes.
ESCALATE
ESCALATE transfers the conversation to a human operator. It is designed for situations where the agent cannot or should not continue autonomously.Syntax
Trigger properties
PRIORITY is optional and defaults to medium. Note that ESCALATE inside an ON_ERROR handler
is not parsed — to escalate from an error handler use THEN: ESCALATE with REASON: "..."
instead of an inline ESCALATE: block.Connector action
CONNECTOR_ACTION names a connector action to invoke for ITSM integration when the escalation
fires (for example, opening an incident in an external ticketing system). It is declared at the top
level of the ESCALATE block, alongside triggers, context_for_human, routing, and
on_human_complete.
Priority levels
Context for human
Thecontext_for_human block lists session variable names to include in the escalation package. The human agent sees these values in their interface.
Routing configuration
Therouting block controls how the escalation is routed in the human agent system.
Earlier drafts used
skill_tags and priority_boost. The current runtime contract uses skills
and priority — the older keys are silently ignored. Additional advanced routing keys
(sub_type, named_agents, named_agent_options, agent_matching_conditions, voice,
flow_policy_ref / transfer_flow_policy_ref, provider_config) are also supported for
human-agent integrations.Post-completion actions
Theon_human_complete block defines what happens after the human agent finishes.
condition and an action. The action can be COMPLETE (end the conversation), HANDOFF (transfer to another agent), or CONTINUE (resume the current agent).
COMPLETE
COMPLETE defines the conditions under which the agent considers its task finished. Each completion condition specifies aWHEN expression and an optional response.
Syntax
Properties
Rich content in completion
COMPLETE responses support voice configuration and rich content, the same as any RESPOND:Completion evaluation
Completion conditions are evaluated after every turn, in declaration order. The first matching condition triggers completion. If no condition matches, the agent continues the conversation.Context Passing
Evaluation order across constructs
When multiple multi-agent constructs apply on the same turn, the runtime evaluates them in this order:- ESCALATE triggers — checked first; critical safety and compliance.
- HANDOFF rules — evaluated by priority (lower first).
- DELEGATE conditions — evaluated in declaration order.
- COMPLETE conditions — checked last.
Complete Supervisor example
Related pages
- NLU — intent classification that drives routing decisions
- Memory & Constraints — session and persistent state used in routing conditions
- Expressions & functions — condition syntax for WHEN clauses
- Lifecycle & hooks — ON_START and hooks that interact with multi-agent flows
- Rich Content & Expressions — formatting for RESPOND and COMPLETE messages