AI Evy
11/14/2025, 1:37 AMAI Evy
11/14/2025, 1:37 AMAI Evy
11/14/2025, 1:37 AMcall_analyzed webhook to retrieve the call summary after each phone conversation
2. Store this summary in your backend, associated with the user's phone number
3. Use the inbound dynamic variables webhook to supply the conversation history as a variable into the chat agent
You can pass this historical context using dynamic variables like {{customer_name}} or custom variables you define. [(2) ]()
For retrieving call recordings, the call_ended or call_analyzed webhooks will deliver the recording URL, which you can access via the get call API. [(1) ]()
You might also consider using a memory solution like mem0 for more sophisticated conversation history management.AI Evy
11/14/2025, 1:37 AMalonsobrena_26588
11/14/2025, 1:59 AMalonsobrena_26588
11/14/2025, 1:59 AMAI Evy
11/14/2025, 1:59 AMAI Evy
11/14/2025, 1:59 AMAI Evy
11/14/2025, 1:59 AMretell_llm_dynamic_variables field
Dynamic variables can be used in your agent's prompts, begin message, and tool configurations to inject personalized context. For example, you could create a variable like {{previous_chat_summary}} that contains key points from the user's chat session.
For outbound calls specifically, you set variables in the retell_llm_dynamic_variables field when using the Create Phone Call API, with all values as strings.
You can also configure agent-level default dynamic variables as fallbacks when specific variables aren't included in the call request.AI Evy
11/14/2025, 1:59 AMalonsobrena_26588
11/14/2025, 3:33 PMAI Evy
11/14/2025, 3:33 PMAI Evy
11/14/2025, 3:34 PMcall_started, call_ended, or call_analyzed) [(1) ]() [(3) ]() . They're designed to send information out from Retell AI to your systems, not to be called by you at the start of a session [(4) ]() [(3) ]() .
For inbound phone calls specifically, there is an inbound call webhook that triggers when a call is received, allowing you to provide call-specific information like dynamic variables before the call is processed [(2) ]() . However, for chat sessions, you'll need to handle context retrieval in your application logic when initializing the chat.
The key is storing conversation data (from both calls and chats) in your backend, then retrieving and injecting it as dynamic variables when starting new sessions.alonsobrena_26588
11/14/2025, 3:35 PMalonsobrena_26588
11/14/2025, 3:35 PMAI Evy
11/14/2025, 3:35 PMAI Evy
11/14/2025, 3:35 PMretell_llm_dynamic_variables field [(1) ]() . Here's the structure:
json
{
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
}
}
However, you can extract information during the conversation and store it as dynamic variables using the Extract Dynamic Variable Node in Conversation Flow [(2) ]() . This node is specifically designed to extract information from the conversation and store it as a dynamic variable, though it's not intended for having a conversation with the user .
So the workflow would be:
1. Set initial dynamic variables when creating the chat session [(1) ]()
2. Use Extract Dynamic Variable Nodes to capture new information during the conversation [(2) ]()
3. Store extracted variables in your backend for use in future sessions
If you need to update context mid-conversation, you'd need to extract the information using the Extract Dynamic Variable Node rather than directly setting variables during the active chat .AI Evy
11/14/2025, 3:36 PMAI Evy
11/14/2025, 3:36 PMAI Evy
11/14/2025, 3:39 PMAI Evy
11/14/2025, 3:39 PMalonsobrena_26588
11/14/2025, 4:19 PMAI Evy
11/14/2025, 4:19 PMAI Evy
11/14/2025, 4:19 PMAI Evy
11/14/2025, 4:19 PMAI Evy
11/14/2025, 4:19 PM