https://retellai.com/?utm_source=discord&utm_medium=seo logo
if i use a custom function with an end point, and ...
# ❓・ai-evy-support
k
@AI Evy if i use a custom function with an end point, and i unselect speak after execution because it usually takes a bit long How will the agent know when the information is retrieved from the endpoint and use it in the conversation?
a
Thanks for tagging me @K Rudy. I'll look through relevant sources and get back to you shortly.
### Answer When Speak After Execution is disabled, the agent behavior depends on whether you're using Single/Multi-Prompt or Conversation Flow: For Single/Multi-Prompt agents: The Speak After Execution setting controls whether the agent keeps talking or does other actions after the function call is completed, without waiting for the user to say anything to trigger a response. [(1) ]() However, there's a known issue: when this setting is off, the agent may get stuck and not continue the conversation after the function completes. [(2) ]() For Conversation Flow agents: The behavior is more predictable. When Wait for Result is enabled, the agent will wait for the function to finish executing before attempting to transition to any other node—this guarantees that when you reach the next node, the result is already ready to be used. [(3) ]() Since the function node isn't intended for conversation, you need to attach a conversation node to tell the user the result. You can create different conversation nodes for different function results. Recommendation: If your function takes a while, consider: 1. Enabling Speak During Execution so the agent says something like "Let me check that for you" while waiting [(1) ]() 2. If using Conversation Flow, enable Wait for Result and use the next conversation node to present the retrieved data [(3) ]()
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Agent Stuck if Speak After Execution is Off for Functions](https://discord.com/channels/1186424376300679209/1310477859051274300) [[3] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.