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
Define variables in instructions
Write your system prompt using
{{ variable_name }} placeholders wherever you want dynamic data.Variables are auto-detected
Sonara automatically detects all
{{ }} placeholders in your instructions and lists them in the Session Variables section.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.
Use cases
| Variable | Example value | Use case |
|---|---|---|
{{ customer_name }} | ”Sarah” | Personalized greetings |
{{ order_id }} | ”ORD-12345” | Order-specific support |
{{ company_name }} | ”Acme Corp” | Multi-tenant agent |
{{ appointment_date }} | ”March 15, 2025” | Appointment reminders |
{{ language }} | ”Spanish” | Language preference |
Example
Session variables are especially powerful when combined with batch calling, where each row in your CSV can supply different values for each call.

