What are session variables?
Session variables let you personalize your agent’s behavior for each call by injecting dynamic values into the system prompt. Use them to pass caller-specific data like names, order numbers, or account details.Syntax
Use double curly braces in your instructions to define variables:How it works
1
Define variables in instructions
Write your system prompt using
{{ variable_name }} placeholders wherever you want dynamic data.2
Variables are auto-detected
Sonara automatically detects all
{{ }} placeholders in your instructions and lists them in the Session Variables section.3
Set values
You can set default values for each variable in the configuration. When making calls via API or batch calling, you can override these values per call.
4
Values are injected at runtime
When a call starts, Sonara replaces all variable placeholders with their actual values before sending the prompt to the LLM.
Use cases
Example
Session variables are especially powerful when combined with batch calling, where each row in your CSV can supply different values for each call.

