marem
04/03/2025, 1:28 PM"messagePlan": {
"idleTimeoutSeconds": 5
},
I want expecting the agent to speak again cause no customer answer. But it didn't and the call ended in silence-timed-out.
Am I missing something?Vapi Support Bot
04/03/2025, 1:30 PMjson
"messagePlan": {
"idleMessages": [
"Hello? Are you still there?",
"I notice you're thinking about this. Take your time."
],
"idleMessageMaxSpokenCount": 3,
"idleTimeoutSeconds": 5
}
According to the [Vapi documentation](https://docs.vapi.ai/api-reference/assistants/update-assistant), you need to include:
- `idleMessages`: An array of messages that will be spoken when the user is silent
- `idleMessageMaxSpokenCount`: The maximum number of times idle messages will be spoken
- `idleTimeoutSeconds`: The number of seconds of silence before an idle message is played
You can update your configuration using a PATCH request:
curl -X PATCH https://api.vapi.ai/assistant/id \
-H "Authorization: Bearer token" \
-H "Content-Type: application/json" \
-d '{
"messagePlan": {
"idleMessages": [
"Hello? Are you still there?",
"I notice you're thinking about this. Take your time."
],
"idleMessageMaxSpokenCount": 3,
"idleTimeoutSeconds": 5
}
}'
Additionally, you might want to consider adding a silenceTimeoutMessage
to be played before the call ends due to silence:
json
"messagePlan": {
"idleMessages": [
"Hello? Are you still there?"
],
"idleMessageMaxSpokenCount": 3,
"idleTimeoutSeconds": 5,
"silenceTimeoutMessage": "I notice you haven't responded. I'll end the call now, but feel free to call back later."
}
Is there anything else you'd like to know about configuring messagePlan in Vapi?
Sources:Vapi Support Bot
04/03/2025, 1:30 PMOgagaPengist
04/03/2025, 2:09 PMmarem
04/03/2025, 3:28 PMKyle Brunker
04/06/2025, 11:49 AMKyle Brunker
04/06/2025, 11:55 AMmarem
04/06/2025, 1:18 PMKyle Brunker
04/07/2025, 1:48 PMidleTimeoutSeconds
duration.
2\. `idleMessageMaxSpokenCount`: Limits how many idle messages can be spoken during the call (default is 3, min 1, max 10 according to the codebase).
3\. `idleTimeoutSeconds`: How many seconds of silence before playing an idle message (default is 10, min 5, max 60 according to the code).
To update your assistant with this configuration, you can use a PATCH request:
curl -X PATCH https://api.vapi.ai/assistant/{assistant_id} \
-H "Authorization: Bearer {your_api_key}" \
-H "Content-Type: application/json" \
-d '{
"messagePlan": {
"idleMessages": [
"Hello, are you still there?",
"I'm waiting for your response.",
"If you need more time to think, that's completely fine."
],
"idleMessageMaxSpokenCount": 3,
"idleTimeoutSeconds": 5
}
}'
Additionally, you might want to set the silenceTimeoutSeconds
parameter, which determines when the call ends due to silence. From the code, this is separate from the messagePlan and has a default of 30 seconds:
{
"messagePlan": {
/* Your messagePlan configuration */
},
"silenceTimeoutSeconds": 30
}
Kyle Brunker
04/07/2025, 1:48 PMmarem
04/07/2025, 4:54 PMKyle Brunker
04/08/2025, 10:59 PM