https://retellai.com/?utm_source=discord&utm_medium=seo logo
failed to import agent configurationRequest failed...
# ❓・ai-evy-support
n
@AI Evy failed to import agent configurationRequest failed with status code 400
a
Thanks for tagging me @Nameless. I'll look through relevant sources and get back to you shortly.
### Answer A 400 Bad Request error when importing an agent configuration typically indicates an issue with the JSON payload format [(1) ]() . Here are the troubleshooting steps to resolve this: Check JSON Format Validate your JSON structure includes all required fields : -
"llm_id": "..."
-
"version": 0
-
"general_prompt": "..."
-
"general_tools": [...]
-
"states": [...]
-
"starting_state": "..."
-
"last_modification_timestamp": 170...
Additional Troubleshooting - Use a JSON validator to check for syntax errors - Clear your browser cache and cookies [(2) ]() - Try using an incognito/private browsing window - Disable browser extensions that might interfere - Verify your API key is valid and has proper permissions Note on Imported Agents Imported agents often have incorrect JSON formatting [(1) ]() . If the issue persists after validation, consider building the agent from scratch rather than importing .
​ To learn more, see the sources I considered: [[1] Request failed with status code 400](https://discord.com/channels/1186424376300679209/1379532913703391384) [[2] Agent unable to be imported 400 error](https://discord.com/channels/1186424376300679209/1382740029532799099) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how to use api to display the conversation flow tree in an external environment using python say google collab
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer To display a conversation flow tree in Google Colab using Python, you'll need to retrieve the conversation flow data via the Retell API and then visualize it [(1) ]() [(2) ]() [(3) ]() . Here's how to get started: Step 1: Install the Retell SDK
Copy code
python
pip install retell-sdk
[(1) ]() Step 2: Retrieve Conversation Flow Data
Copy code
python
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
}) ;
const conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
The response includes the conversation flow structure with nodes, edges, components, and transition conditions [(1) ]() [(2) ]() . Key Data Structure Elements: The conversation flow response contains : -
nodes[]
- Array of conversation nodes with IDs, types, instructions, and edges -
edges[]
- Transitions between nodes with conditions and destination node IDs -
components[]
- Reusable sub-flows embedded within the conversation flow -
start_node_id
- Entry point of the flow For Visualization: You'll need to parse the nodes and edges from the API response to create a tree/graph structure. The
nodes
array contains each node's
id
,
type
, and
edges
which define transitions to other nodes via
destination_node_id
. For Python-specific implementation in Google Colab, you would need to adapt the JavaScript SDK example to use Python's
requests
library or wait for Python SDK support, as the documentation primarily shows JavaScript examples [(1) ]() [(2) ]() [(3) ]() .
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy give me the code for visualisation as well in python
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer --- To visualize a conversation flow tree in Python using Google Colab, you'll need to first retrieve the conversation flow data using the Retell Python SDK, then use a visualization library like NetworkX and Matplotlib [(1) ]() [(2) ]() . Step 1: Install Required Libraries
Copy code
python
pip install retell-sdk networkx matplotlib
[(2) ]() Step 2: Retrieve Conversation Flow Data
Copy code
python
import os
from retell import Retell

client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,  # This is the default and can be omitted
)
Copy code
python
client.conversation_flow.retrieve(conversation_flow_id)
[(1) ]() Step 3: Visualization Code Here's Python code to visualize the conversation flow tree:
Copy code
python
import networkx as nx
import matplotlib.pyplot as plt

# Retrieve the conversation flow
conversation_flow_id = "your_conversation_flow_id_here"
flow_data = client.conversation_flow.retrieve(conversation_flow_id)

# Create a directed graph
G = nx.DiGraph()

# Add nodes from the conversation flow
for node in flow_data.nodes:
    node_label = f"{node['id']}\n({node['type']}) "
    G.add_node(node['id'], label=node_label)
    
    # Add edges based on transitions
    if 'edges' in node:
        for edge in node['edges']:
            G.add_edge(
                node['id'], 
                edge['destination_node_id'],
                label=edge.get('id', '')
            )

# Create the visualization
plt.figure(figsize=(15, 10) )
pos = nx.spring_layout(G, k=2, iterations=50)

# Draw nodes
nx.draw_networkx_nodes(G, pos, node_color='lightblue', 
                       node_size=3000, alpha=0.9)

# Draw edges
nx.draw_networkx_edges(G, pos, edge_color='gray', 
                       arrows=True, arrowsize=20)

# Draw labels
labels = nx.get_node_attributes(G, 'label')
nx.draw_networkx_labels(G, pos, labels, font_size=8)

# Draw edge labels
edge_labels = nx.get_edge_attributes(G, 'label')
nx.draw_networkx_edge_labels(G, pos, edge_labels, font_size=6)

plt.title("Conversation Flow Tree")
plt.axis('off')
plt.tight_layout()
plt.show()
The conversation flow response includes nodes with their IDs, types, instructions, and edges that define transitions between nodes [(3) ]() [(4) ]() . Each edge contains a
destination_node_id
that connects nodes together [(3) ]() [(5) ]() . Key Structure Elements: -
nodes[]
contains conversation nodes with IDs, types, and edges [(3) ]() [(4) ]() -
edges[]
within each node define transitions with
destination_node_id
[(3) ]() [(5) ]() -
start_node_id
indicates the entry point [(3) ]() [(4) ]() -
components[]
may contain reusable sub-flows [(3) ]() [(6) ]()
​ To learn more, see the sources I considered: [[1] RetellAI/retell-python-sdk/api.md](https://github.com/RetellAI/retell-python-sdk/blob/main/api.md) [[2] Retell Python API library](https://github.com/RetellAI/retell-python-sdk/blob/main/README.md) [[3] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[4] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) [[5] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[6] 🚀 Conversation Flow Components are live!](https://community.retellai.com/t/conversation-flow-components-are-live/150) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy can retrieve agent id instead ?
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Yes, you can retrieve agent information using the Retell Python SDK [(1) ]() . Here's how to retrieve a specific agent by its agent_id :
Copy code
python
import os
from retell import Retell

client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)

# Retrieve a specific agent
agent_response = client.agent.retrieve('your_agent_id_here')
print(agent_response.agent_id)
To List All Agents: If you need to retrieve all agents and their agent_ids, you can use [(2) ]() :
Copy code
python
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: process.env['RETELL_API_KEY'],
}) ;
const agentResponses = await client.agent.list() ;
The agent response includes the
agent_id
field along with other details like
version
,
response_engine
,
voice_id
,
agent_name
, and configuration settings [(1) ]() [(2) ]() . Query Parameters: You can also specify a version when retrieving an agent [(1) ]() : -
version
(integer) : Optional version of the agent to retrieve The
agent_id
is a unique identifier for each agent (e.g.,
"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"
) [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) [[2] List Voice Agents](https://docs.retellai.com/api-references/list-agents) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I want to retrieve and visualise conversation flow tree of a specific agent
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer To retrieve and visualize the conversation flow tree for a specific agent in Python, you need to first get the agent's conversation flow ID, then retrieve the flow data and visualize it [(1) ]() [(2) ]() . Step 1: Install Required Libraries
Copy code
python
pip install retell-sdk networkx matplotlib
[(2) ]() Step 2: Retrieve Agent and Get Conversation Flow ID
Copy code
python
import os
from retell import Retell

client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)

# Get the agent details
agent = client.agent.retrieve('your_agent_id_here')

