https://retellai.com/?utm_source=discord&utm_medium=seo logo
is there a way to extrac variables for single prom...
# ❓・ai-evy-support
b
@AI Evy is there a way to extrac variables for single prompt agentns?
a
Thanks for tagging me @Bobster2002. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can extract variables for single prompt agents using the Extract Dynamic Variables tool. [(1) ]() Steps: 1. Add an "Extract Dynamic Variable Tool" to your agent 2. Click "+Add" and configure each variable with: - Variable Name – A short name to reference the variable - Description – A brief explanation of what this value should be - Variable Type – Choose from
Text
,
Number
,
Enum
, or
Boolean
3. Update your prompt to instruct the agent when to invoke the extraction. For example:
Copy code
When user states his name and phone number, please extract the information by calling the `extract_user_details` function.
Available Variable Types: - Text - Any word or sentence (e.g.,
"John Smith"
) - Number - A numeric value (e.g.,
42
,
98.6
) - Enum - A value from a predefined list - Boolean - True or false This tool works for both single and multi-prompt agents as part of the general tools available in the Single/Multi Prompt agent framework. [(1) ]()
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy can I reuse this variable later in the chat?
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer --- Yes, once you extract a dynamic variable, you can reuse it later in the conversation. [(1) ]() [(2) ]() What you can do with extracted variables: - Reference collected data anytime during the call [(1) ]() - Pass dynamic variables to webhooks, CRMs, or integrations - Personalize workflows in real time For example, in custom functions you can reference saved variables using the
{{variable_name}}
syntax to include them in API calls or responses. [(5) ]()
​ To learn more, see the sources I considered: [[1] Major Platform Upgrades: Knowledge base, warm transfer, Voice & Analytics](https://www.retellai.com/changelog/major-platform-upgrades-knowledge-base-warm-transfer-voice-analytics) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.