https://retellai.com/?utm_source=discord&utm_medium=seo logo
I am calling the right agent
# ❓・ai-evy-support
a
I am calling the right agent. I can see that calls appear in history. I have created a new webhook and it works. But post-call workflow is not being triggered at all. I have added the correct url to the agent-level webhook @AI Evy
a
Thanks for tagging me @anton333_50203. I'll look through relevant sources and get back to you shortly.
### Answer Let me help you troubleshoot the post-call webhook issue. Based on the documentation, here are the key points to verify: Webhook Events and Response Requirements: The webhook system expects a successful status code (2xx) to be returned with no body expected [(1) ]() . Make sure your webhook endpoint is properly responding to the requests. Agent-Level Webhook Configuration: The webhook URL should be set at the agent level using the
webhook_url
parameter [(2) ]() [(3) ]() . You can verify this is properly configured by checking your agent settings - the webhook URL binds webhook events for the specific agent and will ignore the account level webhook for that agent [(3) ]() . Post-Call Analysis Dependency: Post-call analysis data will not be populated for non-connected calls and calls where no conversation happened [(4) ]() . Ensure your calls are actually connecting and include meaningful conversation content. Potential Compatibility Issue: There's a known issue where inbound webhook URLs at the phone number level may conflict with agent-level webhook events (call_started, call_ended, call_analyzed) [(5) ]() . If you're using both an inbound call webhook and agent-level webhooks, this could prevent the post-call workflow from triggering properly. Verification Steps: 1. Confirm your webhook endpoint returns a 2xx status code 2. Check that calls are fully connected with actual conversation content 3. Verify you're not using conflicting webhook configurations at both phone number and agent levels 4. Revi
ew the webhook URL format in your agent configuration If the issue persists after checking these items, you might want to contact support for further investigation.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Update Agent](https://docs.retellai.com/api-references/update-agent) [[3] Get Agent](https://docs.retellai.com/api-references/get-agent) [[4] Post Call Analysis Overview](https://docs.retellai.com/features/post-call-analysis-overview) [[5] inbound webhook URL failing to save (or stay saved) and wont work together with conversation agaent](https://discord.com/channels/1186424376300679209/1398428473781125314) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
I guess the issue was with the specific agent? A bug i guess, because after I duplicated the agent, it started workign as intended
I guess the issue was with the specific agent? A bug i guess, because after I duplicated the agent, it started workign as intended @AI Evy
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer That's great that duplicating the agent resolved your webhook issue! This suggests there may have been a configuration issue or corruption with the original agent that wasn't immediately visible. When you create or update an agent, the webhook URL is configured using the
webhook_url
parameter [(1) ]() [(2) ]() . The system binds webhook events for the specific agent to the specified URL and ignores the account level webhook for that agent [(2) ]() [(3) ]() .
Copy code
javascript
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
  webhook_url: "<https://webhook-url-here%22>
}) ;
[(4) ]() Since duplicating the agent fixed the problem, the new agent likely has a clean configuration state. This is actually a useful troubleshooting approach - sometimes recreating resources can resolve underlying configuration issues that aren't easily identifiable. For future reference, you can verify your agent's webhook configuration by retrieving the agent details to confirm the
webhook_url
is properly set [(5) ]() . The webhook system expects successful responses and handles real-time call data transmission for events like call analysis [(6) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Update Agent](https://docs.retellai.com/api-references/update-agent) [[3] Update Agent](https://docs.retellai.com/api-references/update-agent) [[4] Create Agent](https://docs.retellai.com/api-references/create-agent) [[5] Get Agent](https://docs.retellai.com/api-references/get-agent) [[6] Retell AI Webhooks | AI Voice Agents With Live Data | Retell AI](https://www.retellai.com/blog/retell-ai-webhooks-feature) ​
a
Another question. Should I set to extract variables at the agent-level in myl-prompt or at the tool level? I just need to extract some of the user's details but detail collection is split into two node @AI Evy
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer For extracting user details across multiple nodes in a multi-prompt agent, you should use the Extract Dynamic Variables tool at the node level where you need to collect specific information [(1) ]() . The Extract Dynamic Variables tool is designed to extract values from user responses and save them as dynamic variables . Since your detail collection is split into two nodes, you can add Extract Dynamic Variable tools to each node where you need to collect specific information . Here's the recommended approach: 1. Add Extract Dynamic Variable tools at the node level where you need to collect specific user details 2. Configure variables for each tool by clicking "+Add" and filling in the Variable Name, Description, Variable Type (Text, Number, Enum, or Boolean) , and Enum Options if applicable 3. Update your prompt to explicitly indicate when the extraction function should be invoked For example, you can include in your prompt:
Copy code
When user states his name and phone number, please extract the information by calling the `extract_user_details` function.
Best Practice for Function Placement: According to community feedback, it's best practice to keep general functions at the agent level (like end call functions) and state-specific functions at the node level [(2) ]() . Since your detail extraction is specific to certain nodes in your conversation flow, placing the Extract Dynamic Variables tools at the node level is the appropriate approach . The extracted variables will be available as dynamic variables throughout your agent using the
{{variable_name}}
syntax, which you can use in prompts, begin messages, tool descriptions, and other parts of your agent configuration [(3) ]() .
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[2] Discord message from @_superwhale on 2025-01-24](https://discord.com/channels/1186424376300679209/1294891368505937952/1332171725101600880) [[3] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
my bot is ignoring my instructions to populate extract_job_summary with these instructions ""2a. - SET {{job_summary}}." @AI Evy
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
Common Issues to Check: Based on community feedback, one common issue is having "opt out sensitive data" enabled, which prevents variables from appearing in call logs [(2) ]() . Make sure this setting is disabled if you want to see the extracted variables in your call logs . Variable Access: Once extracted, the variables should be available using the
{{variable_name}}
syntax throughout your agent [(1) ]() . However, the instruction "SET {{job_summary}}" seems incorrect - you don't manually "set" variables in prompts. Instead, the Extract Dynamic Variables tool automatically populates them when the function is called . Recommended Approach: 1. Configure your Extract Dynamic Variables tool with a variable named "job_summary" 2. Update your prompt to clearly instruct when to call the extraction function 3. Ensure "opt out sensitive data" is disabled [(2) ]() 4. Test the flow and check the call logs for the extracted variables The extracted variables will be automatically populated when the function is triggered, not through manual "SET" instructions in the prompt.
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[2] How are Extract Variable Nodes supposed to be used?](https://discord.com/channels/1186424376300679209/1396764428921340005) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Based on the documentation, there are several key points to ensure your Extract Dynamic Variables tool works properly: Proper Tool Configuration: When setting up your Extract Dynamic Variables tool, you need to add variables by clicking "+Add" and filling in the Variable Name, Description, Variable Type (Text, Number, Enum, or Boolean) , and Enum Options if applicable [(1) ]() . Update Your Prompt for Function Calling: The documentation specifically states that you should include in the prompt explicitly when to invoke the extract variable function . For example:
Copy code
When user states his name and phone number, please extract the information by calling the `extract_user_details` function.
a
I keep getting @AI Evy "Failed to get LLM response Error: Internal Server Error"
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer [(1) ]() , [(2) ]() , [(3) ]() The "Failed to get LLM response: Internal Server Error" issue is typically related to LLM WebSocket connection problems. Based on the documentation, here are the most common causes and solutions: Common Disconnection Reasons: The error you're seeing is likely one of these LLM WebSocket-related issues [(2) ]() : -
error_llm_websocket_open
- LLM websocket did not open between Retell server and your backend, likely because the Custom LLM URL is incorrect or your LLM server is unreachable -
error_llm_websocket_lost_connection
- LLM websocket connection broke during the call -
error_llm_websocket_runtime
- LLM websocket received a closing signal other than
1000
from your server -
error_llm_websocket_corrupt_payload
- LLM websocket received unspecified payload Troubleshooting Steps: 1. **Verify WebSocket URL**: Ensure your Custom LLM URL is correct and accessible [(1) ]() . If testing locally, use ngrok to generate a production URL forwarding to your local endpoints 2. **Check Server Response**: Your WebSocket server must properly handle the communication protocol . The server should send the first message as an empty response to let the user speak first 3. **Validate LLM Integration**: If you're using a custom LLM, ensure your integration is properly streaming responses [(3) ]() . The system expects responses when interaction_type is "response_required" 4. **Response Format**: Ensure your server sends properly formatted RetellResponse objects with the cor
rect structure From the Discord discussion, this appears to be a known issue where 500 errors can occur due to TTS provider outages, and the system should provide more specific error messages about provider issues rather than generic internal server errors [(4) ]() . Immediate Actions: - Check if your WebSocket server is running and accessible - Verify your Custom LLM URL in the dashboard - Test your WebSocket endpoint independently - Review your LLM integration code for proper error handling [(3) ]() If the issue persists, you can check [Retell Status]() or contact support, as this may be related to provider outages [(4) ]() .
​ To learn more, see the sources I considered: [[1] Setup WebSocket Server](https://docs.retellai.com/integrate-llm/setup-websocket-server) [[2] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[3] Integrate LLM](https://docs.retellai.com/integrate-llm/integrate-llm) [[4] [500] internal server error: error from voice backend: {\"status\":\"error\",\"message\":\"Internal](https://discord.com/channels/1186424376300679209/1395437135443792133) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
I am not using anything custom, this happens literally during test conversations inside of Retell @AI Evy
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer Since you're experiencing "Failed to get LLM response: Internal Server Error" during test conversations within Retell's dashboard (not using custom LLM) , this indicates a different issue than WebSocket problems [(1) ]() . For Built-in Retell LLM Issues: When using Retell's built-in LLM and testing directly in the dashboard, internal server errors typically indicate: 1. **Agent Configuration Issues**: There may be problems with your agent's prompt, tools, or settings that are causing the LLM to fail during processing 2. **Tool Configuration Problems**: If you have custom functions configured [(2) ]() , malformed parameters or unreachable endpoints can cause internal errors 3. **Prompt or Flow Issues**: Complex prompts or conversation flows that cause the LLM to encounter processing errors Troubleshooting Steps: 1. **Simplify Your Agent**: Try creating a minimal test agent with just a basic prompt and no custom functions to see if the error persists 2. **Check Tool Configurations**: If you have custom functions , temporarily disable them to isolate whether they're causing the issue 3. **Review Recent Changes**: Since you mentioned the webhook issue was resolved by duplicating the agent, there might be similar corruption in your current agent configuration 4. **Test Different Scenarios**: Try different conversation paths in your test to identify if specific flows trigger the error Immediate Action: Try duplicating your current agent (similar to what fixed your webhook issue) and test with the duplicate to see if the error persists. If the issue continues with a fresh agent duplicate, this suggests a platform-level issue that would require contacting support directly.
​ To learn more, see the sources I considered: [[1] Setup WebSocket Server](https://docs.retellai.com/integrate-llm/setup-websocket-server) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
can i refresh the agent? @AI Evy I need to delvier it today!!!!!!
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer Based on your previous success with duplicating the agent to fix webhook issues, you should try the same approach for this "Internal Server Error" problem. Quick Solution - Duplicate Your Agent: Since duplicating your agent resolved the webhook issue earlier in this thread, this is your fastest path to resolution [(1) ]() . Create a new agent with the same configuration, which should give you a clean state without any underlying corruption. Alternative - Create New Version: You can also generate a new version of your agent by clicking the "Deployment" button in the upper right corner of the agent page [(2) ]() . This creates a new version of both the agent and the corresponding retell_llm . Using the LLM Playground for Testing: For immediate testing without making actual calls, use the LLM Playground [(3) ]() : 1. Navigate to your agent's detail page 2. Click on the "Test LLM" tab 3. Choose "Manual Chat" 4. Test your conversation flows directly This lets you verify functionality quickly before deploying . If You Need to Update Configuration: You can update your existing agent using the update agent API [(4) ]() [(5) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', { agent_name: 'Jarvis' }) ;
console.log(agentResponse.agent_id) ;
​ To learn more, see the sources I considered: [[1] NotFoundError when trying to update agent via API](https://discord.com/channels/1186424376300679209/1389223389805154384) [[2] Setup versioning for agents](https://docs.retellai.com/agent/version) [[3] Manually test your agent](https://docs.retellai.com/test/llm-playground) [[4] Update Agent](https://docs.retellai.com/api-references/update-agent) [[5] Update Agent](https://docs.retellai.com/api-references/update-agent) ​
[(5) ]() Given your tight deadline, I'd recommend duplicating the agent first - it's the quickest solution based on your earlier success with this approach.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
duplicating doesn't work @AI Evy
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer Since duplicating isn't working and you need to deliver today, here are immediate alternatives: Create a Fresh Agent: Instead of duplicating, create a completely new agent from scratch using the API [(1) ]() [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
 response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
 voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
[(2) ]() Remove Custom Functions First: Based on a similar case in the community, removing custom functions can restore functionality [(3) ]() . One user experienced the exact same "Internal Server Error" and found that "removing the custom functions restored the chat model" . Try Different Models: The same user also tried switching models (GPT-4, Gemini, 4o) but the issue persisted until they removed the custom functions . Systematic Debugging: 1. Remove all custom functions from your agent 2. Simplify your prompt to the most basic version 3. Test with minimal configuration 4. Add components back one by one Emergency Contact: Given your deadline, you should also reach out directly to support: - Visit [Contact Sales]() - Visit [) The pattern from the community suggests that custom functions are often the culprit for these internal server errors .
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Create Agent](https://docs.retellai.com/api-references/create-agent) [[3] Internal Error - Voice agent completely broken](https://discord.com/channels/1186424376300679209/1404391587173236896) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
There are no fucntions it jsut glitches the fuck out when it asks me for my name @AI Evy
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer Since the error occurs specifically when the agent asks for your name and you have no custom functions, this suggests a prompt engineering issue [(1) ]() . The problem might be in how your agent is structured to handle name collection. Immediate Debugging Steps: 1. **Simplify Your Prompt**: Start with the most basic prompt possible to isolate the issue . Use sectional prompts to break down the conversation logic :
Copy code
///## Identity
You are a friendly AI assistant for Retell AI.
///## Task & Goals
Ask for the user's name and wait for their response.
2. **Check Your Agent Type**: If you're using a multi-prompt agent, ensure your state transitions are properly defined [(2) ]() . For name collection, you might need explicit transition logic :
Copy code
Ask for user's name.
- if user provides name, transition to next_state.
- if user refuses, call function end_call to hang up politely.
3. **Review Transition Conditions**: If using conversation flow, the issue might be in your transition conditions [(3) ]() . Ensure you have proper conditions defined for when the user provides their name . Alternative Approach - Use Conversation Flow: Consider switching to conversation flow if you're using multi-prompt, as it provides better control over transitions [(4) ]() . You can create nodes specifically for name collection with clear transition conditions [(3) ]() . Emergency Workaround: Create a completely new agent with minimal configuration: - Basic greeting prompt only - No dynamic variables initially - Test with the simplest possible interaction Given your tight deadline and the pattern of issues you've experienced, I'd recommend: - Visit [Contact Sales]() - Visit [) The fact that it consistently fails at name collection suggests a specific prompt engineering issue that can be resolved by simplifying your approach [(1) ]() .
​ To learn more, see the sources I considered: [[1] General prompt engineering guide](https://docs.retellai.com/build/prompt-engineering-guide) [[2] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) [[3] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[4] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
i do not understand what is going on with this agent. It was always very good before but now it keeps asking me for fucking bullshit all the time. It asks me for my name, I tell him that and then ai asks me again, could I have your name please wtf is going on @AI Evy
a
Thanks for the follow-up, @anton333_50203. I'll get back to you soon.
### Answer The repetitive name-asking behavior suggests your agent is stuck in a loop due to transition condition issues [(1) ]() . This is a common problem when the agent isn't properly recognizing that the user has provided the requested information [(2) ]() . Immediate Fixes: 1. **Check Transition Conditions**: Your transition conditions may not be properly configured to recognize when the user provides their name . Ensure you have clear conditions like: -
User responds to question of their age
-
User said something about booking a meeting
2. **Split Complex Nodes**: If your name collection node has multiple instructions, split it into separate nodes [(1) ]() . For example, if a node contains instructions to collect customer name, phone number, and address, the agent might inconsistently ask for only some of this information . 3. **Add Transition Finetune Examples**: To help the model understand your expectations, add transition finetune examples . This can help the agent recognize when the user has successfully provided their name. 4. **Adjust LLM Temperature**: If the agent's responses are inconsistent, try adjusting the LLM temperature . Lower temperature can make responses more consistent. Debugging Steps: 1. **Review Transition Conditions**: Ensure they precisely match your intended triggers . Consider prompt engineering or breaking down complex conditions into multiple simpler ones . 2. **Make Conditions More Flexible**: Make transition conditions more flexible and general . The agent might be too strict in recognizing valid name responses. 3. **Check Node Instructions**: Make node instructions more flexible and let the model handle the d
etails naturally . Emergency Solution: Since you need this working today, try creating a conversation flow with explicit transition conditions for name collection [(2) ]() . Use equation conditions if you're extracting the name to a dynamic variable:
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Copy code
- {{user_name}} != ""
This ensures the agent only transitions once the name variable is populated.
​ To learn more, see the sources I considered: [[1] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​