squads: can you make redirection to other squad as...
# support
p
when an assistant answers the initial call and redirects the user to an other assistant in the flow of the conversation, is it possible to make this happen silently? I'd like to implement a conversation mimicking a single agent through a squad.
v
message has been deleted
@paul gaston Yes, it is possible to create a seamless transition between different assistants in a conversation flow, giving the impression of a single agent. This can be achieved by using backend logic to manage the handoff between assistants without notifying the user of the switch. The transition should be designed to maintain context and continuity so that the user experiences a cohesive conversation. If you need guidance on implementing this in your specific setup or require technical details on how to configure your Voice API to support this functionality, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
s
> when an assistant answers the initial call and redirects the user to an other assistant in the flow of the conversation, is it possible to make this happen silently? Set the assistant destination message content to empty string and then it will do the silent transfer. > I'd like to implement a conversation mimicking a single agent through a squad. A squad needs to have atleast 2 members.
example-squad-config-for-slient-transfer
Copy code
json
{
  "members": [
    {
      "assistantId": "insert-first-assistant-id-here",
      "assistantDestinations": [
        {
          "assistantName": "insert-first-destination-assistant-name-here",
          "message": " "
        }
      ]
    },
    {
      "assistantId": "insert-first-destination-assistant-id-here",
      "assistantDestinations": []
    }
  ]
}
p
thank you, if my understanding is correct: - your server simply needs to return an array of members - in this array, each object contains assistantsId, an array of potential destinations and a message to be left blank in order to make it happen silently. - assistantDestination just takes names, not ids right? I'll implement that on the server side. Quick question: - does the server needs to reply that only when phone call begins or does it have to handle transitions between assistants aswell?
s
> does the server needs to reply that only when phone call begins or does it have to handle transitions between assistants aswell? Reply only when phone call begins!!
p
thank you
i'm starting squad implementation now
i have splitted my assistants in 4 sub assistants
keeping you updated the only point i need to clarify for now is about variables handling (implicit in the context of squad, or explicitely thourgh server implementation)
hope you are doing good today @Shubham Bajaj 🙂
s
@paul gaston sorry I couldn't understand, can you please rephrase it.
p
there are two questions: 1. about server side implementation: a Do I need to explicitely handle status update server side, everytime the the squad updates status to go to the next assistant b Can I delegate this job to the squad orchestrator (manager) 2. about variables sharing between agents: a Little bit the same as first question: how to share variables between assistants? Do i need to implement it server side or is there a context shared by agents? b Overall I'm not sure what to delegate to the squad context vs what to implement server side Also, for now, I haven't properly created a squad on vapi ui, I just want to return the following from the server if i'm correct:
Copy code
render json: {
            members: [
              {
                assistantId: ENV['MANAGER_ASSISTANT_ID'],
                assistantDestinations: [
                  {
                    assistantName: 'faq',
                    assistantId: ENV['FAQ_ASSISTANT_ID']
                  },
                  {
                    assistantName: 'spelling',
                    assistantId: ENV['SPELLING_ASSISTANT_ID']
                  },
                  {
                    assistantName: 'booking',
                    assistantId: ENV['BOOKING_ASSISTANT_ID']
                  }
                ]
              }
            ]
          }, status: :ok
- Can you confirm I have to use "an empty assistant" as an entry point? to give you more info, here are the 4 assistants I have: MANAGER_ASSISTANT_ID=5f4faadd-5888-4ad7-a504-8f3035830b94 FAQ_ASSISTANT_ID=0c2fd21f-d0bf-4353-a76d-0348b879cb75 SPELLING_ASSISTANT_ID=beecc680-7d5b-4c2c-bc1f-771dbc0aefdf BOOKING_ASSISTANT_ID=67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f I tried to use workflow on vapi website but it doesn't work as expected, I believe its worth sharing the workflow picture so you have an idea of what we are trying to accomplish: Let me know if you need more details https://cdn.discordapp.com/attachments/1308156708958371952/1309136457285369856/Screenshot_2024-11-21_at_13.06.24.png?ex=67407bd5&is=673f2a55&hm=dcc71f19c030202dcbcb14ec7e5e9f3a5a23168d5d70e15c8e49410244e3dd90&
I have so many questions about destinations nesting also, but for now I just want to make it work, deploying on server atm to test
For now, on status update, my server responds : {"members":[{"assistant_id":"5f4faadd-5888-4ad7-a504-8f3035830b94","assistant_destinations":[{"assistant_name":"faq","assistant_id":"0c2fd21f-d0bf-4353-a76d-0348b879cb75"},{"assistant_name":"spelling","assistant_id":"beecc680-7d5b-4c2c-bc1f-771dbc0aefdf"},{"assistant_name":"booking","assistant_id":"67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f"}]}]} but nothing happens
Do you confirm I do not need to create a squad on vapi to use this feature?
ok i think i understand, the server response is not matching vapi expectations, updating structure to that:
Copy code
render json: {
      squad: {
        members: [
          {
            assistantId: ENV['MANAGER_ASSISTANT_ID'],
            assistantDestinations: [
              {
                type: "assistant",
                assistantName: "faq",
                message: " ",
                description: "Transfer to FAQ assistant for general questions"
              },
              {
                type: "assistant",
                assistantName: "spelling",
                message: " ",
                description: "Transfer to spelling assistant for name collection"
              },
              {
                type: "assistant",
                assistantName: "booking",
                message: " ",
                description: "Transfer to booking assistant for appointment management"
              }
            ]
          },
          {
            assistant: {
              name: "faq",
              assistantId: ENV['FAQ_ASSISTANT_ID']
            }
          },
          {
            assistant: {
              name: "spelling",
              assistantId: ENV['SPELLING_ASSISTANT_ID']
            }
          },
          {
            assistant: {
              name: "booking",
              assistantId: ENV['BOOKING_ASSISTANT_ID']
            }
          }
        ]
      }
    }, status: :ok