# Extract conversation flow ID from agent's response_engine
# For conversation flow agents, the response_engine will contain conversation_flow_id
conversation_flow_id = agent.response_engine.get('conversation_flow_id')
Step 3: Retrieve Conversation Flow Data
Copy code
python
# Retrieve the conversation flow
flow_data = client.conversation_flow.retrieve(conversation_flow_id)
[(1) ]() [(2) ]() Step 4: Visualize the Conversation Flow Tree
Copy code
python
import networkx as nx
import matplotlib.pyplot as plt

# Create a directed graph
G = nx.DiGraph()

# Add nodes from the conversation flow
for node in flow_data.nodes:
    node_label = f"{node['id']}\n({node['type']}) "
    G.add_node(node['id'], label=node_label)
    
    # Add edges based on transitions
    if 'edges' in node:
        for edge in node['edges']:
            G.add_edge(
                node['id'], 
                edge['destination_node_id'],
                label=edge.get('id', '')
            )

# Create the visualization
plt.figure(figsize=(15, 10) )
pos = nx.spring_layout(G, k=2, iterations=50)

# Draw nodes
nx.draw_networkx_nodes(G, pos, node_color='lightblue', 
                       node_size=3000, alpha=0.9)

# Draw edges
nx.draw_networkx_edges(G, pos, edge_color='gray', 
                       arrows=True, arrowsize=20)

# Draw labels
labels = nx.get_node_attributes(G, 'label')
nx.draw_networkx_labels(G, pos, labels, font_size=8)

# Draw edge labels
edge_labels = nx.get_edge_attributes(G, 'label')
nx.draw_networkx_edge_labels(G, pos, edge_labels, font_size=6)

plt.title(f"Conversation Flow Tree for Agent: {agent.agent_name}")
plt.axis('off')
plt.tight_layout()
plt.show()
The conversation flow response includes nodes with their IDs, types, instructions, and edges that define transitions between nodes [(1) ]() . Each edge contains a
destination_node_id
that connects nodes together . Key Structure Elements: -
nodes[]
contains conversation nodes with IDs, types, and edges -
edges[]
within each node define transitions with
destination_node_id
-
start_node_id
indicates the entry point -
components[]
may contain reusable sub-flows
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Retell Python API library](https://github.com/RetellAI/retell-python-sdk/blob/main/README.md) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I want to retrieve and visualise conversation flow tree of a specific agent write me a full code
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer \ Here's complete Python code to retrieve and visualize a conversation flow tree for a specific agent in Google Colab [(1) ]() [(2) ]() : Step 1: Install Required Libraries
Copy code
python
pip install retell-sdk networkx matplotlib
[(1) ]() Step 2: Complete Code
Copy code
python
import os
from retell import Retell
import networkx as nx
import matplotlib.pyplot as plt

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)
Copy code
python
# Replace with your agent ID
agent_id = 'your_agent_id_here'

# Step 1: Retrieve agent details
agent = client.agent.retrieve(agent_id)
print(f"Agent Name: {agent.agent_name}")

# Step 2: Extract conversation flow ID from agent's response_engine
# For conversation flow agents, the response_engine contains conversation_flow_id
if hasattr(agent.response_engine, 'conversation_flow_id') :
    conversation_flow_id = agent.response_engine.conversation_flow_id
    print(f"Conversation Flow ID: {conversation_flow_id}")
else:
    print("This agent does not use a conversation flow")
    exit()

# Step 3: Retrieve the conversation flow data
flow_data = client.conversation_flow.retrieve(conversation_flow_id)
[(2) ]()
Copy code
python
# Step 4: Build and visualize the graph
G = nx.DiGraph()

# Add nodes from the conversation flow
for node in flow_data.nodes:
    node_id = node['id']
    node_type = node.get('type', 'unknown')
    node_label = f"{node_id}\n({node_type}) "
    
    G.add_node(node_id, label=node_label, type=node_type)
    
    # Add edges based on transitions
    if 'edges' in node:
        for edge in node['edges']:
            destination = edge.get('destination_node_id')
            edge_id = edge.get('id', '')
            
            if destination:
                G.add_edge(node_id, destination, label=edge_id)

# Highlight the start node
start_node = flow_data.start_node_id

# Create visualization
plt.figure(figsize=(16, 12) )
pos = nx.spring_layout(G, k=3, iterations=100, seed=42)

# Color nodes differently based on type and start node
node_colors = []
for node in G.nodes() :
    if node == start_node:
        node_colors.append('lightgreen')  # Start node
    else:
        node_colors.append('lightblue')   # Other nodes

# Draw the graph
nx.draw_networkx_nodes(G, pos, node_color=node_colors, 
                       node_size=4000, alpha=0.9, 
                       edgecolors='black', linewidths=2)

nx.draw_networkx_edges(G, pos, edge_color='gray', 
                       arrows=True, arrowsize=25, 
                       arrowstyle='->', width=2)

# Draw node labels
labels = nx.get_node_attributes(G, 'label')
nx.draw_networkx_labels(G, pos, labels, font_size=9, 
                        font_weight='bold')

# Draw edge labels
edge_labels = nx.get_edge_attributes(G, 'label')
nx.draw_networkx_edge_labels(G, pos, edge_labels, 
                             font_size=7, font_color='red')

plt.title(f"Conversation Flow Tree\nAgent: {agent.agent_name}\nFlow ID: {conversation_flow_id}", 
          fontsize=14, fontweight='bold')
plt.axis('off')
plt.tight_layout()
plt.sh
Copy code
ow()

# Print summary statistics
print(f"\n=== Conversation Flow Summary ===")
print(f"Total Nodes: {len(flow_data.nodes) }")
print(f"Start Node: {start_node}")
print(f"Total Edges: {G.number_of_edges() }")
Usage: 1. Set your
RETELL_API_KEY
environment variable 2. Replace
'your_agent_id_here'
with your actual agent ID 3. Run the code in Google Colab The visualization shows nodes connected by edges, with the start node highlighted in green [(2) ]() [(3) ]() . Each node displays its ID and type, and edges show transition conditions [(2) ]() .
​ To learn more, see the sources I considered: [[1] SDKs](https://docs.retellai.com/get-started/sdk) [[2] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[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.
n
@Nameless error conversation flow id is not defined
@AI Evy error conversation flow id is not defined
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer The error occurs because not all agents use conversation flows as their response engine. Here's the corrected code that handles this properly:
Copy code
python
import os
from retell import Retell
import networkx as nx
import matplotlib.pyplot as plt

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)
[(1) ]()
Copy code
python
# Replace with your agent ID
agent_id = 'your_agent_id_here'

# Step 1: Retrieve agent details
agent = client.agent.retrieve(agent_id)
print(f"Agent Name: {agent.agent_name}")
print(f"Response Engine Type: {agent.response_engine.get('type') }")

# Step 2: Check if agent uses conversation flow
response_engine = agent.response_engine

if response_engine.get('type') == 'conversation_flow':
    conversation_flow_id = response_engine.get('conversation_flow_id')
    print(f"Conversation Flow ID: {conversation_flow_id}")
elif response_engine.get('type') == 'retell-llm':
    print("This agent uses Retell LLM, not Conversation Flow")
    print("You need an agent with response_engine type 'conversation_flow'")
    exit()
else:
    print(f"This agent uses {response_engine.get('type') }, not Conversation Flow")
    exit()

