https://retellai.com/?utm_source=discord&utm_medium=seo logo
j
@AI Evy Hello! Does anyone know a solution for the following? It's a problem I've had many times: I have a multi-prompt agent, and in each state, it has the end call function: "end_call_26." Sometimes, when the call ends, the agent doesn't end it but instead verbally announces the execution of the tool. Any solution for this? Agent: functions.end_call_26({execution_message: "Gracias por tu tiempo, FRANCEY. Que tengas un buen día."})
a
Thanks for tagging me @juanfgx. I'll look through relevant sources and get back to you shortly.
### Answer There are several solutions to prevent the agent from verbally announcing the end call function execution [(1) ]() : Solution 1: Use "NO_RESPONSE_NEEDED" in the execution message Set the execution message to "NO_RESPONSE_NEEDED" in the function description . This prevents the agent from saying the execution message out loud . Solution 2: Add Response Guidelines to Your Prompt Add a "Response Guidelines and Style Guardrails" section at the top of your prompt, clearly mentioning that function execution statements should be avoided . You can also write explicit negative prompts like "Do NOT say function execution messages such as 'Executing transfer call now' or 'Transitioning to XYZ state'" . Solution 3: Proper End Call Configuration Make sure you have the end call tool properly configured [(2) ]() . The agent won't end calls automatically unless you configure when and how the call should be terminated using the end call tool . Define specific conditions under which the call should be terminated, such as "If the user says 'thank you', 'goodbye', or 'bye', use the end_call tool to terminate the conversation" . Solution 4: Function Placement For multi-prompt agents, it's best practice to keep general functions like end call at the agent level rather than in individual states, as these functions can be reused across multiple states [(3) ]() . State functions are limited to that specific state only . The key is ensuring your prompt instructs the agent to use the end_call function properly while preventing it from announcing the function execution [(4) ]() [(
1) ]() .
​ To learn more, see the sources I considered: [[1] Agent say "I'll now end the call" after they say "Goodbye"](https://discord.com/channels/1186424376300679209/1282818009035046973) [[2] End call](https://docs.retellai.com/build/single-multi-prompt/end-call) [[3] Discord message from @jayzpio on 2025-01-24](https://discord.com/channels/1186424376300679209/1294891368505937952/1332178711369482302) [[4] End Call Function Doesn’t Work](https://discord.com/channels/1186424376300679209/1356072431994933399) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.