https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can i make my agent wait x seconds after sayin...
# ❓・ai-evy-support
n
@AI Evy how can i make my agent wait x seconds after saying something?
a
Thanks for tagging me @Nicolas. I'll look through relevant sources and get back to you shortly.
### Answer To add pauses in your agent's speech in Retell AI, use spaced dashes (
-
) with spaces around each dash [(1) ]() . For a short pause:
Copy code
The number is 2 - 1 - 3 - 4
For longer pauses, add multiple dashes with double spaces between them:
Copy code
The number is 2 - - - - 1 - - - - 3
The key detail: spaces around the dashes are critical for proper pausing behavior . If you're using ElevenLabs, you can also try SSML tags like
<break time="3s" />
, though the maximum pause supported is 3.5 seconds . However, the official documentation focuses on the spaced dash method . Note that some users have reported the dash method causing unexpected sounds with certain TTS providers and voices . If you experience issues, you may need to adjust your prompt or try wrapping the break tag in a
<speak>
tag .
​ To learn more, see the sources I considered: [[1] Inserting a pause in the converation](https://community.retellai.com/t/inserting-a-pause-in-the-converation/268) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy while i function is running i want to make the agent engaging with the user.. and saying every 20sec a filler phrase. what is the best way to model this in the conversation node?
a
Thanks for the follow-up, @Nicolas. I'll get back to you soon.
### Answer --- When configuring functions in conversation nodes, you can control the agent's speech behavior during function execution using the "Speak During Execution" setting [(1) ]() . In the conversation node settings where you add your function, configure it to allow the agent to speak while the function runs . The agent can continue talking with the user while a function executes . To implement filler phrases every 20 seconds: 1. Enable "Speak During Execution" in your function configuration 2. Update the node instruction to guide the LLM on when and what to say during execution For example, in your node instruction, you could add guidance like:
Copy code
While waiting for the function to complete, keep the user engaged by saying brief filler phrases every 20 seconds such as "Just a moment, I'm checking that for you..." or "Almost there, thanks for your patience..."
The key is that the LLM receives both the node instruction and the list of available functions, and during conversation, it can maintain dialogue with the user while the function executes in the background . Additionally, you can configure "Speak After Execution" settings to control whether the agent speaks when the function completes .
​ To learn more, see the sources I considered: [[1] Node Functions](https://docs.retellai.com/build/conversation-flow/conversation-node-functions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
@AI Evy I've implemented the pauses into a dynamic variable as shows below and when the agent reads the dynamic variabe sometimes it removes the spaces aroud the - and other times it removed one of the - between each character. How can I prevent this? 2 - - 1 - - 3
a
Thanks for the follow-up, @Keith. I'll get back to you soon.
### Answer The issue you're experiencing is likely related to how dynamic variables handle spacing. According to the documentation, the spaces around the variable name will be trimmed when evaluating the variable [(1) ]() . When you pass
2 - - 1 - - 3
as a dynamic variable value, the LLM may be processing or reformatting the text, which can cause the spacing to be inconsistent. Here are some approaches to prevent this: 1. Ensure proper formatting in your dynamic variable value When setting the dynamic variable value (e.g., in your API call or webhook) , make sure you're including the exact spacing required. The documentation specifies that spaces around the dash are important for proper pausing behavior [(2) ]() . 2. Use the correct pause format For longer pauses, the format should have **double spaces between the dashes**:
Copy code
2 - - 1 - - 3
// Notice the double spaces between the dashes
3. Consider prompting the LLM to preserve formatting In your prompt or node instruction, you could add guidance like:
Copy code
When reading the {{variable_name}}, read it exactly as provided, preserving all spaces and dashes for proper pacing.
4. Test with different variable placement Based on the community discussion [(3) ]() , there have been cases where dynamic variables behave differently depending on where they're referenced. You might want to test if placing the variable in different parts of your prompt affects how it's processed. If the issue persists, you may need to handle the pause formatting directly in your prompt instructions rather than relying solely on the dynamic variable to preserve the exact spacing.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Add pause or read slowly](https://docs.retellai.com/build/add-pause) [[3] Dynamic Variables](https://discord.com/channels/1186424376300679209/1340177140204699649) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
Thank you, so far your 3rd reccomendation has worked. @AI Evy
a
Thanks for the follow-up, @Keith. I'll get back to you soon.
### Answer That's great to hear! I'm glad adding prompt instructions to preserve the formatting worked for your use case. If you encounter any other issues with dynamic variables or need further assistance with Retell AI, feel free to reach out.
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the feedback, glad I was helpful.