# Step 3: Retrieve the conversation flow data
flow_data = client.conversation_flow.retrieve(conversation_flow_id)
[(2) ]() , [(3) ]() The key issue is that your agent's
response_engine
must have
type
set to
"conversation_flow"
(not
"retell-llm"
or
"custom-llm"
) to have a
conversation_flow_id
field . According to the Discord discussion, you need to create the conversation flow first, then attach it to the agent as the response engine [(4) ]() . To fix this: 1. Check your agent's response engine type 2. If it's not a conversation flow agent, you'll need to either: - Use a different agent that has a conversation flow response engine - Create a new conversation flow and attach it to your agent [(5) ]() , [(4) ]()
​ To learn more, see the sources I considered: [[1] SDKs](https://docs.retellai.com/get-started/sdk) [[2] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[3] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) [[4] Discord message from @omar.13. on 2025-09-11](https://discord.com/channels/1186424376300679209/1186462578310910112/1415822334711038063) [[5] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy but it is a conversation flow
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer If your agent is indeed a conversation flow agent, the issue might be in how you're accessing the
conversation_flow_id
from the response_engine. Here's the corrected approach:
Copy code
python
import os
from retell import Retell
import networkx as nx
import matplotlib.pyplot as plt

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)

# Replace with your agent ID
agent_id = 'your_agent_id_here'

# Step 1: Retrieve agent details
agent = client.agent.retrieve(agent_id)
print(f"Agent Name: {agent.agent_name}")

# Step 2: Access conversation_flow_id correctly
# The response_engine is a dictionary/object containing the conversation_flow_id
try:
    # Try accessing as attribute
    if hasattr(agent, 'response_engine') :
        response_engine = agent.response_engine
        
        # Check if it's a dictionary
        if isinstance(response_engine, dict) :
            conversation_flow_id = response_engine.get('conversation_flow_id')
        else:
            # Access as attribute
            conversation_flow_id = getattr(response_engine, 'conversation_flow_id', None)
        
        if not conversation_flow_id:
            print("Error: conversation_flow_id not found in response_engine")
            print(f"Response engine content: {response_engine}")
            exit()
        
        print(f"Conversation Flow ID: {conversation_flow_id}")
    else:
        print("Error: Agent does not have response_engine attribute")
        exit()
        
except Exception as e:
    print(f"Error accessing conversation_flow_id: {e}")
    print(f"Agent data: {agent}")
    exit()

# Step 3: Retrieve the conversation flow data
flow_data = client.conversation_flow.retrieve(conversation_flow_id)
[(1) ]() The rest of the visualization code remains the same. The key fix is properly accessing the
conversation_flow_id
from the
response_engine
object, handling both dictionary and attribute access patterns . If you still get an error, print out the entire
agent
object to see its structure and share that output so we can debug further.
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how to extract the agent"global_prompt" specificly from the agent
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer To extract the
global_prompt
from a conversation flow agent, you need to retrieve the conversation flow data (not just the agent data) , as
global_prompt
is stored in the conversation flow configuration [(1) ]() [(2) ]() . Here's the code:
Copy code
python
import os
from retell import Retell

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)
[(1) ]()
Copy code
python
# Replace with your agent ID
agent_id = 'your_agent_id_here'

# Step 1: Retrieve agent details
agent = client.agent.retrieve(agent_id)

# Step 2: Extract conversation_flow_id from response_engine
response_engine = agent.response_engine

if isinstance(response_engine, dict) :
    conversation_flow_id = response_engine.get('conversation_flow_id')
else:
    conversation_flow_id = getattr(response_engine, 'conversation_flow_id', None)

# Step 3: Retrieve the conversation flow to access global_prompt
flow_data = client.conversation_flow.retrieve(conversation_flow_id)

