About squads:
# support
p
Havind build on the top of vapi openai prompt and API tools for the past 2 weeks, I ended up with a very complex prompt (resulting in increasing costs from the pov of the model usage). My idea was to split the prompt in various assistants working in a squad. I cannot understand how to make it happen as for now, when i setup an assistants chain in squad (with starting point and a tree of nodes) the squad doesn't start with the initial assistant but the second one. Also for some reason, it seems like having a lot of bugs, just like it is using the assistant I duplicated to create squad one rather than the squad one. I'm now considering working without the vapi web client (api mode only) as it's having a lot of tiny bugs slowing the development process. I think you need a serious frontend effort but I'd be happy to help you with bug listing. Can you assist me in a simple squad setup?
@User
s
Hey @paul gaston can you share the assistantId, recent call id which requires to be broken into SQUAD? Also if possible explain your process around the assistant to help you in creating the squad more perfect.
p
Shubham, the squad is very straightforward: - one assistant to answer questions based exclusively on knowledge base. - one assistant in charge to get perfectly spelled identity in french with high accuracy accurate - one assistant to perform booking operation on server CRUD - I assume one assistant to orchestrate these 3 guys and redirect to callback number if anything goes not as expected would be a solid setup to start with.
s
Hey @paul gaston can you also share the assistantId as well, which is used for doing all this stuff as you have mentioned?
p
@Shubham Bajaj, for now I have everything in the same assistant 2a1cb3ac-e289-4fe6-88c5-58bc83424895 but i'm currently working on chunking it into 4 small assistants. Not sure it will be much help in the current state. Do you think it would make sense to share my 4 assistants ids once I'm done?
Also, thank you so much for the support
s
Do let me know once your done chunking the assistant.
p
ok, i'm currently faciong big issue with spelling in french
could you advice me a mode/transcriber combination, capable of simply correclty spelling the alphabet in french? I cannot find any at the moment Any input appreciated
for now i have best results in basic letter spelling with antropic model (sonnet 3.5) azure french voice (Coralie) gladia fr transcriber (fast) 1250ms web latency which seems like a lot but i assume it can lower with ported french numbers, eventually
this prompt seems to be simpler but to work much better,
Copy code
Objectif: Validation rapide avec mécanisme d'épellation sans interruption.

## Procédure Standard
1. Premier niveau : validation rapide
  "J'ai noté [nom]. Est-ce exact ?"

2. Si correction nécessaire :
  "Pouvez-vous épeler en utilisant le code radio ? 
   Par exemple : A comme Anatole, B comme Bernard...
   Je vous écoute jusqu'à la fin sans interruption."

## Règle Stricte
- ATTENDRE la fin complète de l'épellation
- NE PAS interrompre l'utilisateur
- Confirmer UNIQUEMENT après silence prolongé

## Exemple de dialogue
Assistant : "Votre nom ?"
Humain : "Benyahia"
Assistant : "J'ai noté BENYAHIA. Est-ce exact ?"
Humain : "Non"
Assistant : "Je vous écoute épeler avec le code radio, prenez votre temps, je ne vous interromprai pas."
[Attendre l'épellation complète]
"Merci. J'ai noté : [épeler le nom complet]. Est-ce exact ?"
only because i use a better transcriber and voice I think. it's not yet very fluid but it seems to work accurately.
Ok, it seems like making the prompt simpler, using a different voice and transcriber ended up giving better results. It's not perfect but I think i'm getting somewhere. For now i'll simply create a tool updateUserName to upate a local perform a few tests, later, using a callSession object server side and i'll create the appointments based on this brick. next tspe is to fine tune this one and then i'll jump to the squad implementation with the 3 other guys much simpler i think as i already implemented them I just have to split.
(sorry for thr spam)
I'm almost done splitting my original assistant in 4 sub assistants. Not sure yet how i should articulate them but I'm going to share all of them here with you when i'm done so you can share advice if anyting looks irrelevant. - If my understand is correct about the squads, i should have one assistant manager whose role would be to delegate specific tasks to sub assistants based on user input - if my understanding is correct, each sub assistant should implement a mecanism to redirect to the assistant manager or another sub assistant in order to finalize the procedure such as CRUD on appointments. I can draw the workflow if that helps but it's pretty straightforward: - main assistant - if question -> FAQ assistant then back to main assistant - if appointment related -> spelling assistant for identity collect (persisting identity server side) -> booking assistant -> done -> main assistant OR end call OR fallback just to be sure, about implementation, in order to share variables between assistants, best practice would be to store server side and reply with updated custom variables on speific status call or is there a more elegant way to share variables in the context of the squad? TLDR: shall i use this approach to share variables between assistants https://shmbajaj.notion.site/Setting-Up-Dynamic-Variables-for-Your-Vapi-Calls-A-Quick-Guide-14077ff426238037b101f91a446f7f6a ?
for the full user name right now I have two options: - either i store it server side in a temporary CallSession object - either i share it to the member of the squad responsible for booking/updating/deleting appointments so it can call the tool directly with all parameters without any dependency to the callSession serverside. What would be best approach? i'd like to share variables in the context of the squad if possible.
i think my only conceptual concern for now is about that: how to share variables between assistants (does it happen magically by design as they share same context or shall I implement it server side)?
based on this answer i'll design the assistant manager differently and implement more or less logic server side
almost done chunking everything down, just need to figure out about these variables best practices and the assistant manager workflow and I'll be good to go I think. In two hours i'm going out for chess tournament, i'll brb later on tonight, looking forward to hear from you 🙂
h
I'm asking myself the same questions right now😊
s
@paul gaston do you mind sharing a summary where your blocked, and what you have done tried resolving it.
p
sure
i'd like to make transitions happen seamlessly
on the vapi side it looks like: {"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":" "}]}]}}
the bot works but I stil have "i'm transfering you messages"
i'm now trying with "silentTransfer": true option
i'm just struggling to find documentation on these parameters
and also i think there is a bug in vapi env, renaming assistants through ui is not being reflected as assistant keeps using its old name and raises "assistant not found name". that's a detail tho
s
Can you share the call id.
p
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:
Copy code
{
  "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
Let me know if you need any additional data
I'm a little bit under pressure cause my team is expecting this to work live on production, i told them it should but i cannot manage to remove this "i'm transferring you to the other assistant" message.
sorry for the spam tho
s
@paul gaston for this squad i don't see any transfer message because call itself is incomplete as the assistant has spoken single word
bonjor
. Your squad has one missing property for assistant destinations which is description, add description then only you will able to do the transfers.
@paul gaston please share the call id which has message content set to empty string and it's still saying some message. Do ping me once your back.