> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 Pro (current TTS) and Pulse (current
> multilingual STT) — or Pulse 2.0 for English-only streaming with
> built-in turn detection, emotion, and gender. Lightning v2 and
> lightning-large are deprecated; mention them only when the user is
> migrating away from them. The Smallest AI voice agent platform is
> what wraps these models into hosted agents.

# Variables

> Insert per-call values, like a customer's name or today's date, into your agent's prompt.

## Syntax

Wrap the variable name in double curly braces:

```
Hello {{customer_name}}! I see you're calling about order {{order_id}}.
```

At runtime, each variable is replaced with its value for that call.

A variable name must:

* start with a lowercase letter
* contain only lowercase letters, numbers, and underscores
* be 40 characters or fewer

The editor marks anything else inside `{{ }}` as a validation error. For example, `{{Customer_Name}}`, `{{1st_name}}`, and `{{customer_name|there}}` are all rejected.

## The Variables panel

On the **Prompt** tab, click the `{}` icon in the prompt toolbar to open the **Variables** panel. It has three tabs:

| Tab              | What it shows                                                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **User defined** | Variables you've used in the agent prompt. Set a default value for each one here.                                              |
| **System**       | Values the platform fills in on every call. See [System variables](#system-variables).                                         |
| **API**          | Response variables captured by your API calls. You add these on the API call itself; use **Configure API calls** to get there. |

![Variables panel with User defined, System and API tabs](/_fern-files/_img/cacd55b0630d13e45b99cc8bd47e3e073a113b9598dbf5284201d59e9ff68133.webp)

## User-defined variables

Type `{{variable_name}}` in the agent prompt and the variable appears under **User defined**. Only the agent prompt is scanned. A variable you use only in the **First message** doesn't show up in the list, so use it in the prompt too if you want to set a default for it.

Variables work in the agent prompt and the **First message**, and both are filled in at the start of each call. If a variable in the First message has no value, it's left out of what the agent says rather than read aloud. **Voicemail end text** on the [Speech tab](/voice-agents/build/speech-settings#voicemail) is the exception: it's spoken exactly as written, so variables there aren't filled in.

There's no inline fallback syntax such as `{{customer_name|there}}`. Set the default in the panel instead.

To pass a value for a single call, include it in the `variables` object when you start the call through the API. See [Start an outbound call](/api-reference/voice-agents/calls/start-outbound-call).

## System variables

The platform sets these on every call. You can't set them yourself: if you pass a value for one of these names when you start a call, it's ignored.

| Variable                  | Value                                                                                                 |
| ------------------------- | ----------------------------------------------------------------------------------------------------- |
| `{{call_id}}`             | Unique identifier for the call                                                                        |
| `{{conversation_type}}`   | The channel: `webcall`, `chat`, `telephonyOutbound`, or `telephonyInbound`                            |
| `{{agent_number}}`        | The agent's phone number                                                                              |
| `{{user_number}}`         | The user's phone number                                                                               |
| `{{current_date}}`        | Today's date, in readable form                                                                        |
| `{{current_time}}`        | The current time, in readable form                                                                    |
| `{{current_day}}`         | The day of the week                                                                                   |
| `{{agent_gender}}`        | Male or Female, based on the agent's voice                                                            |
| `{{default_language}}`    | The agent's primary language, for example English                                                     |
| `{{supported_languages}}` | Comma-separated list of the agent's languages                                                         |
| `{{timezone}}`            | The timezone set under **Agent settings**, for example (GMT+5:30) Chennai, Kolkata, Mumbai, New Delhi |

## API variables

An API call can save fields from its response as variables, which you then use in the prompt like any other variable. See [API Calls](/voice-agents/build/api-calls).