# Step 4: Extract global_prompt
global_prompt = flow_data.global_prompt
print(f"Global Prompt: {global_prompt}")
The
global_prompt
is a field in the conversation flow configuration that contains the global prompt used in every node of the conversation flow [(1) ]() [(2) ]() . It's stored as a string or null value . Key Points: -
global_prompt
is part of the conversation flow data, not the agent data directly - You must first get the
conversation_flow_id
from the agent's
response_engine
[(1) ]() - Then retrieve the conversation flow using that ID to access
global_prompt
[(1) ]() [(2) ]()
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] List Conversation Flows](https://docs.retellai.com/api-references/list-conversation-flows) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how will you introduce Retell to others Generate a prompt for gamma to generate slide deck
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
- frees reps from 72% of non-selling activities - Omnichannel support across voice, SMS, and chat Slide 5: Use Cases - Lead capture and qualification - Meeting scheduling and handoff - Live transcription and post-call summarization - Customer support automation - Appointment booking and reminders [(1) ]() Slide 6: Analytics & Insights - Comprehensive analytics dashboard with customizable charts [(4) ]() - Real-time data updates - Custom post-call analysis integration - Global filters for date ranges and agents - Multiple chart types: column, bar, donut, line, and number charts Slide 7: Why Choose Retell AI? - Voice-first infrastructure optimized for real-time interactions [(1) ]() - Direct API control over LLM routing and orchestration - Developer-friendly with SDK support - Proven results: clients see 20-30 demos booked weekly via AI [(2) ]() Slide 8: Call to Action - Visit [Documentation]() - Explore certified partners at [Retell Partners]() - Start building AI voice agents today Use a modern, tech-focused design with blue and white color scheme. Include icons for voice, analytics, and automation. Make it visually engaging with data visualizations where applicable. --- This prompt provides Gamma with structured content to create a comprehensive introduction to Retell AI based on the available documentation.
### Answer Based on the available sources, here's a prompt you can use with Gamma to generate a slide deck introducing Retell AI: --- Gamma Slide Deck Prompt: Create a professional slide deck introducing Retell AI as a conversational AI platform for sales and customer engagement. Include the following slides: Slide 1: Title Slide - Title: "Retell AI: Transforming Customer Conversations with AI" - Subtitle: "Real-Time Voice Automation for Sales & Support" Slide 2: What is Retell AI? - Retell AI is a conversational AI platform that enables businesses to build AI voice agents for inbound and outbound calls [(1) ]() - Combines Natural Language Processing (NLP) , Machine Learning, and seamless CRM integration [(2) ]() - Handles multi-turn conversations that maintain context across exchanges [(3) ]() Slide 3: Key Capabilities - Real-time voice automation with sub-800ms latency [(1) ]() - Multi-turn conversation handling that remembers context [(3) ]() - Lead qualification and appointment scheduling [(2) ]() - Post-call analysis and analytics dashboards [(4) ]() - Integration with telephony providers like Twilio and SIP networks [(1) ]() Slide 4: Benefits for Sales Teams - Enhanced lead generation and qualification [(2) ]() - 25% higher productivity compared to human-only outbound efforts - Scalability without compromising quality - Increased operational efficiency
​ To learn more, see the sources I considered: [[1] Ada CX Alternatives: 9 Platforms Powering Conversational AI in 2026 | Retell AI](https://www.retellai.com/blog/ada-cx-alternatives) [[2] conversational ai platforms: compare features & ROI | Retell AI](https://www.retellai.com/blog/conversational-ai-for-sales) [[3] Multi-Turn Conversation](https://www.retellai.com/glossary/multi-turn-conversation) [[4] Get analytics insight](https://docs.retellai.com/features/analytics-dashboard) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy ride on the simple code above, is there a way to update the global prompt
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Yes, you can update the
global_prompt
using the Update Conversation Flow API [(1) ]() . Here's the code to update it:
Copy code
python
import os
from retell import Retell

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)

# Replace with your values
agent_id = 'your_agent_id_here'
new_global_prompt = "Your new global prompt text here"

# Step 1: Get the agent and extract conversation_flow_id
agent = client.agent.retrieve(agent_id)
response_engine = agent.response_engine

if isinstance(response_engine, dict) :
    conversation_flow_id = response_engine.get('conversation_flow_id')
else:
    conversation_flow_id = getattr(response_engine, 'conversation_flow_id', None)

# Step 2: Update the conversation flow with new global_prompt
updated_flow = client.conversationFlow.update(
    conversation_flow_id,
    global_prompt=new_global_prompt
)

print(f"Global prompt updated successfully!")
print(f"New global prompt: {updated_flow.global_prompt}")
The
global_prompt
field is part of the conversation flow configuration and can be updated using the PATCH endpoint . When you update it, the new prompt will be used in every node of the conversation flow [(1) ]() [(2) ]() . Key points: - The
global_prompt
parameter accepts a string or null value [(1) ]() - Updates apply to the conversation flow, not directly to the agent - You need the
conversation_flow_id
from the agent's response engine to perform the update
​ To learn more, see the sources I considered: [[1] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[2] Step 1: Configure global settings](https://docs.retellai.com/build/conversation-flow/global-setting) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy 'Retell' object has no attribute 'conversationFlow'
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer The error occurs because the correct attribute name is
conversation_flow
(with an underscore) , not
conversationFlow
(camelCase) [(1) ]() [(2) ]() . Here's the corrected code:
Copy code
python
import os
from retell import Retell

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)

# Replace with your values
agent_id = 'your_agent_id_here'
new_global_prompt = "Your new global prompt text here"

# Step 1: Get the agent and extract conversation_flow_id
agent = client.agent.retrieve(agent_id)
response_engine = agent.response_engine

if isinstance(response_engine, dict) :
    conversation_flow_id = response_engine.get('conversation_flow_id')
else:
    conversation_flow_id = getattr(response_engine, 'conversation_flow_id', None)

# Step 2: Update the conversation flow with new global_prompt
# Use conversation_flow (with underscore) , not conversationFlow
updated_flow = client.conversation_flow.update(
    conversation_flow_id,
    global_prompt=new_global_prompt
)

print(f"Global prompt updated successfully!")
print(f"New global prompt: {updated_flow.global_prompt}")
The key fix is changing
client.conversationFlow.update()
to
client.conversation_flow.update()
- using snake_case instead of camelCase .
​ To learn more, see the sources I considered: [[1] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[2] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy is there a way to extract each and every nodes (and the correspoing prompts, as a full list
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
Copy code
python
# Replace with your agent ID
agent_id = 'your_agent_id_here'

# Step 1: Get the agent and extract conversation_flow_id
agent = client.agent.retrieve(agent_id)
response_engine = agent.response_engine

if isinstance(response_engine, dict) :
    conversation_flow_id = response_engine.get('conversation_flow_id')
else:
    conversation_flow_id = getattr(response_engine, 'conversation_flow_id', None)

# Step 2: Retrieve the conversation flow
flow_data = client.conversation_flow.retrieve(conversation_flow_id)

# Step 3: Extract all nodes with their prompts
nodes_list = []

for node in flow_data.nodes:
    node_info = {
        'id': node['id'],
        'type': node['type'],
        'instruction': None,
        'edges': []
    }
    
    # Extract instruction/prompt if it exists
    if 'instruction' in node:
        instruction = node['instruction']
        if isinstance(instruction, dict) :
            if instruction.get('type') == 'prompt':
                node_info['instruction'] = instruction.get('text')
            else:
                node_info['instruction'] = instruction
        else:
            node_info['instruction'] = instruction
    
    # Extract edges (transitions)
    if 'edges' in node:
        for edge in node['edges']:
            edge_info = {
                'edge_id': edge.get('id') ,
                'destination': edge.get('destination_node_id') ,
                'transition_condition': edge.get('transition_condition')
            }
            node_info['edges'].append(edge_info)
    
    nodes_list.append(node_info)

# Step 4: Print all nodes and their details
print(f"=== Conversation Flow Nodes ===")
print(f"Total Nodes: {len(nodes_list) }\n")

for i, node in enumerate(nodes_list, 1) :
    print(f"Node {i}:")
    print(f"  ID: {node['id']}")
    print(f"  Type: {node['type']}")
    print(f"  Instruction/Prompt: {node['instruction']}")
### Answer Yes, you can extract all nodes and their corresponding prompts from a conversation flow [(1) ]() . Here's the code:
Copy code
python
import os
from retell import Retell

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)
Copy code
print(f"  Number of Edges: {len(node['edges']) }")
    
    if node['edges']:
        print(f"  Transitions:")
        for edge in node['edges']:
            print(f"    - To: {edge['destination']}")
            print(f"      Condition: {edge['transition_condition']}")
    print()
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) ​
The conversation flow response includes nodes with their IDs, types, instructions, and edges that define transitions between nodes . Each node's
instruction
field contains the prompt text when the instruction type is
"prompt"
. Key structure elements: -
nodes[]
contains all conversation nodes with IDs, types, and instructions -
instruction
can be either a prompt (with
type: "prompt"
and
text
field) or other instruction types -
edges[]
within each node define transitions with
destination_node_id
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how to use python to design an interface to drag and drop and change the content of the nodes and the corresponding prompts? please suggest
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Based on the Retell AI documentation, you can build a Python interface to visually edit conversation flows using these libraries: Recommended Python Libraries: 1. Streamlit - For web-based drag-and-drop interface 2. NetworkX - For graph structure management 3. Plotly or Dash - For interactive node visualization 4. Retell SDK - For API integration Implementation Approach:
Copy code
python
import streamlit as st
import plotly.graph_objects as go
from retell import Retell
import os

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)
[(1) ]() Key Features to Implement: 1. Fetch Existing Flow:
Copy code
python
# Retrieve conversation flow
flow_data = client.conversation_flow.retrieve(conversation_flow_id)
2. Update Node Instructions:
Copy code
python
# Update conversation flow with modified nodes
updated_flow = client.conversation_flow.update(
    conversation_flow_id,
    nodes=[
        {
            "id": "node_id",
            "type": "conversation",
            "instruction": {
                "type": "prompt",
                "text": "Updated prompt text"
            }
        }
    ]
)
Interface Components: - **Node Editor Panel**: Text areas for editing prompts in each node [(2) ]() - **Visual Canvas**: Drag-and-drop positioning with
begin_tag_display_position
coordinates [(1) ]() - **Edge Manager**: Add/remove transition conditions between nodes [(3) ]() - **Save Button**: Push changes via
client.conversation_flow.update()
[(1) ]() Workflow: 1. Load flow data from Retell API 2. Display nodes in interactive graph 3. Allow editing of node instructions [(2) ]() 4. Modify edges and transition conditions [(3) ]() 5. Update flow via API with modified configuration [(1) ]() For production use, consider using Dash with Cytoscape for more sophisticated drag-and-drop capabilities with node editing panels.
​ To learn more, see the sources I considered: [[1] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[2] Node Overview](https://docs.retellai.com/build/conversation-flow/node) [[3] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy write me a python code that works in google colab for: 1. download the json of the conversation flow agent 2. upload and update the json for the whole conversation flow agent
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
Copy code
python
# Step 3: Convert to dictionary and save as JSON
flow_dict = flow_data.model_dump() if hasattr(flow_data, 'model_dump') else dict(flow_data)

# Save to file
filename = f'conversation_flow_{conversation_flow_id}.json'
with open(filename, 'w') as f:
    json.dump(flow_dict, f, indent=2)

print(f"✅ Downloaded conversation flow to {filename}")

# Download the file to your local machine
files.download(filename)

# ============================================
# PART 2: UPLOAD AND UPDATE CONVERSATION FLOW
# ============================================

print("\n--- Upload JSON to Update Conversation Flow ---")

# Upload JSON file from local machine
uploaded = files.upload()

# Get the uploaded filename
uploaded_filename = list(uploaded.keys() ) [0]

# Load the JSON data
with open(uploaded_filename, 'r') as f:
    updated_flow_data = json.load(f)

print(f"✅ Loaded JSON from {uploaded_filename}")

# Extract conversation_flow_id from the JSON
conversation_flow_id = updated_flow_data.get('conversation_flow_id')

if not conversation_flow_id:
    print("❌ Error: conversation_flow_id not found in JSON")
else:
    # Prepare update parameters (remove read-only fields)
    update_params = {k: v for k, v in updated_flow_data.items() 
                     if k not in ['conversation_flow_id', 'version']}
    
    # Update the conversation flow
    updated_flow = client.conversation_flow.update(
        conversation_flow_id,
        **update_params
    )
[(2) ]()
Copy code
python
    print(f"✅ Successfully updated conversation flow: {conversation_flow_id}")
    print(f"New version: {updated_flow.version}")
[(2) ]() [(1) ]() How to use this code: 1. Set your API key before running:
Copy code
python
os.environ["RETELL_API_KEY"] = "your_api_key_here"
[(3) ]() 2. **Download flow**: The first part retrieves the conversation flow and downloads it as JSON to your local machine [(1) ]() 3. **Upload and update**: The second part lets you upload a modified JSON file and updates the conversation flow with the new configuration [(2) ]() Key points: - The code removes
conversation_flow_id
and
version
from update parameters since these are read-only fields - All conversation flow fields like
global_prompt
,
nodes
,
tools
,
model_choice
, etc. can be updated [(2) ]() [(1) ]() - The update creates a new version of the conversation flow [(2) ]()
### Answer Here's a complete Python code for Google Colab that downloads and uploads/updates conversation flow JSON: [(1) ]() [(2) ]() [(3) ]()
Copy code
python
# Install Retell SDK
!pip install retell-sdk

import os
import json
from retell import Retell
from google.colab import files

# Initialize Retell client
client = Retell(
    api_key=os.environ.get("RETELL_API_KEY") ,
)
[(3) ]()
Copy code
python
# ============================================
# PART 1: DOWNLOAD CONVERSATION FLOW JSON
# ============================================

# Replace with your agent ID
agent_id = 'your_agent_id_here'

# Step 1: Get the agent and extract conversation_flow_id
agent = client.agent.retrieve(agent_id)
response_engine = agent.response_engine

if isinstance(response_engine, dict) :
    conversation_flow_id = response_engine.get('conversation_flow_id')
else:
    conversation_flow_id = getattr(response_engine, 'conversation_flow_id', None)

print(f"Conversation Flow ID: {conversation_flow_id}")

# Step 2: Retrieve the conversation flow data
flow_data = client.conversation_flow.retrieve(conversation_flow_id)
[(1) ]()
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[3] SDKs](https://docs.retellai.com/get-started/sdk) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Nameless. I'll get back to you soon.
n
@AI Evy draft a gamma prompt to generate a slide to introduce conversation flow vs single prompt agent and also for conversation flow agent, what's the differences between rigid mode, rigid mode with global nodes, flex mode and flex mode with global nodes
a
### Answer ### Answer Gamma Slide Deck Prompt: Create a professional slide deck comparing Conversation Flow vs Single Prompt agents in Retell AI. Include the following slides: Slide 1: Title Slide - Title: "Conversation Flow vs Single Prompt Agent in Retell AI" - Subtitle: "Choosing the Right Approach for Your AI Voice Agent" Slide 2: Single Prompt Agent - Uses one comprehensive prompt to define agent behavior [(1) ]() - Straightforward and ideal for simple use cases where quick responses are needed - Requires significant effort in prompt engineering to ensure clarity and accuracy - As complexity increases, may lead to hallucinations or deviations from instructions - Best suited for quick demos or straightforward tasks that require minimal interaction Slide 3: Conversation Flow Agent - Allows creation of multiple nodes to handle different scenarios [(2) ]() - Provides more fine-grained control over conversation flow compared to Single Prompt agents - Enables handling of more complex scenarios with predictable outcomes - Structured conversations with exact paths and transitions - Predictable behavior where each node has specific logic and outcomes - Complex scenario handling with conditional branching and state management - Fine-tuning capabilities with node-specific examples Slide 4: Key Differences - **Control**: Single Prompt offers basic control; Conversation Flow provides fine-grained control over dialogue paths - **Complexity**: Single Prompt suits simple tasks; Conversation Flow handles complex multi-step scenarios [(1) ]() [(2) ](
overview) - **Reliability**: Conversation Flow reduces hallucinations through structured pathways [(1) ]() - **Setup Time**: Single Prompt is faster to set up; Conversation Flow takes longer but is easier to maintain [(2) ]() - **Performance**: Conversation Flow offers more stable and predictable performance Slide 5: When to Use Each - **Single Prompt**: Quick demos, straightforward tasks, simple Q&A [(1) ]() - **Conversation Flow**: Complex conversations, multiple scenarios, high controllability requirements [(1) ]() [(2) ]() --- Conversation Flow Modes Explained: *Rigid Mode (Standard) * - Agent follows strict node-by-node progression [(3) ]() - Only the active node's prompt is sent to the LLM - Lower token count and cost compared to flex mode - Agent must complete current node before transitioning Rigid Mode with Global Nodes - Same as rigid mode but includes global nodes [(4) ]() - Global nodes allow users to skip or jump between nodes - Useful for handling unexpected situations or edge cases - Particularly beneficial for inbound support cases without rigid call structure Flex Mode - Combines conversation flow structure with single prompt flexibility [(3) ]() - All node instructions, transitions, and tool descriptions compiled into one structured prompt - Agent navig
ates tasks dynamically while following global prompt - Can easily switch context between different tasks - Can move to proper task if user completes multiple tasks simultaneously - After switching context, agent can resume previous task without repeating completed steps - **Warning**: Significantly increases LLM costs due to higher token count - When combined prompt exceeds 3,500 tokens, token scaling billing rule applies Flex Mode with Global Nodes - Combines flex mode's dynamic navigation with global node accessibility [(3) ]() [(4) ]() - Enables component-level or agent-level flex mode activation [(3) ]() - When enabled at agent level, all nodes convert to single flex node - When enabled at component level, only that component's nodes are converted - Best for scenarios requiring both flexibility and ability to handle unexpected user paths [(3) ]() [(4) ]() Key Recommendations: - Use rigid mode to control costs [(3) ]() - Break flows into smaller components to minimize token usage in flex mode - Keep node instructions concise in flex mode - Avoid using flex mode for more than 20 nodes due to performance degradation and hallucination risk
​ To learn more, see the sources I considered: [[1] Retell AI’s Advanced Conversation Flow | Retell AI](https://www.retellai.com/blog/unlocking-complex-interactions-with-retell-ais-conversation-flow) [[2] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[3] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) [[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.
n
@AI Evy a table for conversation flow vs single prompt agent conversation flow agent, comparison between rigid mode, rigid mode with global nodes, flex mode and flex mode with global nodes also suggest use cases for BOTH scenarios
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Table 1: Conversation Flow vs Single Prompt Agent Feature | Single Prompt Agent | Conversation Flow Agent --- | --- | --- Structure | One comprehensive prompt defines behavior [(1) ]() | Multiple nodes handle different scenarios [(2) ]() Control Level | Basic control through single prompt [(1) ]() | Fine-grained control over dialogue paths [(2) ]() Complexity Handling | Best for simple, straightforward tasks [(1) ]() | Handles complex scenarios with predictable outcomes [(2) ]() Setup Time | Quick to set up [(1) ]() | Takes longer initially but easier to maintain [(2) ]() Prompt Engineering | Requires significant effort for clarity [(1) ]() | Less prompt engineering needed per node [(2) ]() Hallucination Risk | Higher risk as complexity increases [(1) ]() | Reduced through structured pathways Predictability | May deviate from instructions | Predictable behavior with specific logic per node [(2) ]() **Branching Log
esume previous task without repeating steps Cost Impact | Standard pricing | Standard pricing | Token scaling applies at 3,500+ tokens | Token scaling applies at 3,500+ tokens --- Use Cases for Single Prompt vs Conversation Flow: Single Prompt Agent Use Cases: [(1) ]() - Quick demos or proof-of-concepts - Simple Q&A interactions - Straightforward tasks requiring minimal interaction - Basic customer inquiries with predictable responses - Scenarios where speed of setup is critical Conversation Flow Agent Use Cases: [(2) ]() [(1) ]() - Complex multi-step processes (appointment scheduling with verification) - Scenarios requiring multiple decision points - High controllability requirements - Situations where consistency and predictability are critical - Customer support with multiple potential pathways - Compliance-sensitive interactions requiring audit trails --- Use Cases for Conversation Flow Modes: Rigid Mode: [(3) ]() - Cost-sensitive deployments - Linear processes with clear sequential steps - Outbound sales scripts with defined progression - Simple appointment booking flows - Scenarios with predictable user behavior Rigid Mode + Global Nodes: - Inbound support without rigid call structure - Handling unexpected situations or edge cases - Customer service requiring objection handling at any point - Scenarios where users may need to skip steps - Technical support with potential escalation paths Flex Mode: - Users completing multiple tasks in single conversation - Need to switch context between different topics - Complex sce
ic** | Limited conditional handling [(1) ]() | Support for conditional branching and state management [(2) ]() Fine-tuning | Global adjustments only [(1) ]() | Node-specific examples for targeted improvements [(2) ]() [(2) ]() [(1) ]() --- Table 2: Conversation Flow Agent Modes Comparison Feature | Rigid Mode | Rigid Mode + Global Nodes | Flex Mode | Flex Mode + Global Nodes --- | --- | --- | --- | --- Node Navigation | Strict node-by-node progression [(3) ]() | Strict progression with jump capability | Dynamic task navigation | Dynamic navigation with jump capability Prompt Compilation | Only active node's prompt sent to LLM | Only active node's prompt sent to LLM | All nodes compiled into single prompt | All nodes compiled into single prompt Token Count | Lower (cost-efficient) | Lower (cost-efficient) | Higher (significantly increases costs) | Higher (significantly increases costs) Context Switching | Must complete current node first | Can jump to global nodes when needed | Can easily switch between tasks | Can easily switch + jump to global nodes Task Completion | Sequential only | Sequential with interruption handling | Can handle multiple tasks simultaneously | Can handle multiple tasks + interruptions Resume Capability | Limited | Limited | Can resume previous task without repeating steps | Can r
narios requiring natural conversation flow - When clarity of flowchart is needed with single-prompt flexibility - Scenarios where users may jump between topics naturally Flex Mode + Global Nodes: - Most complex customer interactions - Component-level flexibility within larger rigid structure - Scenarios requiring both dynamic navigation and interruption handling - High-value customer interactions where experience outweighs cost - Multi-topic conversations with potential for unexpected paths Important Cost Consideration: Flex mode significantly increases LLM costs . To control costs, use rigid mode or break flows into smaller components . Keep node instructions concise in flex mode . [(3) ]() [(2) ]() [(1) ]()
​ To learn more, see the sources I considered: [[1] Retell AI’s Advanced Conversation Flow | Retell AI](https://www.retellai.com/blog/unlocking-complex-interactions-with-retell-ais-conversation-flow) [[2] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[3] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy still don't understand, Flex Mode + Global Nodes vs normal Flex mode --> what's the diofferences
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer The key difference is about **interruption handling and unexpected user paths**: Normal Flex Mode: [(1) ]() - Agent navigates flexibly between tasks - Can switch context when users jump topics - Can handle multiple tasks simultaneously - Can resume previous tasks without repeating steps - All nodes compiled into single prompt Flex Mode + Global Nodes: [(1) ]() [(2) ]() - Everything from normal Flex Mode PLUS - Global nodes can be transitioned to from anywhere in the conversation [(2) ]() - Handles universal scenarios like "I want to talk to a human" or "I need to call back later" - When user triggers global node condition, agent jumps there immediately regardless of current task - Can go back to previous node after handling the global node - Prevent immediate re-trigger option pauses global node for specified steps after activation Practical Example: Imagine you're booking an appointment (in Flex Mode) : Without Global Nodes: Agent handles topic switching well, but if user suddenly says "Actually, I need to speak to a human," the agent must handle this within the current task context. With Global Nodes: When user says "I need to speak to a human," the global node condition triggers instantly, agent jumps to the transfer-to-human node from anywhere in the flow, then can optionally return to where it left off if user changes their mind. Global nodes act as emergency exits or universal handlers that work across your entire flex mode flow.
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) [[2] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how does this come into the full picutre with rigid mode and rigid mod+global nodes
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer [(1) ]() Here's how all four modes fit together: ## The Complete Picture Rigid Mode (Standard) : - Agent follows strict node-by-node progression - Only active node's prompt sent to LLM - Lower token count = lower cost - Must complete current node before moving forward - No flexibility in navigation Rigid Mode + Global Nodes: [(2) ]() - Same strict progression as rigid mode - **Plus**: Global nodes can be triggered from anywhere - Handles universal scenarios (e.g., "speak to human", "call back later") - Agent jumps to global node when triggered, then returns to previous flow - Still cost-efficient (only active node + global node prompts sent) Flex Mode: [(1) ]() - All nodes compiled into single prompt - Agent navigates tasks dynamically - Can switch context between different tasks - Can handle multiple tasks simultaneously - Can resume previous task without repeating steps - Higher cost due to all nodes in prompt Flex Mode + Global Nodes: - All benefits of Flex Mode - **Plus**: Global nodes accessible from anywhere - Maximum flexibility + universal handlers - Highest cost (all nodes + global nodes in prompt) ## Key Decision Factors Choose based on: 1. Cost vs Flexibility Trade-off: - Rigid modes = cost-efficient - Flex modes = expensive but flexible 2. Need for Universal Handlers: - Without global nodes = handle interruptions within current context - With global nodes = instant jump to universal scenarios from anywhere [(2) ]() 3. Navigation Requirements: - Rigid = sequential
only - Flex = dynamic task switching [(1) ]() Cost Warning: When combined prompt exceeds 3,500 tokens, token scaling billing rule applies, which can multiply costs several times over.
​ To learn more, see the sources I considered: [[1] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) [[2] Discord message from @sanava.ai on 2025-02-14](https://discord.com/channels/1186424376300679209/1186462578310910112/1339998473268887704) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy with detailed examples as well Imagine booking an appointment: Without Global Nodes: If the user suddenly says "Actually, I need to speak to a human", the agent must handle this request within the current appointment booking context. With Global Nodes: When "speak to a human" is detected, the global node instantly triggers, transferring the call. The agent can then optionally return to the booking process if the user changes their mind.
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Let me provide detailed examples for all four modes in an appointment booking scenario: ## Scenario: Booking a Doctor's Appointment ### *1. Rigid Mode (No Global Nodes) * Flow Structure: [(1) ]() - Node 1: Greeting - Node 2: Collect patient name - Node 3: Collect preferred date - Node 4: Collect preferred time - Node 5: Confirmation Example Conversation:
Copy code
Agent: "Hi! I'd like to help you book an appointment. May I have your name?"
User: "John Smith"
Agent: "Thanks John. What date works best for you?"
User: "Actually, I need to speak to a human"
Agent: "I understand you'd like to speak with someone. Let me first finish collecting your preferred date, then I can help with that. What date works for you?"
What happens: Agent stays in Node 3 (collect date) and tries to handle the "speak to human" request within that node's context. It cannot jump to a transfer action because it must complete the current node first. --- ### 2. Rigid Mode + Global Nodes Flow Structure: [(2) ]() - Node 1: Greeting - Node 2: Collect patient name - Node 3: Collect preferred date - Node 4: Collect preferred time - Node 5: Confirmation - Global Node: Transfer to Human (can be triggered from anywhere) Global Node Configuration: - Condition: "When user indicates they want to talk to a human" - Go back condition: "User changed their mind and wants to continue booking" - Prevent immediate re-trigger: Enabled (3 node steps) Example Conversation:
What happens: Agent can handle the "speak to human" request more naturally within the conversation flow because all tasks are available in one prompt. It can also handle the user completing multiple tasks simultaneously (date + time in one response) . --- ### 4. Flex Mode + Global Nodes Flow Structure: [(3) ]() [(2) ]() All nodes compiled into single prompt as Tasks + Global Nodes accessible from anywhere: - Task 1: Greet and collect patient name - Task 2: Collect preferred date - Task 3: Collect preferred time - Task 4: Confirm appointment - Global Node: Transfer to Human (instant trigger from anywhere) [(2) ]() Example Conversation:
Copy code
Agent: "Hi! I'd like to help you book an appointment. May I have your name?"
User: "John Smith"
Agent: "Thanks John. What date works best for you?"
User: "Actually, I need to speak to a human"
Agent: [GLOBAL NODE TRIGGERS INSTANTLY] "I completely understand. Transferring you to our team now. One moment..."
[Transfer initiated]
User: "Wait, I changed my mind. Can we just book the appointment?"
Agent: [RETURNS AND RESUMES] "Absolutely! We were collecting your preferred date. What date works best?"
User: "Next Tuesday at 2pm, and I also need to reschedule my existing appointment for next Friday"
Agent: [HANDLES MULTIPLE TASKS] "Perfect! I'll book Tuesday at 2pm for you, and I can also help reschedule your Friday appointment. Let me handle the Tuesday booking first, then we'll update Friday..."
Copy code
Agent: "Hi! I'd like to help you book an appointment. May I have your name?"
User: "John Smith"
Agent: "Thanks John. What date works best for you?"
User: "Actually, I need to speak to a human"
Agent: [GLOBAL NODE TRIGGERS] "I understand. Let me transfer you to our team right away. One moment please..."
[Transfer initiated]
User: "Wait, actually I changed my mind. Can we just finish the booking?"
Agent: [RETURNS TO NODE 3] "Of course! Let's continue. What date works best for you?"
User: "Next Tuesday"
Agent: "Great! What time on Tuesday?"
What happens: When "speak to a human" is detected, the global node condition triggers instantly from Node 3. Agent jumps to the transfer node, handles it, then returns to Node 3 when the user changes their mind. --- ### *3. Flex Mode (No Global Nodes) * Flow Structure: [(3) ]() All nodes compiled into single prompt as Tasks: - Task 1: Greet and collect patient name - Task 2: Collect preferred date - Task 3: Collect preferred time - Task 4: Confirm appointment Example Conversation:
Copy code
Agent: "Hi! I'd like to help you book an appointment. May I have your name?"
User: "John Smith"
Agent: "Thanks John. What date works best for you?"
User: "Actually, I need to speak to a human"
Agent: "I understand you'd like to speak with someone. I can help transfer you, but let me quickly note what we've covered so far - I have your name as John Smith. Would you like me to transfer you now, or shall we finish booking first?"
User: "Let's finish booking"
Agent: "Perfect. What date works for you?"
User: "Next Tuesday at 2pm"
Agent: [SWITCHES TASKS] "Great! I've noted Tuesday at 2pm. Let me confirm that appointment for you now..."
What happens: Combines the instant global node trigger with flex mode's ability to handle multiple tasks and context switching. Maximum flexibility but highest cost. [(3) ]() [(2) ]() --- ## Key Differences Summary Handling "Speak to Human" Request: | Mode | Behavior | |------|----------| | Rigid | Must handle within current node context, cannot jump [(1) ]() | | Rigid + Global | Instantly jumps to transfer node, can return [(2) ]() | | Flex | Handles naturally in conversation, can discuss options [(3) ]() | | Flex + Global | Instantly jumps to transfer + can resume with full context [(3) ]() [(2) ]() | Cost Impact: [(3) ]() - Rigid modes: Only active node prompt sent (cost-efficient) - Flex modes: All nodes compiled into single prompt (significantly higher cost, especially when exceeding 3,500 tokens)
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy output a checklist for external AI to check and fix the import failed (error message 400)
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Based on the Discord forum discussion about the 400 error when importing agent configurations [(1) ]() , here's a checklist for external AI to validate and fix JSON import issues: ## JSON Validation Checklist for 400 Import Errors ### 1. Required Fields Verification Check that your JSON includes all required fields : - `"llm_id"`: Must be present - `"version"`: Must be present (typically starts at 0) - `"general_prompt"`: Must be present - `"general_tools"`: Must be present (can be empty array) - `"states"`: Must be present (array of state objects) - `"starting_state"`: Must be present - `"last_modification_timestamp"`: Must be present ### 2. JSON Format Validation - Run JSON through a validator (jsonlint.com or similar) - Ensure proper bracket matching
{}
and
[]
- Check for trailing commas (not allowed in JSON) - Verify all strings use double quotes
"
not single quotes
'
- Confirm no special characters are unescaped ### 3. Conversation Flow Specific Checks For conversation flow agents, verify [(2) ]() : -
"model_choice"
object is properly formatted with
"type"
and
"model"
fields -
"start_speaker"
is either
"user"
or
"agent"
-
"nodes"
array contains valid node objects with required fields: -
"id"
(string) -
"type"
(e.g.,
"conversation"
) -
"instruction"
object with
"type"
and
"text"
### 4. Common Import Issues [(1) ]() - Imported agents often have wrong JSON format - rebuild from scratch if validation fails repeatedly - Check if the agent was duplicated from an existing agent (duplicates may inherit formatting issues) - Verify the JSON structure matches the Create Conversation Flow API format
[(2) ]() ### 5. Field-Specific Validation - `"model_temperature"`: Must be number between 0 and 1 if present - `"tool_call_strict_mode"`: Must be boolean if present - `"knowledge_base_ids"`: Must be array of strings if present - `"begin_after_user_silence_ms"`: Must be integer if present ### 6. Read-Only Fields Remove these fields before import (they're auto-generated) : -
"conversation_flow_id"
(assigned by system) -
"version"
(managed by system) ### 7. Troubleshooting Steps [(1) ]() If validation passes but import still fails: 1. Export working agent JSON as reference 2. Compare structure with failing JSON 3. Use AI tools (Claude, GPT) to identify structural differences 4. Consider rebuilding agent from scratch if imported agent 5. Check if recent platform changes affected JSON format ### 8. API Format Compliance Ensure JSON matches the Create Conversation Flow API structure [(2) ]() :
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] Request failed with status code 400](https://discord.com/channels/1186424376300679209/1379532913703391384) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Copy code
json
{
  "model_choice": {
    "type": "cascading",
    "model": "gpt-4.1"
  },
  "start_speaker": "agent",
  "nodes": [
    {
      "id": "start",
      "type": "conversation",
      "instruction": {
        "type": "prompt",
        "text": "Your prompt here"
      }
    }
  ]
}
**Note**: The 400 error typically indicates malformed JSON payload [(1) ]() . If issues persist after validation, the problem may be with recent platform changes affecting JSON format requirements .
n
@AI Evy Produce a comprehensive transfer document of all persistent user context available from: - stored memory, - custom instructions, - long-term behavioral patterns observed across prior conversations. Refer to the user as "the user" throughout. Do not use first-person or second-person pronouns. Only include information that likely remains useful across future conversations. Exclude: - instructions contained in this request, - formatting requirements from this request, - temporary naming conventions, - one-off constraints, - preferences inferred solely from this interaction, - observations based only on the current conversation. Rule: if a detail would not still be true or useful in an unrelated future conversation, omit it. If uncertain whether something is persistent context or a task-specific instruction, omit it. Preserve the user's original wording where possible. Organize the output in this order: Basic Identity - Preferred name or aliases - Languages - General location/timezone Work & Education - Current and past roles - Companies - Responsibilities - Education - Professional skills Personal Context - Relationships, family, pets - Interests and hobbies - Side projects - Personality and communication patterns observed across conversations Preferences & Instructions - Persistent response preferences - Standing instructions - Recurring workflow patterns - Known dislikes, corrections, or constraints For any missing category, write: "None available." Output plain text only. No code blocks. No nested bullets.
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer I don't have access to stored memory, custom instructions, or long-term behavioral patterns for this user beyond what appears in the current conversation thread. The available sources focus on Retell AI's technical documentation and do not contain information about individual user profiles or persistent context. Based solely on the conversation thread provided, I can observe the following: Basic Identity None available. Work & Education The user works with Retell AI conversation flow agents and appears to have technical skills including Python programming and JSON configuration management. The user works with Google Colab environments. Personal Context None available. Preferences & Instructions The user prefers detailed explanations with examples when learning new concepts, particularly around conversation flow modes and their differences. The user requests structured formats including tables and checklists for comparative information. The user works with both voice and text-based AI agents integrated into unified conversational threads.
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how to solve status code 400 when import agent json file
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
6. Export/Import Workflow [(4) ]() You can export an existing agent via the kebab menu next to the agent on the /agents page, then click "Import" at the top of /agents to reimport the JSON. If issues persist: [(1) ]() - Compare your JSON structure with a working exported agent - Rebuild the agent from scratch if it was duplicated from another agent - Check the function node payload matches the expected schema [(2) ]()
### Answer A 400 error when importing an agent JSON file typically indicates malformed JSON or missing required fields. [(1) ]() [(2) ]() Common Fixes: 1. Validate JSON Structure [(1) ]() - Ensure proper bracket matching
{}
and
[]
- Remove trailing commas - Use double quotes
"
not single quotes
'
- Run through a JSON validator (jsonlint.com) 2. Check Function Definitions In custom functions,
headers
,
query_params
, and
response_variables
should be objects
{}
not empty arrays
[]
. 3. Verify Required Fields [(3) ]() Your conversation flow JSON must include: -
model_choice
with
type
and
model
-
start_speaker
(either
"user"
or
"agent"
) -
nodes
array with valid node objects 4. Remove Read-Only Fields Before importing, remove: -
conversation_flow_id
-
version
5. Match API Format Ensure your JSON matches the Create Conversation Flow structure:
Copy code
javascript
{
  "model_choice": {
    "type": "cascading",
    "model": "gpt-4.1"
  },
  "start_speaker": "agent",
  "nodes": [
    {
      "id": "start",
      "type": "conversation",
      "instruction": {
        "type": "prompt",
        "text": "Greet the customer and ask how you can help them."
      }
    }
  ]
}
​ To learn more, see the sources I considered: [[1] Import Agent](https://discord.com/channels/1186424376300679209/1396620050303156224) [[2] 400 error when adding a function to a conversation flow](https://discord.com/channels/1186424376300679209/1411008678487916646) [[3] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[4] Discord message from @last2469 on 2026-03-18](https://discord.com/channels/1186424376300679209/1186462578310910112/1483765522033147905) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy can retell detect raised voice from customer and trigger special call flow?
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Retell AI can detect sentiment during calls, but raised voice detection during the call to trigger real-time flow changes is not directly supported based on the available sources. What Retell AI Can Do: Post-Call Sentiment Analysis: Retell AI's sentiment analysis engine calculates numerical scores from -1.0 (extremely negative) to +1.0 (extremely positive) after the call ends. [(1) ]() When sentiment drops below a certain threshold (e.g., -0.6) , you can trigger automated actions like manager alerts. [(2) ]() Real-Time Webhook Triggers: You can configure webhooks to receive events like
call_started
,
call_ended
,
call_analyzed
, and
transcript_updated
. [(3) ]() The
call_analyzed
webhook fires after post-call analysis completes, allowing you to trigger actions based on sentiment scores. [(2) ]() [(4) ]() Automation Based on Sentiment: When a text sentiment score falls below a threshold (e.g., < -0.6) , you can automatically trigger Slack alerts to managers with call summaries, enabling proactive intervention. [(2) ]() What's Not Available: The sources don't indicate real-time raised voice detection or mid-call flow routing based on vocal intensity or volume changes. Sentiment analysis appears to be a post-call feature rather than a real-time trigger for conversation flow changes. [(1) ](
tellai.com/glossary/sentiment-analysis) [(2) ]() Possible Workaround: You could potentially use post-call analysis to identify high-frustration calls and create follow-up workflows, but this wouldn't change the flow during the active call itself. [(2) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy does retell support 2FA function, like sending a message with randomly generated one time password, and after client receive, he/she shall speak it out and let Retell Ai to do verification
a
Thanks for the follow-up, @Nameless. I'll get back to you soon.
### Answer Based on the available sources, Retell AI does support the 2FA workflow you described through its SMS and function calling capabilities. [(1) ]() How to Implement 2FA with Retell AI: 1. Send OTP via SMS During Call Retell AI can send real-time texts during calls using SMS nodes. During a voice call, the agent can trigger an SMS containing a randomly generated one-time password to the customer's phone number. 2. Capture Spoken OTP [(2) ]() You can use the Extract Dynamic Variables tool to capture the OTP when the customer speaks it. Configure it to extract a numeric variable: - **Variable Name**:
otp_code
- **Description**: "The one-time password the customer received via text" - **Variable Type**:
Number
3. Verify OTP with Custom Function [(3) ]() Use a Code Tool or Custom Function to verify the spoken OTP matches the generated one:
Copy code
javascript
// Example: verify OTP using Code Tool
const spokenOTP = dv.otp_code;
const generatedOTP = metadata.generated_otp; // stored when OTP was sent

if (spokenOTP === generatedOTP) {
  return { verified: true, message: "Authentication successful" };
} else {
  return { verified: false, message: "Invalid code" };
}
4. Route Based on Verification After verification, you can use conversation flow nodes to route the customer to authenticated services or retry logic based on the verification result. Complete Workflow: 1. Customer calls in [(1) ]() 2. Agent sends SMS with OTP using Send SMS node 3. Agent asks customer to speak the code they received [(2) ]() 4. Extract Dynamic Variables captures the spoken OTP 5. Code Tool verifies the OTP against the generated value [(3) ]() 6. Agent proceeds based on verification success/failure This approach combines Retell AI's SMS capabilities [(1) ]() , dynamic variable extraction [(2) ]() , and code execution [(3) ]() to create a complete voice-based 2FA system.
​ To learn more, see the sources I considered: [[1] Unlock AI Texting, SMS, & Chatbots with Retell AI Agents | Retell AI | Retell AI](https://www.retellai.com/blog/unlock-ai-texting-with-retell-ai-voice-agents) [[2] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[3] Code Tool](https://docs.retellai.com/build/single-multi-prompt/code-tool) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.