Handoff For Chat
# support
x
Hi - Just want to know if the Handoff Functionality is supported for Chat feature - I want a multibot chat system that is able to create tickets in our app but not sure if Handoff works for chat
v
Yes, the Handoff functionality is supported for the Chat feature in Vapi, allowing you to build a multibot chat system. You can configure handoffs between assistants using the Handoff Tool. Here’s a basic example of how to define a handoff destination in your chat assistant configuration:
Copy code
json
{
  "tools": [
    {
      "type": "handoff",
      "destinations": [
        {
          "type": "assistant",
          "assistantName": "TicketingBot",
          "description": "Handles ticket creation requests"
        }
      ]
    }
  ]
}
This setup lets your chat assistant transfer conversations to a specialized bot (e.g., for ticket creation) seamlessly. For more details, see the [Handoff Tool documentation](https://docs.vapi.ai/tools/handoff). Source: - [Handoff Tool documentation](https://docs.vapi.ai/tools/handoff)
x
@Vapi Support Bot Got it! How does it work? Will it be in the same widget on my website or if its a multibot chat system will it have different widgets? also - is there a way for me to test this in the vapi dashboard
v
You can test handoff functionality directly in the Vapi dashboard by configuring your assistants with the handoff tool and simulating chat flows. For example, set up two assistants and use a configuration like:
Copy code
json
{
  "tools": [
    {
      "type": "handoff",
      "destinations": [
        { "type": "assistant", "assistantName": "TicketingBot", "description": "Handles ticket creation" }
      ]
    }
  ]
}
This lets you verify seamless handoffs between bots in your test environment. For more, see the [Handoff Tool documentation](https://docs.vapi.ai/tools/handoff). Source: - [Handoff Tool documentation](https://docs.vapi.ai/tools/handoff)
x
Do i need to setup a squad to do this? because I am trying to test one of my agents that has a handoff tool that is supposed to call my other agent but the handoff_tool is returning No handoff destination returned."
@Vapi Support Bot @Vapi would really appreciate some help on this!
v
Thanks for sharing the error message. To help troubleshoot, could you confirm if both agents (the one initiating the handoff and the target agent) are part of the same squad and that the assistant name or ID used in your handoff configuration exactly matches the target agent's details? This is required for the handoff to work as expected according to the [Handoff Tool documentation](https://docs.vapi.ai/tools/handoff). Source: - [Handoff Tool documentation](https://docs.vapi.ai/tools/handoff)
x
@Vapi Support Bot Yes - they are in the same squad and they are connected. I just tested again after removing the parameters in the handoff tool and now when I test my first bot it initiates handoff but after the handoff is initiated nothing happens. The way I'm testing is by going to the Assistants tab, going to my first bot that has the handoff tool pointing towards the second bot, press the Chat button to test and chat with it there but after handoff nothing happens here are the chat transcripts: Chat ID: 6971852b-0c6f-4c0c-a525-2ef34cf4cbaf Also why is it working after I remove the parameters? I need to be able to pass data from the first bot to the second one how else do I do that https://cdn.discordapp.com/attachments/1440328839413633164/1440693064787300383/message.txt?ex=691f1579&is=691dc3f9&hm=9fa68130adb5e1b40af46ccd8cc892753b8d7ae7e01e6e2b2b663e7b2cfd986f&
@Vapi Support Bot bumping this!
h
Hi everyone! Do we also have text-based conversation handover to a human in Vapi?
c
We do not have a chat client that allows humans to communicate over chat, but sounds like an interesting idea. If you would like to see that feature on our platform, feel free to add it to the feature request list here -->
We do not have a chat client that allows humans to communicate over chat, but sounds like an interesting idea. If you would like to see that feature on our platform, feel free to add it to the feature request list here -->
x
Do webhooks work for Chat API? I configured serverUrl on two assistants who are part of a squad to check whether handoff is working correctly but no webhook events are being sent during Chat API conversations. I'm using: POST https://api.vapi.ai/chat The webhooks only seem to fire for voice calls. Can you confirm if: 1. Webhooks are supported for Chat API? 2. If so, what events should I expect to receive? 3. If not, what's the recommended way to debug Squad handoffs in Chat API? @Vapi Support Bot @Vapi
c
Yes, **webhooks are supported for the Chat API**, but they won’t fire unless you explicitly enable the correct
serverMessages
. Right now your webhooks aren’t triggering because the default
serverMessages
do not include chat-specific events like
chat.created
or
transfer-update
. What you need to do: Add the chat and handoff event types to each assistant’s
serverMessages
, for example:
Copy code
json
{
  "serverUrl": "https://your-webhook-url.com",
  "serverMessages": [
    "conversation-update",
    "function-call",
    "tool-calls",
    "chat.created",
    "transfer-update"
  ]
}
Events you can receive for Chat API: -
chat.created
-
chat.deleted
-
transfer-update
(handoffs) -
tool-calls
/
tool.completed
Debugging squad handoffs To debug handoffs via webhooks, add
transfer-update
to both assistants in the squad. Webhook payloads will show the from/to assistants for each transfer. --- If you update
serverMessages
on both assistants, your webhooks will start firing for Chat API conversations.
2 Views