Nameless
04/09/2026, 8:16 AMAI Evy
04/09/2026, 8:16 AMAI Evy
04/09/2026, 8:17 AMAI Evy
04/09/2026, 8:17 AMAI Evy
04/09/2026, 8:17 AMNameless
04/09/2026, 8:22 AMAI Evy
04/09/2026, 8:22 AMAI Evy
04/09/2026, 8:22 AM///## Identity
You are a [role description]
Your expertise includes [relevant domains from your knowledge base]
///## Style Guardrails
Be concise: Keep responses under 2 sentences unless explaining complex topics.
Be conversational: Use natural language and contractions.
///## Tool Usage Instructions
[Explicit instructions for when to use each skill/function]
///## Response Guidelines
[How to handle information from knowledge base]
Define Explicit Tool Calling Triggers
The key issue is that LLMs struggle to determine when to call tools based solely on descriptions . You must specify exact conditions in your prompt :
///## Tool Usage Instructions
1. Gather initial information about the user's request.
2. Determine the type of request:
- If user mentions [specific keywords]:
→ Call function `skill_name_1` immediately
- If user needs [specific capability]:
→ Call function `skill_name_2` with [parameters]
3. After retrieving information:
- Always summarize what you found
- Ask if they need additional helpAI Evy
04/09/2026, 8:22 AMAI Evy
04/09/2026, 8:22 AMAI Evy
04/09/2026, 8:22 AMNameless
04/10/2026, 9:18 AMAI Evy
04/10/2026, 9:19 AMNameless
04/10/2026, 9:19 AMAI Evy
04/10/2026, 9:19 AMAI Evy
04/10/2026, 9:19 AMAI Evy
04/10/2026, 9:19 AMAI Evy
04/10/2026, 9:19 AMNameless
04/10/2026, 9:22 AMAI Evy
04/10/2026, 9:22 AMAI Evy
04/10/2026, 9:22 AMOnly answer using the information in ## Related Knowledge Base Contexts.
If ## Related Knowledge Base Contexts is missing or does not contain relevant information, respond:
"There is no related information in knowledge base."AI Evy
04/10/2026, 9:22 AMAI Evy
04/10/2026, 9:22 AMAI Evy
04/10/2026, 9:22 AMNameless
04/14/2026, 5:58 AMAI Evy
04/14/2026, 5:58 AMAI Evy
04/14/2026, 5:59 AMcall_analyzed event includes the transcript in the payload [(2) ]() [(1) ]() :
json
{
"event": "call_analyzed",
"call": {
"call_id": "123",
"transcript": "...",
"transcript_object": [...],
"transcript_with_tool_calls": [...],
"call_analysis": {
// Analysis results
}
}
}
The webhook also supports a transcript_updated event that triggers on turn-taking transcript updates, plus a final update when the call ends [(2) ]() . This event includes full call data plus transcript_with_tool_calls .
3. Get Call API
Retrieve transcripts programmatically using the Get Call API [(3) ]() [(1) ]() . The response includes the transcript field [(2) ]() :
json
{
"call_id": "123",
"transcript": "...",
"transcript_object": [...],
"transcript_with_tool_calls": [...],
"call_analysis": {
// Analysis results
}
}AI Evy
04/14/2026, 5:59 AMAI Evy
04/14/2026, 5:59 AMNameless
04/14/2026, 6:06 AMAI Evy
04/14/2026, 6:06 AMAI Evy
04/14/2026, 6:07 AMpython
from flask import Flask, request
from retell import Retell
import os
app = Flask(__name__)
@app.route("/webhook", methods=["POST"])
def webhook() :
raw_body = request.get_data(as_text=True)
if not Retell.verify(
raw_body,
os.environ.get("RETELL_API_KEY") ,
request.headers.get("x-retell-signature")
) :
print("Invalid signature")
return "", 403
data = request.get_json()
event = data.get("event")
call = data.get("call")
if event == "call_analyzed":
print(f"Call analyzed: {call.get('call_id') }")
transcript = call.get("transcript")
transcript_object = call.get("transcript_object")
transcript_with_tool_calls = call.get("transcript_with_tool_calls")
# Save transcript to file or database
with open(f"{call.get('call_id') }_transcript.txt", "w") as f:
f.write(transcript)
return "", 204
if __name__ == "__main__":
app.run(port=5000)
[(2) ]()
*Option 2: Get Call API (For Retrieving Existing Calls) *
python
from retell import Retell
import os
client = Retell(api_key=os.environ.get("RETELL_API_KEY") )
call_response = client.call.retrieve("119c3f8e47135a29e65947eeb34cf12d")
transcript = call_response.transcript
transcript_object = call_response.transcript_object
transcript_with_tool_calls = call_response.transcript_with_tool_calls
print(transcript)AI Evy
04/14/2026, 6:07 AMpip install flask retell-sdk
4. Signature verification to ensure webhooks come from Retell
The webhook payload includes transcript, transcript_object, and transcript_with_tool_calls fields [(2) ]() [(4) ]() . The call_analyzed event triggers when call analysis completes [(2) ]() [(1) ]() .AI Evy
04/14/2026, 6:07 AMAI Evy
04/14/2026, 6:07 AMNameless
04/14/2026, 6:11 AMAI Evy
04/14/2026, 6:11 AMAI Evy
04/14/2026, 6:11 AMbash
pip install retell-sdk
Here's the updated Python code with the installation instruction included as a comment:
python
# Installation: pip install retell-sdk
from retell import Retell
import os
client = Retell(api_key=os.environ.get("RETELL_API_KEY") )
call_response = client.call.retrieve("119c3f8e47135a29e65947eeb34cf12d")
transcript = call_response.transcript
transcript_object = call_response.transcript_object
transcript_with_tool_calls = call_response.transcript_with_tool_calls
print(transcript)
For the webhook approach with Flask, you'll also need to install Flask:
bash
pip install flask retell-sdkAI Evy
04/14/2026, 6:12 AMAI Evy
04/14/2026, 6:12 AMNameless
04/14/2026, 6:13 AMAI Evy
04/14/2026, 6:13 AMAI Evy
04/14/2026, 6:13 AMRETELL_API_KEY environment variable with your Retell AI API key:
python
# Installation: pip install retell-sdk
from retell import Retell
import os
# Option 1: Set environment variable (recommended)
# In your terminal or Replit Secrets: RETELL_API_KEY=your_api_key_here
# Option 2: Pass directly to client (less secure)
client = Retell(api_key="your_api_key_here")
# Or use environment variable
client = Retell(api_key=os.environ.get("RETELL_API_KEY") )
call_response = client.call.retrieve("119c3f8e47135a29e65947eeb34cf12d")
transcript = call_response.transcript
print(transcript)
[(2) ]()
Where to find your API key:
You can find your API key in your Retell AI dashboard under the API keys section. [(1) ]() Each workspace can have multiple API keys, all sharing the same permission level.
For Replit:
Add your Retell AI API key to Replit Secrets with the key name RETELL_API_KEY and the value as your actual API key from the Retell AI dashboard.AI Evy
04/14/2026, 6:13 AMAI Evy
04/14/2026, 6:13 AMNameless
04/14/2026, 6:24 AMAI Evy
04/14/2026, 6:24 AMAI Evy
04/14/2026, 6:24 AMpython
# Installation: pip install retell-sdk pandas
from retell import Retell
import os
import csv
import pandas as pd
from datetime import datetime
client = Retell(api_key=os.environ.get("RETELL_API_KEY") )
call_response = client.call.retrieve("119c3f8e47135a29e65947eeb34cf12d")
# Extract data with timestamps
call_id = call_response.call_id
start_timestamp = call_response.start_timestamp
end_timestamp = call_response.end_timestamp
duration_ms = call_response.duration_ms
transcript = call_response.transcript
transcript_object = call_response.transcript_object
# Print transcript with timestamps
print(f"Call ID: {call_id}")
print(f"Start: {datetime.fromtimestamp(start_timestamp/1000) }")
print(f"End: {datetime.fromtimestamp(end_timestamp/1000) }")
print(f"Duration: {duration_ms}ms")
print(f"\nTranscript:\n{transcript}")
# Option 1: Save as CSV using pandas
def save_to_csv_pandas(call_data, filename="call_transcript.csv") :
df = pd.DataFrame([{
"call_id": call_data.call_id,
"start_timestamp": call_data.start_timestamp,
"end_timestamp": call_data.end_timestamp,
"duration_ms": call_data.duration_ms,
"transcript": call_data.transcript
}])
df.to_csv(filename, index=False)
print(f"Saved to {filename}")
# Option 2: Save as CSV using csv module
def save_to_csv_basic(call_data, filename="call_transcript.csv") :
with open(filename, 'w', newline='', encoding='utf-8') as f:
writer = csv.writer(f)
writer.writerow(["call_id", "start_timestamp", "end_timestamp", "duration_ms", "transcript"])
writer.writerow([
call_data.call_id,
call_data.start_timestamp,
call_data.end_timestamp,
call_data.duration_ms,
call_data.transcript
])
print(f"Saved to {filename}")
# Choose your preferred method
save_to_csv_pandas(call_responseAI Evy
04/14/2026, 6:24 AM)
# OR
# save_to_csv_basic(call_response)AI Evy
04/14/2026, 6:24 AMAI Evy
04/14/2026, 6:24 AMAI Evy
04/14/2026, 6:24 AMstart_timestamp (begin timestamp in milliseconds since epoch) , end_timestamp (end timestamp in milliseconds since epoch) , and duration_ms (duration of the call in milliseconds) .
For detailed transcript with word-level timestamps, you can use transcript_object which provides timestamps for each utterance:
python
# Save detailed transcript with word timestamps
def save_detailed_transcript_csv(call_data, filename="detailed_transcript.csv") :
rows = []
for utterance in call_data.transcript_object:
for word_data in utterance.get("words", []) :
rows.append({
"call_id": call_data.call_id,
"role": utterance.get("role") ,
"word": word_data.get("word") ,
"start": word_data.get("start") ,
"end": word_data.get("end")
})
df = pd.DataFrame(rows)
df.to_csv(filename, index=False)
print(f"Saved detailed transcript to {filename}")
save_detailed_transcript_csv(call_response)
Installation requirements:
bash
pip install retell-sdk pandasNameless
04/14/2026, 6:27 AMAI Evy
04/14/2026, 6:27 AMAI Evy
04/14/2026, 6:27 AMAI Evy
04/14/2026, 6:27 AMpython
# Installation: pip install retell-sdk pandas
from retell import Retell
import os
import csv
import pandas as pd
from datetime import datetime
# Option 1: Use environment variable (recommended)
# Set RETELL_API_KEY in your environment first
client = Retell(api_key=os.environ.get("RETELL_API_KEY") )
# Option 2: Pass API key directly (replace with your actual key)
# client = Retell(api_key="your_actual_retell_api_key_here")
# Replace with your actual call ID
call_response = client.call.retrieve("your_actual_call_id_here")
# Extract data with timestamps
call_id = call_response.call_id
start_timestamp = call_response.start_timestamp
end_timestamp = call_response.end_timestamp
duration_ms = call_response.duration_ms
transcript = call_response.transcript
transcript_object = call_response.transcript_object
# Print transcript with timestamps
print(f"Call ID: {call_id}")
print(f"Start: {datetime.fromtimestamp(start_timestamp/1000) }")
print(f"End: {datetime.fromtimestamp(end_timestamp/1000) }")
print(f"Duration: {duration_ms}ms")
print(f"\nTranscript:\n{transcript}")
# Option 1: Save as CSV using pandas
def save_to_csv_pandas(call_data, filename="call_transcript.csv") :
df = pd.DataFrame([{
"call_id": call_data.call_id,
"start_timestamp": call_data.start_timestamp,
"end_timestamp": call_data.end_timestamp,
"duration_ms": call_data.duration_ms,
"transcript": call_data.transcript
}])
df.to_csv(filename, index=False)
print(f"Saved to {filename}")
# Option 2: Save as CSV using csv module
def save_to_csv_basic(call_data, filename="call_transcript.csv") :
with open(filename, 'w', newline='', encoding='utf-8') as f:
writer = csv.writer(f)
writer.writerow(["call_id", "start_timestamp", "end_timestamp", "duration_ms", "transcript"])
writer.writerow([
call_data.call_id,AI Evy
04/14/2026, 6:27 AMcall_data.start_timestamp,
call_data.end_timestamp,
call_data.duration_ms,
call_data.transcript
])
print(f"Saved to {filename}")
# Save detailed transcript with word timestamps
def save_detailed_transcript_csv(call_data, filename="detailed_transcript.csv") :
rows = []
for utterance in call_data.transcript_object:
for word_data in utterance.get("words", []) :
rows.append({
"call_id": call_data.call_id,
"role": utterance.get("role") ,
"word": word_data.get("word") ,
"start": word_data.get("start") ,
"end": word_data.get("end")
})
df = pd.DataFrame(rows)
df.to_csv(filename, index=False)
print(f"Saved detailed transcript to {filename}")
# Choose your preferred method
save_to_csv_pandas(call_response)
# OR
# save_to_csv_basic(call_response)
# OR
# save_detailed_transcript_csv(call_response)AI Evy
04/14/2026, 6:27 AMexport RETELL_API_KEY=your_actual_api_key
- Or in Replit Secrets: Add key RETELL_API_KEY with your actual API key value
2. Or pass directly (less secure) :
- Replace client = Retell(api_key=os.environ.get("RETELL_API_KEY") ) with client = Retell(api_key="your_actual_retell_api_key_here")
3. **Replace placeholder values**:
- "your_actual_call_id_here" with your actual call ID from Retell AIAI Evy
04/14/2026, 6:27 AMAI Evy
04/14/2026, 6:27 AMAI Evy
04/14/2026, 6:32 AMNameless
04/14/2026, 6:32 AMAI Evy
04/14/2026, 6:32 AMve_dialogue_transcript_csv(call_response, call_start_time)AI Evy
04/14/2026, 6:32 AMpython
# Installation: pip install retell-sdk pandas
from retell import Retell
import os
import pandas as pd
from datetime import datetime, timedelta
client = Retell(api_key=os.environ.get("RETELL_API_KEY") )
call_response = client.call.retrieve("your_actual_call_id_here")
# Extract call metadata
call_id = call_response.call_id
start_timestamp = call_response.start_timestamp # milliseconds since epoch
transcript_object = call_response.transcript_object
# Convert start timestamp to datetime
call_start_time = datetime.fromtimestamp(start_timestamp / 1000)
# Save dialogue-level transcript with accurate timestamps
def save_dialogue_transcript_csv(call_data, call_start, filename="dialogue_transcript.csv") :
rows = []
for utterance in call_data.transcript_object:
role = utterance.get("role")
content = utterance.get("content")
words = utterance.get("words", [])
# Get first word's start time (seconds from call start)
if words:
utterance_start_sec = words[0].get("start")
utterance_end_sec = words[-1].get("end")
# Calculate absolute timestamp
absolute_start = call_start + timedelta(seconds=utterance_start_sec)
absolute_end = call_start + timedelta(seconds=utterance_end_sec)
rows.append({
"call_id": call_data.call_id,
"role": role,
"content": content,
"start_seconds_from_call_start": utterance_start_sec,
"end_seconds_from_call_start": utterance_end_sec,
"absolute_start_timestamp": absolute_start.isoformat() ,
"absolute_end_timestamp": absolute_end.isoformat()
})
df = pd.DataFrame(rows)
df.to_csv(filename, index=False)
print(f"Saved dialogue transcript to {filename}")
saAI Evy
04/14/2026, 6:32 AMAI Evy
04/14/2026, 6:32 AMNameless
04/14/2026, 6:33 AMAI Evy
04/14/2026, 6:33 AMAI Evy
04/14/2026, 6:34 AMpython
# Installation: pip install retell-sdk pandas
from retell import Retell
import os
import pandas as pd
from datetime import datetime, timedelta
client = Retell(api_key=os.environ.get("RETELL_API_KEY") )
call_response = client.call.retrieve("your_actual_call_id_here")
# Extract call metadata
call_id = call_response.call_id
start_timestamp = call_response.start_timestamp # milliseconds since epoch
transcript_object = call_response.transcript_object
# Convert start timestamp to datetime
call_start_time = datetime.fromtimestamp(start_timestamp / 1000)
# Save dialogue-level transcript with accurate timestamps
def save_dialogue_transcript_csv(call_data, call_start, filename="dialogue_transcript.csv") :
rows = []
for utterance in call_data.transcript_object:
role = utterance.role
content = utterance.content
words = utterance.words if hasattr(utterance, 'words') else []
# Get first word's start time (seconds from call start)
if words:
utterance_start_sec = words[0].start
utterance_end_sec = words[-1].end
# Calculate absolute timestamp
absolute_start = call_start + timedelta(seconds=utterance_start_sec)
absolute_end = call_start + timedelta(seconds=utterance_end_sec)
rows.append({
"call_id": call_data.call_id,
"role": role,
"content": content,
"start_seconds_from_call_start": utterance_start_sec,
"end_seconds_from_call_start": utterance_end_sec,
"absolute_start_timestamp": absolute_start.isoformat() ,
"absolute_end_timestamp": absolute_end.isoformat()
})
df = pd.DataFrame(rows)
df.to_csv(filename, index=False)
print(f"Saved dialogue transcript to {filename}")
saAI Evy
04/14/2026, 6:34 AMve_dialogue_transcript_csv(call_response, call_start_time)AI Evy
04/14/2026, 6:34 AMutterance.get("role") to utterance.role
- Changed utterance.get("content") to utterance.content
- Changed utterance.get("words", []) to utterance.words if hasattr(utterance, 'words') else []
- Changed words[0].get("start") to words[0].start
- Changed words[-1].get("end") to words[-1].end
The transcript_object field contains a list of utterance objects with role, content, and words attributes [(1) ]() [(2) ]() [(3) ]() [(4) ]() .AI Evy
04/14/2026, 6:34 AMAI Evy
04/14/2026, 6:34 AMNameless
04/14/2026, 6:40 AMAI Evy
04/14/2026, 6:40 AMAI Evy
04/14/2026, 6:41 AMkb_config parameter when creating or updating your Retell LLM [(3) ]() [(4) ]() :
json
"kb_config": {
"top_k": 3,
"filter_score": 0.6
}
[(3) ]() , [(4) ]()
You also need to specify which knowledge bases to use via the knowledge_base_ids parameter [(3) ]() [(4) ]() [(5) ]() :
json
"knowledge_base_ids": [
"<string>"
]AI Evy
04/14/2026, 6:41 AMAI Evy
04/14/2026, 6:41 AMAI Evy
04/14/2026, 6:41 AMNameless
04/15/2026, 11:16 AMAI Evy
04/15/2026, 11:16 AMAI Evy
04/15/2026, 11:16 AMAI Evy
04/15/2026, 11:16 AMAI Evy
04/15/2026, 11:16 AMAI Evy
04/15/2026, 11:16 AMAI Evy
04/15/2026, 11:16 AMNameless
04/15/2026, 11:18 AMAI Evy
04/15/2026, 11:18 AMAI Evy
04/15/2026, 11:18 AMAI Evy
04/15/2026, 11:18 AMAI Evy
04/15/2026, 11:18 AMAI Evy
04/15/2026, 11:18 AMNameless
04/15/2026, 11:19 AMAI Evy
04/15/2026, 11:19 AMAI Evy
04/15/2026, 11:19 AMAI Evy
04/15/2026, 11:19 AMAI Evy
04/15/2026, 11:19 AMNameless
04/16/2026, 7:21 AMAI Evy
04/16/2026, 7:21 AMAI Evy
04/16/2026, 7:22 AMAI Evy
04/16/2026, 7:22 AMAI Evy
04/16/2026, 7:22 AMNameless
04/16/2026, 8:55 AMAI Evy
04/16/2026, 8:56 AMAI Evy
04/16/2026, 8:56 AMsip:sip.retellai.com [(2) ]()
Call Center Features:
- **Ambient Sound**: Add call center background sounds for authenticity [(4) ]()
- **IVR Navigation**: Guide agents through IVR systems with DTMF button presses [(3) ]()
- **Voicemail Handling**: Automatically detect and handle voicemails [(5) ]() [(3) ](hAI Evy
04/16/2026, 8:56 AMAI Evy
04/16/2026, 8:56 AMAI Evy
04/16/2026, 8:56 AMNameless
04/17/2026, 3:12 AMAI Evy
04/17/2026, 3:12 AMAI Evy
04/17/2026, 3:13 AMAI Evy
04/17/2026, 3:13 AMAI Evy
04/17/2026, 3:13 AMAI Evy
04/17/2026, 3:35 AMNameless
04/17/2026, 3:35 AMAI Evy
04/17/2026, 3:35 AMcustom_stt_config parameter when stt_mode is set to `"custom"`:
json
"stt_mode": "custom",
"custom_stt_config": {
"provider": "azure",
"endpointing_ms": 123
}
[(1) ]() , [(2) ]()
The custom_stt_config object allows you to specify Azure as your STT provider and configure the endpointing timing in milliseconds. [(1) ]() [(2) ]()
Note that when using custom STT configuration, you must set stt_mode to "custom" rather than the default "fast" or "accurate" modes.AI Evy
04/17/2026, 3:35 AMAI Evy
04/17/2026, 3:35 AMAI Evy
04/17/2026, 3:53 AMNameless
04/17/2026, 3:53 AMAI Evy
04/17/2026, 3:53 AM{{current_time}} along with dynamic variables to calculate elapsed time [(1) ]() .
Approach:
1. Capture start time in your first node using a dynamic variable
2. Check elapsed time in subsequent nodes using conditional logic
3. Transition to the next step when 5 minutes have passed
Implementation Example:
In your initial node, set up a dynamic variable to capture when the call started. You can reference {{current_time}} which provides the current time .
In a subsequent node where you want to check duration, add an edge with a transition condition. In Conversation Flow, you define edges with transition conditions [(2) ]() [(3) ]() :
json
{
"id": "edge_1",
"transition_condition": {
"type": "prompt",
"prompt": "If the call has exceeded 5 minutes, transition to the next step"
},
"destination_node_id": "next_step_node"
}AI Evy
04/17/2026, 3:53 AMmax_call_duration_ms setting at the agent level that automatically ends calls after a specified duration (default is 3600000ms or 60 minutes) . You could set this to 300000ms (5 minutes) if you want to enforce a hard limit.AI Evy
04/17/2026, 3:53 AMAI Evy
04/17/2026, 3:53 AMNameless
04/17/2026, 3:54 AMAI Evy
04/17/2026, 3:54 AMAI Evy
04/17/2026, 3:54 AM{{session_duration}} system variable that continuously tracks elapsed call time [(1) ]() . However, you can implement duration-based transitions in Conversation Flow using the available tools.
Recommended Approach:
Use an equation-based transition in your Conversation Flow edges to check if 5 minutes have passed. In Conversation Flow, you can check if dynamic variables exist using equations :
Equation: {{user_name}} exists
Result: True if variable is definedAI Evy
04/17/2026, 3:54 AM{{current_time}} system variable in your initial node
2. Create a transition condition that evaluates time elapsed
3. Route to a graceful ending node when the condition is met
Important Limitation:
The community has raised concerns about this exact issue. One user noted: "This needs to be added for any business to be able to predict and control costs. The internal timer is wildly inaccurate and Max call duration is a poor user experience." [(2) ]()
Alternative Using Built-in Settings:
While not a "continuous check," you can configure end_call_after_silence_ms at the agent level, which ends the call after a period of silence following agent speech (minimum 10,000ms) [(3) ]() [(4) ]() . However, this is silence-based, not duration-based.
The max_call_duration_ms setting (minimum 60,000ms, maximum 7,200,000ms, default 3,600,000ms) would force-end the call at 5 minutes, but as you noted, this creates an abrupt ending rather than a natural one .
Note: Based on community feedback, there appears to be a gap in Retell AI's current capabilities for implementing smooth, time-based call endings with continuous duration monitoring [(2) ]() .AI Evy
04/17/2026, 3:54 AMAI Evy
04/17/2026, 3:55 AMNameless
04/17/2026, 6:20 AMAI Evy
04/17/2026, 6:20 AMAI Evy
04/17/2026, 6:21 AM{{current_time_[timezone]}} to get the current time in Hong Kong's timezone [(1) ]() .
For Hong Kong, use:
{{current_time_Asia/Hong_Kong}}
This will return the current time in Hong Kong timezone (HKT) . For example: "Thursday, March 28, 2024 at 11:46:04 PM HKT" .
Available Timezone Variables:
The system supports timezone-specific variables using this format:
- {{current_time_[timezone]}} - Current time in specified timezone
- {{current_hour_[timezone]}} - Current hour as a fraction in specified timezone
- {{current_calendar_[timezone]}} - 14-day calendar in specified timezone
Examples from documentation:
- {{current_time_Australia/Sydney}}
- {{current_time_America/New_York}}
- {{current_hour_Australia/Sydney}}
- {{current_calendar_Australia/Sydney}}
You can also use nested variables if you want to make the timezone configurable. For example:
{{current_time_{{my_timezone}}}}
If you set my_timezone to Asia/Hong_Kong, this evaluates to {{current_time_Asia/Hong_Kong}} first, then resolves to the actual Hong Kong time .AI Evy
04/17/2026, 6:21 AMAI Evy
04/17/2026, 6:21 AMNameless
04/17/2026, 6:22 AMAI Evy
04/17/2026, 6:22 AMAI Evy
04/17/2026, 6:23 AMretell_llm_dynamic_variables field in the Create Phone Call API [(1) ]() :
json
{
"retell_llm_dynamic_variables": {
"user_name": "John Smith",
"product_name": "Premium Plan"
}
}
For inbound calls, supply dynamic variables in the Inbound Call Webhook response .
If you want to set agent-level default dynamic variables:
Configure default values at the agent level, which serve as fallback when specific variables aren't included in the call request .
If you want to extract and set variables during a call:
Use the Extract Dynamic Variable Node in Conversation Flow [(2) ]() . Fill in:
- Variable Name – Reference name
- Description – What the value should be
- Variable Type – Text, Number, Enum, or Boolean
- Enum Options – Only when type is enum
Please specify what you're trying to set, and I can provide more targeted guidance.AI Evy
04/17/2026, 6:23 AMAI Evy
04/17/2026, 6:23 AMNameless
04/17/2026, 6:30 AMAI Evy
04/17/2026, 6:30 AMAI Evy
04/17/2026, 6:31 AMguardrail_config parameter [(1) ]() [(2) ]() , which allows you to detect prohibited topics in agent output and user input, but they don't specify the language used when guardrails are triggered or how to customize the guardrail response language.
Since this involves the interaction between the language setting (which supports Cantonese via yue-CN) and the guardrail system's response behavior, I'd recommend:
Check out these potentially useful sources:
- [Documentation]()
- [Hire certified Retell partner]()
Would you like a general answer based on my knowledge instead?AI Evy
04/17/2026, 6:31 AMAI Evy
04/17/2026, 6:31 AMNameless
04/17/2026, 7:38 AMAI Evy
04/17/2026, 7:38 AMAI Evy
04/17/2026, 7:39 AMAI Evy
04/17/2026, 7:39 AMpronunciation_dictionary field with the following structure [(1) ]() [(2) ]() :
json
"pronunciation_dictionary": [
{
"word": "actually",
"alphabet": "ipa",
"phoneme": "ˈæktʃuəli"
}
]
[(1) ]() , [(2) ]()
However, the documentation doesn't provide specific IPA phoneme mappings for Chinese characters or Minimax-specific pronunciation guidance [(1) ]() [(2) ]() .
For pronunciation issues, community members have suggested using the pronunciation section with keywords and phonemes [(3) ]() , but the specific IPA representation for '笹' isn't documented in the available sources.
Check out these potentially useful sources:
- [Documentation]()
- [Hire certified Retell partner]()
Would you like a general answer based on my knowledge instead?AI Evy
04/17/2026, 7:39 AMNameless
04/17/2026, 7:40 AMAI Evy
04/17/2026, 7:40 AMAI Evy
04/17/2026, 7:41 AMpronunciation_dictionary field in your agent configuration [(1) ]() . The custom pronunciation feature works with English agents using 11Labs voices with the eleven turbo v2 voice model [(2) ]() .
Configuration approach:
json
"pronunciation_dictionary": [
{
"word": "笹",
"alphabet": "ipa",
"phoneme": "sai3"
}
]
[(1) ]()
Important limitations:
The custom pronunciation feature only works with English agents using 11Labs voices that selected the eleven turbo v2 (English only) voice model [(2) ]() . Since you're using a Cantonese chatbot with Minimax voices, this feature may not be available for your use case .
Alternative approaches mentioned in the community:
You can use boosted keywords to improve specific word transcription [(3) ]() . Set the boosted_keywords field to include the word you want to emphasize:
json
"boosted_keywords": [
"笹"
]
[(1) ]()
However, I don't have specific information in the available sources about how to enforce Cantonese phonetic pronunciation for Minimax voices or whether the pronunciation dictionary supports non-English languages and non-IPA phonetic systems like Jyutping (sai3) .
Check out these potentially useful sources:
- [Documentation]()
- [Hire certified Retell partner]()
Would you like a general answer based on my knowledge instead?AI Evy
04/17/2026, 7:41 AMAI Evy
04/17/2026, 7:41 AMAI Evy
04/17/2026, 8:34 AMNameless
04/17/2026, 8:34 AMAI Evy
04/17/2026, 8:34 AMjson
"tools": [
{
"type": "custom",
"name": "get_customer_info",
"description": "Get customer information from database",
"tool_id": "tool_001",
"url": "<https://api.example.com/customer%22,>
"method": "GET"
}
]
Important notes:
- Use trigger words to specify when tools should be called [(3) ]()
- Set boundaries to clarify when NOT to call certain tools
- Provide context explaining why each tool is being called
Since there's no built-in session duration variable, you'll need to use {{current_time}} with dynamic variables to track elapsed time [(1) ]() , or use the agent-level max_call_duration_ms setting as mentioned in our earlier conversation.AI Evy
04/17/2026, 8:34 AM{{session_duration}} is not a built-in system variable in Retell AI [(1) ]() . The available system variables are {{current_agent_state}}, {{previous_agent_state}}, {{current_time}}, {{current_time_[timezone]}}, {{current_hour}}, {{current_hour_[timezone]}}, {{current_calendar}}, {{current_calendar_[timezone]}}, and {{session_type}} .
In Conversation Flow, here's how to implement time-based call ending:
Step 1: Create nodes for your flow
Create a conversation node with an edge that transitions based on a condition [(2) ]() :
json
{
"id": "start",
"type": "conversation",
"instruction": {
"type": "prompt",
"text": "Greet the customer and ask how you can help them."
},
"edges": [
{
"id": "edge_1",
"transition_condition": {
"type": "prompt",
"prompt": "Customer wants to book appointment"
},
"destination_node_id": "book_appointment"
}
]
}
Step 2: Use transition conditions
For Single/Multi Prompt Agents, you need explicit tool calling instructions [(3) ]() . Reference tools by their exact names and define clear triggers :
## Tool Usage Instructions
1. Determine the type of request:
- If customer mentions "refund" or "money back":
→ Call function `transfer_to_support` immediately
Step 3: Configure the End Call tool
Add the End Call function to your tools array [(2) ]() :AI Evy
04/17/2026, 8:34 AMAI Evy
04/17/2026, 8:34 AMAI Evy
04/17/2026, 8:59 AMNameless
04/17/2026, 8:59 AMAI Evy
04/17/2026, 8:59 AM- {{user_age}} > 18
- {{current_time}} > 9 AND {{current_time}} < 18
- {{user_location}} == "New York"
- {{name}} exists
2. Prompt-based transitions for LLM evaluation :
json
{
"id": "edge_1",
"transition_condition": {
"type": "prompt",
"prompt": "Customer wants to book appointment"
},
"destination_node_id": "book_appointment"
}AI Evy
04/17/2026, 8:59 AMAI Evy
04/17/2026, 8:59 AMAI Evy
04/17/2026, 8:59 AMNameless
04/17/2026, 10:47 AMAI Evy
04/17/2026, 10:47 AMAI Evy
04/17/2026, 10:47 AMAI Evy
04/17/2026, 10:47 AMAI Evy
04/17/2026, 10:47 AMAI Evy
04/17/2026, 10:47 AM