Add a variable reference
Use double braces around a variable key:customer_name, appointment_type, or order_id. Keep the
key consistent everywhere you use it.
When Vocily finds a variable reference in your greeting or prompt, it shows the key in
Prompt Variables & Defaults in Agent Core.
Create an agent variable
- Open the agent in Agent Studio.
- Open Agent Core.
- Scroll to Prompt Variables & Defaults.
- Select Add.
- Enter the variable Key.
- Enter an optional Default Value.
- Select Add Variable.
{{key}}. For example, a variable with the key
customer_name is written as {{customer_name}}.
Set or change a default value
If a variable already appears in the prompt, select Add Default beside it to set a value. To change an existing value:- Open Prompt Variables & Defaults.
- Select the edit control beside the variable.
- Update Default Value.
- Select Save Variable.
Use variables in greetings and prompts
Variables are useful when the agent should refer to a known detail without asking for it again. For example:Use data from tools and automations
Connected tools and API automations can make additional data available to the agent. You can reference that data in the prompt using the suggestions shown by the editor. Configure those connections in Capabilities. Use Test after adding a variable to check that the greeting and prompt use it as expected.Edit or remove a variable
- Select the edit control to change its default value.
- Select the delete control to remove a deletable variable.
What’s next
- Define how your agent uses the value in Agent Core.
- Add knowledge bases and tools in Capabilities.
- Test the updated greeting and conversation flow in Test.