so16
06/09/2026, 6:26 PMAI Evy
06/09/2026, 6:26 PMAI Evy
06/09/2026, 6:27 PMretell_llm_dynamic_variables lors de la création d'un appel téléphonique [(1) ]() :
python
call = client.call.create_phone_call(
from_number="+xxxxxxxxx",
to_number="+xxxxxxxxx",
retell_llm_dynamic_variables={
"customer_name": "John Doe"
}
)
Ces variables peuvent ensuite être référencées dans vos prompts avec la syntaxe {{variable_name}} [(2) ]() .
## 2. Collecter des variables pendant la conversation
Pour extraire et stocker des variables dynamiquement pendant l'appel, Retell AI propose un système d'extraction en temps réel [(3) ]() . Vous pouvez configurer votre agent pour collecter automatiquement des informations comme des noms, emails, budgets, etc.
Les variables collectées sont ensuite disponibles dans le champ collected_dynamic_variables de la réponse de l'appel [(1) ]() .
## 3. Mettre à jour les variables pendant un appel
Vous pouvez également utiliser le paramètre override_dynamic_variables pour modifier ou ajouter des variables pendant un appel [(4) ]() .
Les types de variables supportés incluent : texte, nombres, booléens et énumérations [(3) ]() .
SOURCES UTILISÉES: [(2) ]() , [(1) ]() , [(4) ]() , [(3) ]()AI Evy
06/09/2026, 6:27 PMAI Evy
06/09/2026, 6:27 PMso16
06/09/2026, 6:33 PMAI Evy
06/09/2026, 6:33 PMAI Evy
06/09/2026, 6:33 PMcustomer_salary)
- Description : Une explication de ce que cette valeur doit être (ex: "Ask the customer his salary expectations")
- Variable Type : Choisissez parmi Text, Number, Enum, ou Boolean
### 3. Mettre à jour le prompt
Ajoutez explicitement dans votre prompt quand invoquer la fonction d'extraction . Par exemple :
When user states his name and phone number, please extract the information by calling the `extract_user_details` function.AI Evy
06/09/2026, 6:33 PMdefault_dynamic_variables de votre configuration LLM [(3) ]() , et vous pourrez les récupérer après l'appel via l'API.
Cette fonctionnalité permet à vos agents d'extraire et stocker automatiquement des informations comme des noms, emails, budgets et préférences en temps réel pendant la conversation [(4) ]() .
SOURCES UTILISÉES: [(1) ]() , [(2) ]() , [(3) ]() , [(4) ]()AI Evy
06/09/2026, 6:33 PMAI Evy
06/09/2026, 6:33 PMso16
06/09/2026, 7:01 PMAI Evy
06/09/2026, 7:01 PMAI Evy
06/09/2026, 7:01 PMretell_llm_dynamic_variables .
### 3. Récupération des variables extraites
Les variables collectées pendant la conversation seront disponibles dans la réponse de l'appel et peuvent être récupérées via l'API [(2) ]() .
## Recommandation
Pour une architecture multi-tenant, je vous suggère de :
1. Créer des agents programmatiquement pour chaque tenant via l'API Retell AI
2. Configurer les outils d'extraction de variables via l'interface une fois comme template
3. Cloner ou créer des agents similaires pour chaque nouveau tenant
Malheureusement, les sources disponibles ne montrent pas d'exemple de code Python SDK pour configurer l'outil "Extract Dynamic Variables" directement. Je vous recommande de consulter la documentation API complète de Retell AI ou de contacter leur support pour obtenir des détails sur la configuration programmatique des outils d'extraction.
SOURCES UTILISÉES: [(1) ](AI Evy
06/09/2026, 7:01 PMAI Evy
06/09/2026, 7:01 PMso16
06/09/2026, 7:13 PMAI Evy
06/09/2026, 7:13 PMAI Evy
06/09/2026, 7:13 PM{{current_time}}, {{session_type}}, {{call_id}}, etc.
## Limitation
Les sources disponibles n'indiquent pas de possibilité de définir des variables dynamiques une seule fois au niveau du compte et de les partager entre plusieurs agents. Chaque agent doit avoir ses propres variables dynamiques configurées .
Pour votre cas d'utilisation multi-tenant, vous devrez configurer les variables dynamiques individuellement pour chaque agent créé programmatiquement via l'API.
SOURCES UTILISÉES:AI Evy
06/09/2026, 7:13 PMAI Evy
06/09/2026, 7:13 PMso16
06/09/2026, 7:28 PMAI Evy
06/09/2026, 7:28 PMAI Evy
06/09/2026, 7:28 PMcustomer_salary)
- Description : Une explication de ce que cette valeur doit être (ex: "Ask the customer his salary expectations")
- Variable Type : Choisissez parmi Text, Number, Enum, ou Boolean
- Enum Options : Les options disponibles (uniquement pour le type Enum)
### 3. Types de variables supportés
Vous pouvez créer des variables de ces types :
- Text : Mots ou phrases (exemples: "headache", "John Smith")
- Number : Valeurs numériques (exemples: 42, 98.6)
- Enum : Valeur d'une liste prédéfinie (exemples: "Yes", "No", "Maybe")
- Boolean : Vrai ou faux
### 4. Mettre à jour le prompt
Il est recommandé d'inclure explicitement dans votre prompt quand invoquer la fonction d'extraction [(1) ]() . Par exemple :
When user states his name and phone number, please extract the information by calling the `extract_user_details` function.AI Evy
06/09/2026, 7:28 PM{{variable_name}} [(4) ]() et seront disponibles pour utilisation dans d'autres parties de votre configuration d'agent .
SOURCES UTILISÉES: , [(1) ]() , [(2) ]() , [(3) ]()AI Evy
06/09/2026, 7:28 PMAI Evy
06/09/2026, 7:28 PMso16
06/10/2026, 5:57 PMAI Evy
06/10/2026, 5:57 PMAI Evy
06/10/2026, 5:57 PMextract_dynamic_variable using the Update Retell LLM endpoint, users encountered errors . The key insight from that discussion is that you must first create the function inside the agent using the Create LLM API endpoint, and then the Update LLM API can only update what's already there .
The documentation shows the structure for Extract Dynamic Variables includes [(1) ]() :
- Variable Name – A short name to reference this variable
- Description – A brief explanation of what this value should be
- Variable Type –AI Evy
06/10/2026, 5:57 PMText, Number, Enum, or Boolean
- Enum Options – Options to choose from (only when type is enum)
However, the available sources don't provide a complete Python SDK code example for programmatically creating Extract Dynamic Variable tools. The documentation focuses on the dashboard interface configuration .
For your multi-tenant application, you would need to:
1. Create the extract_dynamic_variable tool when initially creating the LLM/agent via the Create LLM API endpoint [(5) ]()
2. The tool cannot be added later via the Update endpoint - it must be defined at creation time
I don't have complete API code examples in the sources for creating these tools programmatically. I recommend checking the [Documentation]() or contacting a [certified Retell partner]() for specific API implementation guidance.
Would you like a general answer based on my knowledge instead?AI Evy
06/10/2026, 5:57 PMAI Evy
06/10/2026, 5:57 PMso16
06/11/2026, 3:57 PMAI Evy
06/11/2026, 3:57 PMAI Evy
06/11/2026, 3:58 PMextract_dynamic_variable using the Update Retell LLM endpoint, users encountered errors . The key insight from that discussion is that you must first create the function inside the agent using the Create LLM API endpoint, and then the Update LLM API can only update what's already there .
## Format pour Extract Dynamic Variable
D'après la documentation de l'API Update Retell LLM, voici le format pour définir un outil extract_dynamic_variable [(2) ]() :
json
{
"type": "extract_dynamic_variable",
"name": "extract_dynamic_test",
"description": "Extract the field test",
"variables": [
{
"type": "string",
"name": "test",
"description": "Test field"
}
]
}AI Evy
06/11/2026, 3:58 PMextract_dynamic_variable lors de la création initiale du LLM via l'API Create LLM [(1) ]() . L'endpoint Update LLM peut seulement modifier ce qui existe déjà, pas ajouter de nouveaux outils de ce type .
Malheureusement, les sources disponibles ne fournissent pas d'exemple complet en Python SDK pour créer ces outils programmatiquement. Je vous recommande de consulter la [Documentation]() ou de contacter un [partenaire certifié Retell]() pour obtenir des détails spécifiques sur l'implémentation API.
SOURCES UTILISÉES: [(3) ]() , [(2) ]() , [(1) ]()AI Evy
06/11/2026, 3:58 PMAI Evy
06/11/2026, 3:58 PMso16
06/11/2026, 5:08 PMAI Evy
06/11/2026, 5:08 PMAI Evy
06/11/2026, 5:09 PMcollected_dynamic_variables field [(1) ]() [(2) ]() [(3) ]() [(4) ]() .
## Retrieving Collected Dynamic Variables
The collected_dynamic_variables object becomes available after the call ends and contains all the variables that were extracted during the conversation [(1) ]() [(3) ]() [(4) ]() .
### Example Response Structure
When you retrieve a call using the Get Call API, the response includes [(4) ]() :
json
{
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"collected_dynamic_variables": {
"last_node_name": "Test node"
}
}
### Using Python SDK
To retrieve the collected variables after a call:
python
# Get the call details
call_response = client.call.retrieve('your_call_id')
# Access the collected dynamic variables
collected_vars = call_response.collected_dynamic_variablesAI Evy
06/11/2026, 5:09 PMcollected_dynamic_variables field is only available after the call ends [(1) ]() [(3) ]() [(4) ]()
- These variables are populated when your agent uses the Extract Dynamic Variables tool during the conversation
- According to a Discord discussion, Retell AI will not populate custom post-call analysis fields for calls that were not connected or where no conversation took place, so make sure to check whether the field exists before using it [(5) ]()AI Evy
06/11/2026, 5:09 PMAI Evy
06/11/2026, 5:09 PMso16
06/11/2026, 6:55 PMAI Evy
06/11/2026, 6:55 PMAI Evy
06/11/2026, 6:56 PMcollected_dynamic_variables et custom_analysis_data
Ces deux champs servent des objectifs différents et sont remplis à des moments différents du cycle de vie de l'appel:
### collected_dynamic_variables
Ce champ contient les variables extraites en temps réel pendant la conversation par l'agent en utilisant l'outil Extract Dynamic Variables [(1) ]() [(2) ]() . Les variables sont collectées au fur et à mesure que l'utilisateur fournit les informations [(3) ]() [(4) ]() .
Exemple de structure: [(3) ]()
json
"collected_dynamic_variables": {
"last_node_name": "Test node"
}
Ces variables sont disponibles après la fin de l'appel [(3) ]() [(4) ]() .
### custom_analysis_data
Ce champ fait partie de call_analysis et contient les données d'analyse personnalisées générées après l'appel lors de l'analyse post-appel [(5) ]() [(3) ]() [(4) ]() .
Exemple de structure: [(3) ]()
json
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry...",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
}AI Evy
06/11/2026, 6:56 PMcustomer_salary)
- Description (ex: "Ask the customer his salary expectations")
- Variable Type: Text, Number, Enum, ou Boolean
3. Mettez à jour le prompt pour indiquer quand extraire les informations
Les variables extraites apparaîtront ensuite dans collected_dynamic_variables après l'appel [(3) ]() [(4) ]() .
En résumé:
- **`collected_dynamic_variables`**: Variables extraites en temps réel pendant la conversation → Définissez-les via Extract Dynamic Variables tool [(1) ]()
- **`custom_analysis_data`**: Données d'analyse personnalisées générées après l'appel [(5) ]() [(3) ]()
SOURCES UTILISÉES: [(3) ]() , [(4) ]() , [(1) ]() , [(5) ]() , [(2) ]()AI Evy
06/11/2026, 6:56 PMAI Evy
06/11/2026, 6:56 PMso16
06/11/2026, 7:02 PMAI Evy
06/11/2026, 7:02 PMAI Evy
06/11/2026, 7:02 PMcallback_requested, datetime_to_callback, appointment_set, or voicemail_left, you should use Post-Call Analysis (call_analysis.custom_analysis_data) rather than Extract Dynamic Variables [(1) ]() [(2) ]() [(3) ]() [(4) ]() .
## Why Post-Call Analysis is more appropriate
Post-Call Analysis is designed to extract information that requires understanding and analyzing the entire conversation context [(1) ]() . This is ideal for variables that need interpretation like:
- Whether a callback was requested
- If an appointment was successfully set
- Whether a voicemail was left
## Configuration via API
You can define these analysis fields using the post_call_analysis_data parameter when creating or updating an agent [(2) ]() [(3) ]() [(4) ]() :
json
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
],
"required": true,
"conditional_prompt": "<string>"
}
]AI Evy
06/11/2026, 7:02 PMcall_analysis.custom_analysis_data after the call ends .AI Evy
06/11/2026, 7:02 PMAI Evy
06/11/2026, 7:02 PMso16
06/11/2026, 7:12 PMAI Evy
06/11/2026, 7:12 PMAI Evy
06/11/2026, 7:12 PMjson
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry...",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
}
[(6) ]()
## Points importants
- Les champs d'analyse personnalisés ne seront pas remplis pour les appels qui n'ont pas été connectés ou où aucune conversation n'a eu lieu [(2) ]()
- Vérifiez si le champ existe avant de l'utiliser [(7) ]()
- L'analyse est disponible après la fin de l'appel via l'événement webhook call_analyzed [(1) ]() [(6) ]()
SOURCES UTILISÉES: [(1) ]() , [(2) ]() , [(3) ]() , [(6) ]() , [(4) ]() , [(5) ]() , [(7) ]()AI Evy
06/11/2026, 7:12 PMpost_call_analysis_data lors de la configuration de l'agent, et après l'appel, ces valeurs extraites seront disponibles dans call_analysis.custom_analysis_data [(1) ]() [(2) ]() [(3) ]() .
## Configuration des variables d'analyse
Vous configurez les variables à extraire dans post_call_analysis_data au niveau de l'agent [(3) ]() [(4) ]() [(5) ]() :
json
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
],
"required": true,
"conditional_prompt": "<string>"
}
]
[(3) ]()
## Types de données supportés
Vous pouvez extraire plusieurs types de données [(2) ]() :
- Boolean (True/False) : Déterminations simples oui/non
- Text (String) : Informations textuelles détaillées
- Number (Valeur numérique) : Mesures quantitatives
- Selector (Enum) : Catégorisation à partir d'une liste fixe
## Récupération des données analysées
Après la fin de l'appel, les données extraites sont disponibles dans call_analysis.custom_analysis_data [(1) ]() [(6) ]() :AI Evy
06/11/2026, 7:12 PMAI Evy
06/11/2026, 7:12 PMso16
06/13/2026, 8:30 PMAI Evy
06/13/2026, 8:30 PMAI Evy
06/13/2026, 8:31 PMjson
{
"type": "function",
"function": {
"name": "check_calendar_availability",
"description": "Check available time slots in Google Calendar",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "The date to check availability for"
}
},
"required": ["date"]
}
}
}
## Instructions explicites dans le prompt
Le LLM a souvent du mal à déterminer quand appeler les fonctions basé uniquement sur leurs descriptions [(1) ]() . Vous devez spécifier les conditions exactes dans votre prompt :
## Tool Usage Instructions
1. When the customer asks about available appointment times:
→ Call function `check_calendar_availability` with the requested date
2. When the customer confirms they want to book an appointment:
→ First verify availability with `check_calendar_availability`
→ Then call `schedule_event` with confirmed details
3. After successfully scheduling:
→ Call `send_email` to send confirmationAI Evy
06/13/2026, 8:31 PMAI Evy
06/13/2026, 8:31 PMAI Evy
06/13/2026, 8:31 PM