First Message Setting on Squads
# support
j
Hi! We're encountering an issue with our squad configuration that affects the initial interaction flow. Here's our setup: We have created a squad with two assistants that can communicate with our customers. To achieve silent transfers between assistants, we've configured: Empty string ("") as the first message firstMessageMode set to assistant-speaks-first-with-model-generated-message The current issue is that having these settings, when the call starts, our initial assistant waits for the customer to speak first before starting the conversation. However, our use case requires the assistant to speak first to initiate the call. Could you please help us understand: Is there a way to maintain silent transfers while ensuring our initial assistant speaks first? Are there alternative configuration options we should consider? Thank you for your help! Best regards, CC: @Yoann C.
c
Hey Jauanjo, can you share a call ID or squad ID so I can take a look?
j
Sure: Squad ID: c2e4b4af-a014-481e-a0a0-d502cf07080e Call ID: fd704f98-5e2a-4104-a538-0433e41c141e We want to start the conversation from our side at the beggining but that the transfer betwwen agents is silent. How the calls are working now: Assistant 1: silence Customer: Hello I need help to do this (this connects to Assistant 2) Assistant 2: Let me help you Customer: Great now I need this (transfer to Assistant 1) Assistant 1: I'll help you How we want them to work: Assistant 1: Hello Customer Customer: Hello I need help to do this (this connects to Assistant 2) Assistant 2: Let me help you Customer: Great now I need this (transfer to Assistant 1) Assistant 1: I'll help you
c
You don't need to set the first message mode to
assistant-waits-for-user
for squad silent transfers. You can change the mode and silent transfers will work.
j
But when the second assistant gets back to the first one, what is going to be the first message given by the assistant?
What we need is: assistant 1 greets customer (assistant-speaks-first) When conversation returns ro assistant 1 from assistant 2: assistant must speak first but with a content gwnerated mossage
c
You just need to set the empty message in your assistant and it will do the job
empty first message\*
j
It seems to be working now. Thanks!
Hi! I think this is not working as expected
I have the assistant set with speak first but because i am using the squad, the assistant is waiting for the customer to speak (or is not speaking first)
c
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!
j
Sure! THis is an example
17495b6a-9307-4579-816e-a0bb96945a9e
@Dante
s
Call Recording: https://storage.vapi.ai/17495b6a-9307-4579-816e-a0bb96945a9e-1740150689627-f88d5058-3a88-4fa6-95ee-19b3ea540c97-mono.wav Call ID: 17495b6a-9307-4579-816e-a0bb96945a9e Call Transcript: AI: Hola, soy Celeste de Kavak, noté que estás interesado pueda ayudar o si tienes alguna duda.\n @Juanjo assistant is speaking first, can you check the call ID again.
j
Yes but not as quickly as in other calls witout the squad
When we talk to customers this is really having a negative impact on experience
Please compare with this one that uses only the first assistant of the squad (5e79414c-6929-48c2-8576-6e8c3daf6cb9)
Call ID: 17495b6a-9307-4579-816e-a0bb96945a9e starts talking at around 0:03 (using the squad) Call ID: 5e79414c-6929-48c2-8576-6e8c3daf6cb9 starts taling since 0:00 (using only the assistant)
It seems like the AI waits and if customer doesn't talks, the AI then talks
Hi! Did you have a chance to check the calls?
s
@Juanjo Apologies for the delayed response, I am in a adhoc-call will check in sometime and getback to you.
Call ID: 17495b6a-9307-4579-816e-a0bb96945a9e https://storage.vapi.ai/17495b6a-9307-4579-816e-a0bb96945a9e-1740150689627-f88d5058-3a88-4fa6-95ee-19b3ea540c97-mono.wav 🟢 15:11:14:336 CallId
17495b6a-9307-4579-816e-a0bb96945a9e
Call Picked Up. 🔵 15:11:14:652 Deepgram First Transcript Received: 🔵 15:11:15:997 [user CHECKPOINT] Model sent first output token 🔵 15:11:16:512 Voice Input Formatted: "Hola, soy Celeste de Kavak. Noté que estás interesado en comprar un auto.", Original: "Hola, soy Celeste de Kavak. Noté que estás interesado en comprar un auto." "firstMessage": "Hola, soy Celeste de Kavak, ¿Tengo el gusto con ?", "firstMessageMode": "assistant-speaks-first-with-model-generated-message", -------__----------____________________________---------------------___________ Call ID: 5e79414c-6929-48c2-8576-6e8c3daf6cb9 https://storage.vapi.ai/5e79414c-6929-48c2-8576-6e8c3daf6cb9-1740410009940-f4ac2d01-f824-4e65-9d3e-1117be115879-stereo.wav 🟢 15:13:12:171 CallId
5e79414c-6929-48c2-8576-6e8c3daf6cb9
Call Picked Up. 🔵 15:13:12:171 Say Request...61 (say: "Hola, soy Celeste de Kavak, ¿Tengo el gusto con mateo bernal?", interruptible: false, audio: false, endCallOnError: true, addToModelOutput: true, endCallAfterSpoken: false) 🔵 15:13:12:181 [user LOG] Voice cached: Hola, soy Celeste de Kavak, ¿Tengo el gusto con mateo bernal? 🔵 15:13:12:181 Say Request Saying 61... (say: Hola, soy Celeste de Kavak, ¿Tengo el gusto con mateo bernal?)
@Juanjo As evidenced in the logs and information provided above for the squad call ID, the model is generating the response, which is causing it to take approximately three seconds more than the required time. In contrast, when using only the assistant call ID, the first message was utilized, and it was cached, resulting in a voice response within a sub-second of the call.
j
Yes and how can I fix that?
I mean: I need that the call starts with my assistant talking but to keep the configuration of assistant-speaks-first-with-model-generated-message on the transfers
s
correct me if I am wrong, you want the assistant to speak quickly and be the first to respond in the squad. your first assistant has first message mode, which uses an LLM to generate the response which is then sent to the voice provider. This creates a small cycle, and if you are using your own key, it adds some extra latency. What you can do best here is either try with our key or use a static first message in possibility of service provider caches it.
j
But if I use a static first message the silent transfer wont work properly because it would greet after a transfer
c
@junajo, you can use assistant overrides and set the first message mode to assistant generates the response and skip the greeting with skipping greeting or small talk instruction in prompt as done here
j
I am not sure if this fix my problem let me rephrase it: I want my assistant 1 to start talking since the very beggining of the call 0:00 but if the Assistant 2 returns the call to Assistant 1, here I want a new message generated from the conversation. With my current config, the assistant 1 is starting to talk at 0:03. If I set the override with what you are telling me I am not sure if this makes the assistant starts talking at first.
I need the assistant to greet the customer at the beggining of the call
Example: 0:00 Assistant 1: Hello I am your assistant, how can I help you? 0:01 Customer: Hello I want help on this task this task is done by assistant 2 Transfer to assistant 2 0:03 Assistant 2: Sure lets do that... . . . 0:30 Customer: Great now I need this This task is done by assistant 1 0:32 Assistant 1: Sure let me help you
c
Hey Juanjo, you have to use three assistant squad that will solve both the immediate greeting and context-aware responses requirements. Squad Structure: 1\. Assistant_1A (Greeter) 2\. Assistant_2 (Specialist) 3\. Assistant_1B (Continuation) Expected Flow:
Copy code
0:00 Assistant_1A: "Hello I am your assistant, how can I help you?" (Immediate cached response)
0:01 Customer: "Hello I want help on this task" (Task for Assistant_2)
0:02 Assistant_1A: "I'll connect you with our specialist" (Silent transfer to Assistant_2)
0:03 Assistant_2: "Sure lets do that..."
... (Task completion)
0:30 Customer: "Great now I need this" (Task for Assistant_1)
0:32 Assistant_1B: "Based on our conversation, I understand you need..." (Context-aware response)
Transfer Configuration:
Copy code
{
  type: "assistant",
  message: "",  // Empty for silent transfer
  transferMode: "rolling-history"  // Maintains conversation context
}
Here's the detailed configuration for each: 1\. **Assistant_1A (Initial Greeter)**:
Copy code
{
  name: "Assistant_1A",
  firstMessage: "Hello I am your assistant, how can I help you?",
  firstMessageMode: "assistant-speaks-first",
  model: {
    messages: [{
      role: "system",
      content: "You are the initial greeter. After greeting, evaluate the customer's need and transfer to the appropriate assistant."
    }]
  }
}
2\. **Assistant_2 (Specialist - Unchanged)**:
Copy code
{
  name: "Assistant_2",
  firstMessage: "",
  firstMessageMode: "assistant-speaks-first-with-model-generated-message",
  model: {
    messages: [{
      role: "system",
      content: "You handle specific tasks. When task is complete, transfer back to Assistant_1B."
    }]
  }
}
3\. **Assistant_1B (Continuation)**:
Copy code
{
  name: "Assistant_1B",
  firstMessage: "",
  firstMessageMode: "assistant-speaks-first-with-model-generated-message",
  model: {
    messages: [{
      role: "system",
      content: "You are the continuation of the conversation. Generate contextual responses based on the conversation history."
    }]
  }
}
j
thanks will try that! Do you see in the near future a way to have this without the greeter?
s
Indeed, I am monitoring this pattern closely. If this development patterns continue, we will consider adding support for it.
d
Hi @Shubham Bajaj, we've tried this arrangement but there seems to be an issue with it (particularly when there's a tool call after the greeter transfers the call initially). Here are 2 call ids: 248b980e-8ca7-4336-86af-c6ae5f6a1936 5f9c3fde-1433-477f-9c14-7310273fd4e9 could you please take a look?
The error that I see is `pipline-error-anthropic-llm-failed`:
Copy code
Model request failed (attempt #2, reason: (messages.7: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01TYNqJ7H3ynwcsFeznbephM. Each `tool_use` block must have a corresponding `tool_result` block in the next message.))
Actually, this seems to fail every single time a tool is used, irregardless of the stage of the conversation. Id: ff3771b2-c241-41e1-892f-ebdb573083f7
s
@Dante There was an issue on the Claude side where they made a change in how messages and tool calls are handled/ordered, and because of this, all of the calls related to Claude model which includes tool calls were failing. As you can see in the screen show, there was a spike of errors. This has been fixed yesterday. I suggest you try making 1-2 calls again and then let me know how it goes for you. Until then, I have kept your ticket in priority, so we'll try to reach back to you as soon as possible. https://cdn.discordapp.com/attachments/1339303957675245669/1351925489392029726/Screenshot_2025-03-19_at_7.56.51_PM.png?ex=67dc263a&is=67dad4ba&hm=9230b3f26625bccc72f1b97fa4fe6be77970858cd4845b48afcf49e147782209&
d
Thanks. I'm still seeing the same issue today, call id: 0f7f2ffb-f25b-474a-b811-ec511e38bd6e
s
@Dante Just looked into the call logs, and yes, it's happening for this call. Now I've shared with the team, and they're looking into it.
3 Views