Skip to main content
Multi-agent orchestration distributes tasks across specialized agents, each focused on a specific domain such as billing, authentication, or order tracking. Orchestration relies on three components:
  • Routing: Determines which agent handles a request based on user intent, session state, or custom conditions. The supervisor evaluates routing rules on every message.
  • Context propagation: Gives the target agent the data it needs without asking the user to repeat themselves. Context does not transfer automatically. You must pass it explicitly.
  • Control flow: Determines whether the calling agent keeps control after routing or transfers it permanently. This controls how results flow back and whether the user notices a transfer.
Together, these mechanisms let you build systems where the user experiences a single, unified assistant while specialized agents work together behind the scenes.

Types of Orchestration

The platform supports four orchestration patterns: Sample Multi-Agent Orchestration Multi-Agent Orchestration

Configure Orchestration

You can configure orchestration in two ways:

Using the Agent Platform Studio

  • Navigate to the Agents page to view all agents in the project. Orchestration
  • Use the Canvas view to visualize relationships between agents. Orchestration
  • Select an agent to open its configuration page.
  • Configure handoffs or delegation under the Coordination section.
  • Save your changes.

Using the DSL Editor

  • Open the agent and switch to DSL view.
  • Define the orchestration logic using ABL constructs such as:
    • SUPERVISOR
    • HANDOFF
    • DELEGATE
  • Compile and save your changes.
  • Updates apply immediately after a successful compilation.
The UI and ABL are interchangeable. Changes made in ABL appear in the UI, and changes made in the UI appear in ABL.

Orchestration Patterns

Supervisor

A supervisor is a special agent that acts as the central router for a multi-agent system. It does the following:
  • Receives every incoming message.
  • Routes each message to a specific agent based on user intent, session state, channel, or custom conditions.
  • Performs pre-routing actions, such as fetching data or checking authentication state, before forwarding the request to a specialized agent.
A multi-agent system can have only one supervisor. It is the entry point for all user interactions.

How It Works

When a user sends a message, the supervisor:
  • Receives the message as the active agent.
  • Optionally performs a pre-routing action using tools.
  • Evaluates its HANDOFF rules top to bottom.
  • Routes the message to the first agent whose WHEN condition matches.
  • Regains control when the child agent completes with RETURN: true.
  • Handles the message directly if no HANDOFF rule matches and canRespondDirectly is enabled. Otherwise, it returns an error.

How to Set Up

Define a supervisor using the SUPERVISOR keyword in the ABL file.
Then define the following properties for the supervisor agent.

Examples

1. Travel Supervisor
2. Priority-ordered routing Routing rules are evaluated top to bottom. Use specific rules before general ones.

Handoff

A handoff transfers the conversation from one agent to another. The original agent stops handling the request at the point of handoff. A handoff can originate from a supervisor routing to a specialist agent, or directly from one agent to another for peer-to-peer routing. In both cases, the target agent receives the context and continues the conversation from that point.

How It Works

  • The calling agent evaluates its HANDOFF rules.
  • When a condition is met, the conversation transfers to the target agent.
  • The target agent receives the context defined in the CONTEXT block.
  • RETURN must be set to false for handoff orchestration.

How to Set Up

Configure the handoff in the originating agent, which is the agent that initiates the transfer.
  • In the Studio, open the agent and add a handoff under the Coordination section.
  • Alternatively, define the following properties in the ABL editor.
Use HANDOFF for machine-to-machine agent routing only. Use ESCALATE when the target agent is a human operator.
Context properties RETURN_HANDLERS actions
  • CLEAR - Removes the listed session variables before continuing.
  • CONTINUE - Resumes normal routing after the return.
  • RESUME_INTENT - Re-evaluates the user’s intent and re-routes.
History Strategies

Examples

1. Handoff from Supervisor
2. Handoff from an agent
3. Pass variables during handoff
4. Scoped access to memory on handoff
5. Pass complete history as context

Delegate

Delegation is a call-and-return pattern. The parent agent sends a task to a child agent, waits for the result, and then continues its own processing with the returned data. The delegation is transparent. The user does not see it.

