A Handoff defines how and when GenerativeAgent routes a conversation to a human agent queue. Unlike a raw system transfer, a Handoff is availability-aware: it resolves agent availability and provides GenerativeAgent with the appropriate instructions for the current state, covering both the agent-available and agent-unavailable cases. Handoffs can be triggered from a Topic article or from inside a Task. Use a Handoff any time a conversation should reach a human agent queue.Documentation Index
Fetch the complete documentation index at: https://docs.asapp.com/llms.txt
Use this file to discover all available pages before exploring further.
How Handoffs Work
When a Topic article with an associated Handoff is relevant to the conversation, the Handoff provides GenerativeAgent with the appropriate instructions. If agents are available, GenerativeAgent receives the agent-available block (e.g., collect context and confirm the transfer). If agents are not available, GenerativeAgent receives the agent-unavailable block (e.g., inform the caller of business hours, offer a callback). Availability is resolved by the Handoff before GenerativeAgent is invoked. GenerativeAgent does not check the schedule itself. It only sees the instruction set for the current availability state. You can configure the transfer destination for each Handoff and decide which Handoff to associate with each Topic article.Configure Handoffs
To create a handoff, select Handoffs in the left-hand menu of the AI Console. Then click Create Handoff and follow the steps below.
Define Handoff Details
Provide a name and description for the handoff. The description should help GenerativeAgent understand when this handoff should be triggered.Click Generate handoff to create it.
Write Agent Available Instructions
These instructions tell GenerativeAgent what to do when the destination queue has agents available. You can instruct GenerativeAgent to:
- Transfer immediately
- Ask the caller for confirmation before transferring
- Collect specific information before the transfer
handoff_[handoff_name] (e.g., a handoff named “Billing Support” produces the function handoff_billing_support). You do not need to create this function manually; it is generated from the handoff configuration.Write Agent Unavailable Instructions
These instructions tell GenerativeAgent what to say when agents are not available. For example:“I apologize, there are no agents available at this time. Please try calling back another time. I would be happy to help you with anything else. Is there anything I can assist you with now?”
Configure the Handoff Destination
The destination defines where the conversation will be routed and when agents are available. Configure it as a JSON object.The destination JSON is an array of queue objects. The AI Console provides example templates via the Examples dropdown.
When the handoff configuration is saved, the system validates the destination JSON schema and confirms the referenced system transfer function exists.
Example: Queue open 24/7
Example: Queue with business hours
Example: Full configuration with date exceptions and language support
Destination fields
| Field | Required | Description |
|---|---|---|
name | Yes | The name of the queue. |
type | Yes | The type of destination. Use "Agent_queue". |
enabled | Yes | Whether this destination is active. |
open_24 | Yes | If true, the queue is always available. If false, you must provide weekly_hours. |
timezone | Yes | IANA timezone string (e.g., America/New_York, America/Los_Angeles). |
transfer_function_name | Yes | The system transfer function to call when this destination is used. Must match an existing system transfer function. |
weekly_hours | If open_24 is false | Per-day availability. Each weekday (mon through sun) maps to an array of {"start": "HH:MM", "end": "HH:MM"} intervals. Multiple intervals per day are supported for split shifts. Days not listed are treated as closed. |
date_exceptions | No | Override specific dates. Keyed by YYYY-MM-DD. Each value is one of: {"closed": true}, {"open_24": true}, or {"intervals": [{"start": "HH:MM", "end": "HH:MM"}]}. |
supported_channel_types | No | Array of channel types this destination supports ("voice", "chat"). Omitted means all channels. |
supported_languages | No | Array of BCP 47 language codes (e.g., "en", "es"). Omitted means all languages. |
The
transfer_function_name must reference a system transfer function that already exists in your configuration. This function controls what parameters (SIP headers, transfer variables, etc.) are passed to your telephony or contact center system during the transfer. See System Transfer Functions for setup details.Associate Handoffs with Topics
After creating a Handoff, you need to associate it with the relevant Topics in your knowledge base. This is what connects caller intent to a routing destination. When GenerativeAgent matches a conversation to a Topic that has an associated Handoff, it evaluates whether to escalate based on the conversation context and the Handoff’s conditions. Each Topic can have one or more Handoff scenarios. For example, a “Billing inquiry” Topic might route to a “Billing Support” queue during business hours and to a “General Support” queue after hours. To associate a handoff with a topic:- Navigate to Knowledge in the left-hand menu of the AI Console.
- Select a topic from the list of topics.
- In the topic details, scroll down to the Handoff scenarios section.
- Click on Add handoff and select the handoff you want to associate with the topic.

Handoffs and System Transfers
While Handoffs and system transfers may look similar, they operate at different layers. Handoffs are the right tool any time a conversation should reach a human agent queue, whether triggered from a Topic article or from inside a Task. The Handoff resolves availability, provides GenerativeAgent with the appropriate instructions, and initiates the transfer using the associated system transfer function. System transfers are the underlying mechanism that defines what gets sent during a transfer. Thetransfer_function_name on a Handoff destination points to a system transfer function, which controls the parameters passed to the receiving system (e.g., SIP headers, output context on a call transfer). System transfers are associated with Handoffs. Builders should reach for Handoffs to initiate any transfer to a human agent rather than adding system transfer functions as a standalone escalation path.
When to Use Handoffs
Use handoffs when you want to ensure that customers receive timely and relevant assistance from human agents when GenerativeAgent escalates their conversations. Handoffs are particularly useful in scenarios where:- The customer’s issue is complex and requires human judgment or empathy.
- The customer requests to speak with a human agent.
- GenerativeAgent identifies that it cannot assist the customer effectively and determines that a handoff is necessary.
- When the customer’s issue requires an API call before the handoff (such as fetching data like account status, etc). In this case, you can use a Task to perform the API call and then transfer the conversation to a human agent with the relevant information.