something confuses me tho, shall I add assistant destination for each sub assistant aswell?
well, it doesn't work, the squad manager isn't picking the phone when the server replies this.
I assume i should reply to assistant-request not status call
how do you get server call assistant-request? I cannot see it in the webhook neither in the list of server events in the advanced tab
as per the documentation: https://docs.vapi.ai/squads-example it should be an assistant-request call to the server, am I correct?
maybe i should ha no assistant connected to the phone number so it does the assistant-request?
I have managed to have the assistant request call when i call the phone number, the server replied: "squad":{"members":[{"assistant_id":"5f4faadd-5888-4ad7-a504-8f3035830b94","assistant_destinations":[{"type":"assistant","assistant_name":"faq","message":" ","description":"Transfer à l'assistant de faq"},{"type":"assistant","assistant_name":"spelling","message":" ","description":"Transfer à l'assistant de spelling"},{"type":"assistant","assistant_name":"booking","message":" ","description":"Transfer à l'assistant de booking"}]},{"assistant":{"name":"faq","assistant_id":"0c2fd21f-d0bf-4353-a76d-0348b879cb75"}},{"assistant":{"name":"spelling","assistant_id":"beecc680-7d5b-4c2c-bc1f-771dbc0aefdf"}},{"assistant":{"name":"booking","assistant_id":"67ed59f3-2ad6-44b2-b244-4e4f0a4ac83f"}}]}} but nothing happened
i created this squad: 374edb36-0fd1-4c77-b8dd-19f5d2c6d0fb
i'm stuck at the moment, it doesn't seem to work properly even on the squad screen. Even if I input a prompt and use the arrows the sub assistants don't follow their exact prompt.
I think i need support
maybe it's a problem in the prompt
"i have it somehow working"
with vapi ui it's impossible to transfer without messages, is it correct?
I understand the problem: - to test squads without server implementation i use the vapi UI (where transitions are obvious) - there is no way to test it from web client (only using production phone) number if you want to do it server side as it relies on assistant-request call (where no assistant should be associated to phone number) Is that correct?
If I manage to implement a workflow that works for me in the ui, can you help me port it in a similar server response?
so i can have the same behaviors without transitions
empty string in the vapi ui doesn"t seem to provide this seamless transition: the assistant keeps saying: 'im redirecting you to an other assistant' and we would like to avoid this behavior.
s
could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong
p
i shared it in other message
I replied to you 40minutes ago, this is the same issue, we can close one of the two discussion s.
silentTransfer: true doesn't work. sure I update production adn send call id in 1Mn deploying now. call id: 725c7677-5216-4594-9583-23e91f054e28 current response to assistant-request: {"squad":{"members":[{"assistant_id":"5f4faadd-5888-4ad7-a504-8f3035830b94","assistant_destinations":[{"type":"assistant","assistant_name":"faq","message":" "},{"type":"assistant","assistant_name":"spelling","message":" "},{"type":"assistant","assistant_name":"booking","message":" "}]},{"assistant_id":"0c2fd21f-d0bf-4353-a76d-0348b879cb75","assistant_destinations":[{"type":"assistant","assistant_name":"manager","message":" "},{"type":"assistant","assistant_name":"spelling","message":" "},{"type":"assistant","assistant_name":"booking","message":" "}]},{"assistant_id":"beecc680-7d5b-4c2c-bc1f-771dbc0aefdf","assistant_destinations":[{"type":"assistant","assistant_name":"manager","message":" "},{"type":"assistant","assistant_name":"faq","message":" "},{"type":"assistant","assistant_name":"booking","message":" "}]},{"assistant_id":"5d7013a7-2b66-42b9-aa1a-2142549d9da3","assistant_destinations":[{"type":"assistant","assistant_name":"manager","message":" "},{"type":"assistant","assistant_name":"spelling","message":" "},{"type":"assistant","assistant_name":"faq","message":" "}]}]}} state of the squad: Not tested end to end but seems to work as intended but is not seamlessly transfering from an agent to another, instead it says: "I'm transfering you to the ... agent". Let me know if I can provide any other useful details @Shubham Bajaj i'm here now, looking forward to solve this issue
it's the same problem: what must be included in the assistant-request to avoid transitions saying "I'm transferring you to"....
_____ initially you told me that having empty string message key would prevent agent to say: "I'm transferring you to.." But it doesn"t on my end.
@Shubham Bajaj did you had the chance to check the details yet by any chance?
this doesn't make silent transferts in my case. is it normal?
i can't see any specific parameter in the https://docs.vapi.ai/api-reference/squads/create
are you sure it is possible?
s
@paul gaston I am 100% sure it's possible, doable and we are doing it. The call id you shared doesn't holds any transfer request, and just to inform you description property is missing from squad assistant destinations property which causes squad transfer failures.
@paul gaston request to check call id and ping me once your back.
5 Views