How It Works

  1. The parent agent evaluates its DELEGATE conditions.
  2. When a condition matches, the parent sends the defined INPUT to the sub-agent.
  3. The sub-agent processes the task and returns its result through its COMPLETE property.
  4. The parent agent maps the returned values to its own session variables using RETURNS.
  5. The parent agent continues processing using the result, as defined in USE_RESULT.
  6. If the sub-agent fails or times out, ON_FAIL handles the error.

How to Set Up

Configure the delegation in the originating agent, which is the agent that initiates the transfer.
  • In the Studio, open the agent and add Delegate under the Coordination section.
  • Alternatively, define the following properties in the DELEGATE block in the ABL editor.

Examples

1. Set up delegate from an agent.
2. Corresponding Delegate Agent
3. Pass Context to Delegate Agents

Fan-out

Fan-out sends a task to multiple agents simultaneously and aggregates their results, such as searching flights and hotels in parallel. The parallel execution is transparent. The user sees a single combined response.

How It Works

  1. A user message matches the WHEN condition on multiple HANDOFF or DELEGATE rules simultaneously.
  2. All matching agents run in parallel.
  3. Each agent runs independently and returns its results.
  4. Results merge back into the calling agent’s state.
  5. The calling agent responds with the aggregated result.
  6. If one agent fails, its ON_FAIL handler runs independently and the other agents continue.

How to Set Up

You can implement fan-out in two ways:
  • Via Supervisor HANDOFF: Define multiple HANDOFF rules with the same WHEN condition and RETURN: true. Each matching rule triggers a separate agent. Use RETURN_HANDLERS to merge results as each agent returns.
  • Via DELEGATE: Define multiple DELEGATE entries with overlapping WHEN conditions. Each delegate runs independently and returns its result to the parent agent via RETURNS. Use distinct variable names in RETURNS for each delegate to prevent one result from overwriting another.

Examples

1. Via Supervisor HANDOFF - Route to multiple agents from a supervisor In the following example, when intent.category == "plan_trip" matches, all three handoff rules trigger. Each agent runs independently and returns results to the supervisor via RETURN: true. Child return data merges back into the supervisor state before the named return handler continues orchestration.
2. Via DELEGATE Multiple DELEGATE entries with overlapping WHEN conditions can execute in parallel. Each delegate returns its results independently.
3. Fan out with partial failure tolerance Each delegate has its own ON_FAIL handler. If one supplier is unavailable, the agent proceeds with partial results from the others.

Difference Between Handoff and Delegate

Difference between Delegate and Fan-out

The key distinction is parallelism and scope. Use delegation when you need a result from one sub-agent before the parent can continue. Use fan-out when you need results from multiple independent agents simultaneously — for example, searching flights and hotels at the same time.

Context Propagation Between Agents

No data is automatically shared between agents. Every piece of data that a target agent needs must be explicitly passed using one of three mechanisms: session variables, conversation history, or persistent memory grants. Memory-based Context Sharing
For more details on memory and access scopes, see the guide on memory management across agents.

Points to Note

Routing and Handoff Behavior

  1. HANDOFF rules evaluate top-to-bottom. First match wins. Place specific conditions before general ones.
  2. HANDOFF is for agent-to-agent routing only. Use ESCALATE when the target is a human operator or a queue.
  3. RETURN defaults to false. Set RETURN: true explicitly when you need a call-and-return pattern.
  4. The default history strategy is auto. Opt into summary_only for strict no-transcript transfer.

Variables and Data

  1. Null or undefined variables are not passed at handoff time. Set all required variables before the handoff condition fires.
  2. In a DELEGATE INPUT map, the left side is the sub-agent’s parameter name and the right side is the parent’s session variable. Reversing them causes empty input.
  3. In fan-out, if two delegates write to the same RETURNS variable, one overwrites the other. Use unique names per delegate output.
  4. Persistent memory requires explicit memory_grants in the CONTEXT block. Without it, the target agent cannot read the value.

Reliability

  1. Always set TIMEOUT on every DELEGATE block. Without it, a stalled sub-agent blocks the parent indefinitely.
  2. Track handoff_count in session memory and escalate when it reaches 3 or 4 to prevent routing loops.

Troubleshooting Guide

Routing and Handoff Context and Variables Delegation and Fan-out