Skip to main content
Variables let you use the same agent instructions with different customer and conversation details. Add a variable reference to a greeting or prompt, then provide its value when the conversation runs or set a default value in the agent.

Add a variable reference

Use double braces around a variable key:
Use clear, reusable keys such as 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

  1. Open the agent in Agent Studio.
  2. Open Agent Core.
  3. Scroll to Prompt Variables & Defaults.
  4. Select Add.
  5. Enter the variable Key.
  6. Enter an optional Default Value.
  7. Select Add Variable.
The key is used inside the prompt as {{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:
  1. Open Prompt Variables & Defaults.
  2. Select the edit control beside the variable.
  3. Update Default Value.
  4. Select Save Variable.
The panel shows No default value set when a variable does not have one. Use a default when the agent should have a sensible value available even when a conversation does not provide a specific value.

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:
Keep instructions for the variable’s meaning in Agent Purpose or Call Flow. A variable provides a value; your prompt tells the agent how to use that value.

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.
If a variable is still referenced by a greeting, prompt, or tool, update those references before removing it.

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.