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 the agent editor.
- 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:<tool_name>grants the agent access to call an on-call workflow during the conversation. It is an instruction, not a value - nothing is substituted in its place.{{api.tool_name.field}}reads a during-call workflow’s mapped response field.{{pre.tool_name.field}}reads a before-call workflow’s mapped response field.
{{agent.*}} and {{call.*}} sets that a workflow’s own URL, headers or body can read.
{{key}} or {{custom.key}}? Both resolve. Prefer the bare {{key}}: saving a prompt that
contains one also registers the variable if it does not exist yet, so it appears in the list
with a default you can set. The dotted form reads as a namespace reference and is not picked up
that way, so a {{custom.key}} you never declared yourself resolves to nothing.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 Tools.
- Test the updated greeting and conversation flow in Test.