https://retellai.com/?utm_source=discord&utm_medium=seo logo
whats the difference between the general prompt an...
# ❓・ai-evy-support
a
@AI Evy whats the difference between the general prompt and the sub prompts on a multi-prompt agent
a
Thanks for tagging me @Alonso Breña. I'll look through relevant sources and get back to you shortly.
### Answer In a multi-prompt agent, the general prompt is appended to the system prompt no matter what state the agent is in. [(1) ]() The state prompts (sub prompts) are specific instructions for each individual conversation phase/state. [(2) ]() The system prompt is constructed as: general prompt + state prompt. [(1) ]() **General Prompt**: Sets context and behaviors that apply across all states (e.g., overall persona, style guidelines, company info) . **State Prompts**: Contain focused instructions for that specific conversation phase, with state-specific functions and transition logic. [(2) ]() This separation allows each state to have a clear, focused purpose while maintaining consistent overall behavior through the general prompt.
​ To learn more, see the sources I considered: [[1] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[2] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy why is it happening that in a multi prompt agent, in a node that uses a tool, the agent activates the tool and then no respond nothing at all?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer --- This is likely related to the "Speak After Execution" setting for your custom function/tool. When configuring a custom function, there's a setting called Speak after execution which controls whether the agent keeps talking or performs other actions after the function call completes. [(1) ]() If this is disabled, the agent won't respond after the tool executes—it will wait for the user to say something to trigger a response. To fix this: - Enable "Speak after execution" for the tool in question. This lets the agent tell the user the result of the function call, continue the conversation, or execute another task after the function call completes, without waiting for user input. The documentation notes: > "Probably should enable for almost all cases, except for ones that are like press a digit kind of task where you don't expect the agent to keep talking." If the issue persists, also check your prompt to ensure it explicitly instructs the agent what to do after the tool is called (e.g., summarize results, ask a follow-up question) . [(2) ]()
​ 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) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer --- ### Answer The function result is capped at 15,000 characters to prevent overloading the LLM context window. [(1) ]() [(2) ]() If your function returns a string larger than this limit, it may be truncated or cause the agent to not respond properly. Solution: Reduce the size of the response your custom function returns. Consider: - Summarizing or filtering the data server-side before returning it - Returning only the essential information needed for the conversation - Paginating results if applicable This character cap applies to all custom function responses.
a
@AI Evy it is working well for most cases, but when the function returns a very large string, it justs doesnt anwser
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
​ 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] 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
i reduced the function response to 6000 characters and it still not giving me an anwser
@AI Evy i reduced the function response to 6000 characters and it still not giving me an anwser
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer --- Since you've reduced the response to 6000 characters (well under the 15,000 character cap) , here are other things to check: 1. Verify "Speak After Execution" is enabled [(1) ]() Make sure this setting is turned on for your custom function—if disabled, the agent waits for user input after the tool executes. 2. Check your function's HTTP response [(2) ]() , [(1) ]() - Response should have a status code between 200-299 to indicate success. - Response can be string, buffer, JSON object, or blob—all are converted to string before sending to the LLM. 3. Check for request timeout [(2) ]() , [(1) ]() The request will timeout in your specified timeout period, or 2 minutes if not specified. If your endpoint is slow, the call may be timing out. 4. Consider LLM token limits [(3) ]() The LLM prompt token limit is 32,768 tokens. If your overall prompt + function response + conversation history is approaching this, it could cause issues. 5. Troubleshooting steps: - Test with a very small response (e.g., just
"test response"
) to confirm the function flow works at all. - Check your server logs to confirm the request is being received and a valid response is being sent. - Verify the response format is correct (status 200-299 with valid content) . If the issue persists after checking these, it may require further investigation from the Retell team.
​ 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] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy what is llm temperature?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer LLM Temperature controls the randomness and creativity of your agent's responses. [(1) ]() It's a value between 0 and 1 that affects how the model selects its next words. - **Lower values (0.0–0.3) **: Highly consistent, deterministic responses—best for function calling, data collection, and technical support. - **Mid-range (0.4–0.7) **: Balanced consistency and variation—good for general customer service and sales calls. - **Higher values (0.8–1.0) **: Creative, varied responses—suited for creative brainstorming or casual conversation. Recommendations by use case: - **Appointment Booking**: 0.1–0.3 for accurate data capture - **Customer Support**: 0.3–0.5 for consistent yet natural responses - **Sales Outreach**: 0.5–0.7 for engaging but focused conversations If unset, the default value is 0. [(2) ]() For tool calling, a lower temperature is recommended. You can configure this via the
model_temperature
parameter when creating or updating your Retell LLM. [(2) ]() [(5) ]()
​ To learn more, see the sources I considered: [[1] Configure LLM Options](https://docs.retellai.com/build/llm-options) [[2] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy when i use a conversation flow agent, it returns the anwser but on a multiprompt agent it does not
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
.com/build/conversation-flow/overview) [(3) ]()
### Answer --- This is an interesting difference you're observing. Based on the documentation, here are some possible reasons the same function works in Conversation Flow but not in Multi-Prompt: 1. Single/Multi-Prompt agents may experience issues at scale As complexity increases, single prompt agents (and by extension multi-prompt) may experience behavioral drift, function calling issues, and context confusion. [(1) ]() The documentation specifically notes: - "Function Calling Issues: Unreliable tool usage with multiple functions" - Consider using conversation flow agent when your prompt exceeds 1000 words or uses more than 5 functions 2. Conversation Flow provides more structured control Conversation Flow agents provide more fine-grained control over the conversation flow and handle complex scenarios with more predictable outcomes. [(2) ]() The constrained framework in Conversation Flow establishes clearer guidelines for responses, reducing the likelihood of errors. [(3) ]() Troubleshooting suggestions: - Check if your multi-prompt state prompt is very long or complex - Verify the function is correctly configured in that specific state (not just globally) - Consider whether the total context (general prompt + state prompt + conversation history + function response) is approaching token limits - Try simplifying the state prompt where the function is called If the function works reliably in Conversation Flow with the same response size, this may indicate the multi-prompt agent is hitting context or complexity limits that Conversation Flow handles better due to its structured node-based approach. [(2) ](
​ To learn more, see the sources I considered: [[1] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[2] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[3] Retell AI’s Advanced Conversation Flow | Retell AI](https://www.retellai.com/blog/unlocking-complex-interactions-with-retell-ais-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy How can i make an agent know what time and date and timezone it is?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer --- Retell provides system default dynamic variables for time and date awareness. [(1) ]() For current time: -
{{current_time}}
— returns current time in
America/Los_Angeles
timezone -
{{current_time_[timezone]}}
— returns current time in a specified timezone (e.g.,
{{current_time_Australia/Sydney}}
or
{{current_time_America/New_York}}
) [(1) ]() [(2) ]() Example output:
"Thursday, March 28, 2024 at 11:46:04 PM PST"
[(1) ]() For a 14-day calendar: -
{{current_calendar}}
— 14-day calendar in
America/Los_Angeles
-
{{current_calendar_[timezone]}}
— 14-day calendar in specified timezone Usage: Add the variable to your prompt, for example:
Copy code
The current time is {{current_time_America/New_York}}.
Nested variables are also supported if you want to make the timezone dynamic:
Copy code
{{current_time_{{my_timezone}} }}
If
my_timezone
is set to
America/Los_Angeles
, this evaluates to the actual time in that zone. Tip: If you're in a non-US timezone (like Australia) , use the timezone-specific variable (e.g.,
{{current_time_Australia/Sydney}}
) to avoid date/day mismatches. [(6) ]()
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Simulation Testing Now Live for All Agents](https://www.retellai.com/changelog/simulation-testing-now-live-for-all-agents-c27zh) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy is it possible to alter a dinamic variable in the middle of a conversation on a conversation flow agent?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Components](https://docs.retellai.com/build/conversation-flow/components) ​
### Answer --- Based on the available documentation, dynamic variables are designed to inject personalized data into your agent's responses at the start of a call using the
{{variable_name}}
syntax. [(1) ]() The documentation describes how to set dynamic variables when initiating calls (via the
retell_llm_dynamic_variables
field in the Create Phone Call API) and how to configure default values at the agent level. However, the sources I have do not explicitly document a method for altering dynamic variables mid-conversation within a Conversation Flow agent. The documentation focuses on setting these values before or at the start of a call, not modifying them dynamically during the conversation. Possible workarounds to explore: - Use custom functions to fetch or compute updated values and return them to the agent, which can then reference the new data in its responses. - Use dynamic variables to pass captured data back to the main flow from Components. [(2) ]() Check out these potentially useful sources: - [Dynamic Variables]() - [Components]() - [Custom Function]() Would you like a general answer based on my knowledge, or more details on using custom functions as a workaround?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy What is the SIP URI?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer --- A SIP URI (Session Initiation Protocol Uniform Resource Identifier) is the address used to route voice calls over the internet to Retell AI's SIP server. [(1) ]() Retell AI's SIP server URI is:
sip:sip.retellai.com
How it's used: When using the "Dial to SIP URI" method, you call the [Register Phone Call API]() to get a
call_id
, then construct the SIP URI as:
sip:{call_id}@sip.retellai.com
Transport options: - TCP (Recommended) :
sip:sip.retellai.com;transport=tcp
- UDP:
sip:sip.retellai.com;transport=udp
- TLS:
sip:sip.retellai.com;transport=tls
For Elastic SIP Trunking (inbound calls) : You set Retell's SIP server address (
sip:sip.retellai.com
) as the origination SIP URI in your telephony provider's configuration. [(2) ]()
​ To learn more, see the sources I considered: [[1] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
sip:sip.retellai.com when i put that URI it says invalid URL. @AI Evy
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer The context of where you're entering the URI matters: For Elastic SIP Trunking (origination/inbound) : You should enter
sip:sip.retellai.com
as the origination SIP URI in your telephony provider's settings (e.g., Twilio) . [(1) ]() [(2) ]() For Termination URI (when importing a number to Retell) : You should not include the
sip:
prefix. [(3) ]() Per a support thread, when importing a number and entering the Termination URI, remove the
sip:
prefix—just use the URI without it. Also check for: - Any whitespace in the URI or phone number—remove it - Ensure you're entering the correct field (termination vs. origination have different requirements) If you're configuring Twilio's origination settings, the full
sip:sip.retellai.com
format is correct. [(2) ]() If you're importing a number into Retell and entering a termination URI, try without the
sip:
prefix. [(3) ]()
​ To learn more, see the sources I considered: [[1] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) [[2] Twilio](https://docs.retellai.com/deploy/twilio) [[3] Phone number connection error](https://discord.com/channels/1186424376300679209/1428698638938542161) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy what port do i use?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) ​
### Answer --- The documentation does not explicitly specify a port number for Retell AI's SIP server. [(1) ]() Standard SIP ports are typically: - 5060 for TCP/UDP - 5061 for TLS However, the documentation only provides the SIP server address (
sip:sip.retellai.com
) and transport options (TCP, UDP, TLS) without specifying port numbers. Your telephony provider may use default SIP ports automatically. If you need the exact port, I'd recommend checking with your telephony provider's documentation or reaching out to Retell support directly: - [Contact Sales]() - [Retell AI GitHub]() Would you like a general answer based on standard SIP conventions?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
is it possible on a multi prompt agent to have a node that can be activated from every part of the conversation, kind of like a global node?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
a
@AI Evy is it possible on a multi prompt agent to have a node that can be activated from every part of the conversation, kind of like a global node?
a
### Answer --- The available documentation does not describe a "global node" feature for Multi-Prompt agents. [(1) ]() Global Node is a Conversation Flow feature: Global nodes are available in Conversation Flow agents, where you can enable "Global Node" on a conversation node so the agent has access to it at all times. [(2) ]() Multi-Prompt structure: Multi-Prompt agents organize conversations into a tree of states, each with its own focused prompt and transition logic. [(1) ]() However, the documentation does not mention a mechanism for a state/node to be accessible from every other state in the tree. If you need this functionality: Consider using a Conversation Flow agent, which explicitly supports global nodes. [(2) ]() [(3) ]() Alternatively, you could structure your Multi-Prompt agent's prompts to include instructions that apply across all states within the general prompt, but this is not the same as a true global node that can be transitioned to from anywhere.
​ To learn more, see the sources I considered: [[1] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[2] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) [[3] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy what are the use cases for a multi prompt agent?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer ### Answer Multi-Prompt agents are built for longer, structured conversations that require capturing multiple inputs in sequence. [(1) ]() Use cases include: - Lead Qualification — A real-world example from the documentation: State 1 gathers customer information and validates requirements (no appointment booking functions available) , then State 2 handles appointment scheduling with booking functions enabled and context from qualification available. [(2) ]() - Internal IT Service Desk — Everise used multi-prompt agents to handle six use cases including account access, software issues, and telephony issues. Multi-tree prompts identified caller intent and routed to the appropriate API, solving 65% of caller issues without human transfer. [(3) ]() Benefits of Multi-Prompt structure: [(2) ]() - Predictable Behavior — Each state has a clear, focused purpose - Easier Debugging — Issues isolated to specific states - Better Function Control — Tools available only when appropriate - Scalable Design — Add new states without affecting existing ones - Team Collaboration — Different team members can work on different states Why multi-prompt over single prompt: Multi-prompt maximizes the AI's potential to problem-solve by laying down the scope of every API per state, reducing the chance of function misfires compared to single prompt where all APIs are globally accessible. [(3) ]()
​ To learn more, see the sources I considered: [[1] Inside Retell AI | The Conversational AI Platform Behind Scalable AI Phone Systems | Retell AI](https://www.retellai.com/blog/inside-retell-ai-conversational-ai-phone-system) [[2] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[3] ](https://www.retellai.com/case-studies-new/how-everise-contained-65-of-internal-service-desk-tickets-with-retell-ai) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy is it possible to get back on the tree on the multi prompt agent?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer --- ### Answer Yes, you can transition back to previous states in a Multi-Prompt agent tree. Multi-Prompt agents organize conversations into a structured tree of states, each with its own Transition Logic — clear conditions for moving between states. [(1) ]() You define state transitions in your prompt. For example: [(2) ]()
Copy code
7. Ask if user is interested in an in person tour.
 - if yes, transition to schedule_tour.
 - if no or hesitant, call function end_call to hang up politely and say will reach out if any other interesting properties pop up.
The transition logic is prompt-driven, so you can instruct the agent to transition to any state in your tree — including earlier states — by specifying the state name in your prompt instructions. Example: If you want to allow returning to a previous state, add transition logic like: - "If the user wants to change their answer, transition to
previous_state_name
." Tip from community: If transitions aren't happening reliably, use strong phrasing in your prompt to ensure the transition is treated as a high-priority action. [(5) ]()
​ To learn more, see the sources I considered: [[1] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[2] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy whats the transition logic on a conversation flow agent?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer In Conversation Flow agents, transition logic is defined through edges — connections between nodes that determine when and where the conversation moves next. [(1) ]() How transitions work: Each node defines a small set of logic, and the transition condition is used to determine which node to transition to. Once the condition is met when checked, the agent transitions to the next node. Edge structure: Edges contain: [(2) ]() -
id
— unique identifier for the edge -
transition_condition
— the condition that triggers the transition (can be prompt-based) -
destination_node_id
— the node to transition to when the condition is met Example from the API:
Copy code
json
"edges": [
  {
    "id": "edge_1",
    "transition_condition": {
      "type": "prompt",
      "prompt": "Customer wants to book appointment"
    },
    "destination_node_id": "book_appointment"
  }
]
Transition types: - Condition-based transitions — move to a specific node when a condition is met [(1) ]() - Default fallback paths — handle cases when no conditions match - Dynamic routing — based on conversation context For Logic Split Nodes specifically: Transition happens immediately when the agent enters this node. [(3) ]() There's always an else destination as a default if none of the conditions are met. Debugging tips: If transitions aren't working as expected, review your transition conditions to ensure they precisely match your intended triggers, or break down complex conditions into multiple simpler ones. [(4) ]()
​ To learn more, see the sources I considered: [[1] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
how do the global nodes work?
@AI Evy how do the global nodes work?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer --- ### Answer Global nodes handle universal scenarios that can be triggered from anywhere in your conversation flow. [(1) ]() How they work: - You set a node to be a global node by checking the
Global Node
checkbox in the node settings. - Any node type can be a global node — there's no restriction. - You configure a condition for when the global node should be transitioned to. For example:
When user indicates this is not a good time to talk
. - Whenever the user says something matching that condition (e.g., "I don't have time right now" or "I need to call back later") and the agent is performing a transition, the global node will be triggered. - Since global nodes can be transitioned to from anywhere, they don't necessarily need to be connected to the rest of the graph. Best practice guidance: [(2) ]() - Use the global prompt for your agent's overall personality, tone, and universal rules. - Use conversation flow nodes for step-by-step logic, questions, and transitions. - Use global nodes only for actions available anytime (e.g., "transfer to human") . Limitation: Retell AI currently does not support returning from a global node to the original conversation flow position. [(7) ]()
​ To learn more, see the sources I considered: [[1] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) [[2] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy en que casos deberia incluir el prompt en el prompt general y en que casos en un nodo del arbol en un multi prompt agent, responde en ingles
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer ### Answer When to use the General Prompt: The general prompt is appended to the system prompt no matter what state the agent is in. [(1) ]() [(2) ]() Best practice is to keep general functions in the main prompt—like
end_call
and functions you want to call multiple times across states. [(3) ]() Use the general prompt for: - Instructions that apply across all states - Functions that should be available in every state (e.g.,
end_call
) - Overall agent personality, tone, and universal rules When to use State Prompts (nodes in the tree) : Each state in a multi-prompt agent includes a focused prompt with specific instructions for that conversation phase, and state-specific functions that are only relevant in that state. [(4) ]() State functions are limited to that state specifically. [(3) ]() Use state prompts for: - Instructions specific to a particular conversation phase - Functions that should only be available in that state - Focused tasks like gathering specific information or handling a particular scenario Example structure: - State 1: Lead Qualification — Gather customer information, validate requirements (no appointment booking functions available) [(4) ]() - State 2: Appointment Scheduling — Only accessible after qualification complete, booking functions enabled Summary: | Use General Prompt | Use State Prompt | |---|---| | Universal rules/tone | Phase-specific instructions | | Functions n
eeded everywhere | Functions for that state only | | Context that applies always | Focused, isolated tasks |
​ To learn more, see the sources I considered: [[1] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[2] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[3] Discord message from @_superwhale on 2025-01-24](https://discord.com/channels/1186424376300679209/1294891368505937952/1332171997744205925) [[4] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy why is it when i call a function that returns a text that is 7000 characters long, retell doesnt awnser anything?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer ### Answer The function result is capped at 15,000 characters to prevent overloading the LLM context window. [(1) ]() At 7,000 characters, your response should be within this limit. However, a community discussion noted that function call responses were being truncated after about 20% of the response (around 4,000 characters in their case) . [(2) ]() Possible causes: - The response may be timing out before completion. Custom function requests timeout after your specified timeout period, or 2 minutes if not specified. [(1) ]() - The response format may not be converting properly. Responses should return with a status code between 200-299 and can be string, buffer, JSON object, or blob—all converted to string before sending to the LLM. Troubleshooting steps: 1. Check your function's response time and ensure it completes within the timeout 2. Verify your response status code is 200-299 3. Test with a smaller response to confirm the function works 4. Consider breaking the data into smaller chunks if needed
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Limit on Function Call Return Size](https://discord.com/channels/1186424376300679209/1344871185724346419) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy what it the status code status code between 200-299 and where do i find it?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer ### Answer HTTP status codes 200-299 are standard success response codes indicating your server processed the request successfully. These are not specific to Retell AI—they're standard HTTP protocol codes. Where you find/set them: The status code is returned by your server (your webhook endpoint or custom function server) when Retell AI makes a request to it. For example, with the **inbound webhook**: - Retell expects a JSON response with a successful status code (2xx) [(1) ]() - If within 10 seconds no success status (2xx) is received, the webhook will be retried, up to 3 times Common status codes: - 200 — OK (standard success) - 201 — Created (resource created successfully) - 204 — No Content (success, no response body) [(2) ]() How to return them: In your server code, you return the status code in your HTTP response. For example: - In Express.js:
res.status(200) .json({...})
- In Python Flask:
return jsonify({...}) , 200
If you're getting a 400 error (like in the Discord thread) , that indicates a bad request—often due to missing required fields or invalid data format. [(6) ]()
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] End Chat](https://docs.retellai.com/api-references/end-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy is it possible to edit a chat agent on a parallel version while the current version is not being afected and continue to run normally?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer Yes, this is exactly what versioning is designed for. How it works: Versioning enables you to update the agent while keeping an old version unchanged for production use. [(1) ]() - Published versions cannot be changed — once published, that version's configuration is locked in. - Only the latest version can be changed — you can modify the draft/latest version without affecting published versions. - You can specify a particular version to use for a phone number (or chat endpoint) to lock in the agent configuration. Workflow: 1. Publish your current working version via the "Deployment" button 2. Assign that published version to your production phone number/endpoint 3. Continue editing the latest/draft version — changes won't affect the published version in production 4. When ready, publish the new version and update your production assignment Viewing and managing versions: You can view old versions by clicking the Clock icon in the upper right corner of the agent page. You can also create a draft version from past versions if you need to revert. Note: A community user reported an issue where their phone number appeared to use draft configuration instead of the assigned published version. [(2) ]() If you experience this, double-check that the correct version is assigned to your endpoint.
​ To learn more, see the sources I considered: [[1] Setup versioning for agents](https://docs.retellai.com/agent/version) [[2] I’m having trouble with versioning on the agent.](https://discord.com/channels/1186424376300679209/1420761240526913608) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
how do i select the right version when creating a chat through the api?
@AI Evy how do i select the right version when creating a chat through the api?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer When creating a chat through the API, use the
agent_version
parameter in your request body. [(1) ]() Parameter details: -
agent_version
(integer) — The version of the chat agent to use for the chat. If not provided, will default to latest version. Example:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;

const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
console.log(chatResponse.agent_id) ;
To specify a version, add
agent_version
to your request:
Copy code
javascript
const chatResponse = await client.chat.create({ 
  agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
  agent_version: 1 
}) ;
To find available versions: You can retrieve all versions of a chat agent using the Get Chat Agent Versions endpoint:
Copy code
javascript
const chatAgentResponses = await client.chatAgent.getVersions('16b980523634a6dc504898cda492e939') ;
console.log(chatAgentResponses) ;
[(2) ]() The response includes a
version
field for each version, along with
is_published
to indicate whether that version is published.
​ To learn more, see the sources I considered: [[1] Create Chat](https://docs.retellai.com/api-references/create-chat) [[2] Get Chat Agent Versions](https://docs.retellai.com/api-references/get-chat-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy when i publish new versions the draft is being the one that is being used when i dont specify the version on the api call, how can i stop that from happening?
a
Thanks for the follow-up, @Alonso Breña. I'll get back to you soon.
### Answer This is expected behavior—if you don't specify a version, the SDK defaults to the latest version of the agent. [(1) ]() To ensure you use a specific published version instead of the draft: You need to explicitly specify the version number in your API call.
Copy code
python
get_agent(version=2)  # Gets the version with version number 2.
get_agent()  # Gets the latest version of the agent.
How version numbers work: - `0`: Initial version of the agent, first published version - `1`: Second published version - `2`: Current version (and so on) To lock in a specific version for production: 1. Use the
version
parameter when creating calls to specify the exact published version number you want to use 2. Alternatively, attach a phone number to a specific published version via the "Phone Numbers" tab in the dashboard—if you select
Draft
, it will always fetch the latest version, so select a specific published version number instead To find your published version numbers: Use the Get Agent Versions endpoint to retrieve all versions and identify which ones are published (
is_published: true
) . [(2) ]()
​ To learn more, see the sources I considered: [[1] Setup versioning for agents](https://docs.retellai.com/agent/version) [[2] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.