# Agent variables and test callers

> Send the context your own system would send with each message, and pick a saved test caller to fill it in one step.

- Source: https://www.aui.io/help/testing/agent-variables-and-test-callers
- Section: Testing your agent
- Last updated: November 23, 2026

When your agent is deployed, your own app or website often already knows who the customer is: they signed in, so you have their verified customer ID. Your system sends that context with each message through the API, and the agent can rely on it instead of asking. These values are called agent variables. In the Playground you set them yourself, so the agent behaves the way it will in production.

Test callers save you typing them. A test caller is a saved customer defined with the agent, such as "Alex Morgan, Gold member", together with the agent variables your system would send for them. Pick one, and its values are filled in.

## When you need agent variables

The agent's program says which values it expects from your system at the start of a conversation. If a required value is missing, a red dot appears on **Agent variables** (`{ }`) in the message box, and its tooltip names the missing value, for example `session.customer_id`. A green dot means variables are set for this conversation.

Common uses:

- A verified customer ID, so the agent can look up the customer's own trips without asking who they are.
- A loyalty tier or account type that changes which rules apply.
- The channel or market the conversation comes from.

## Set agent variables

1. In the message box, click **Agent variables** (`{ }`).
2. If the agent has test callers, pick one under **Caller** ("Pick a test caller…"). Its values fill the rows below, and you can still edit them.
3. To add a value by hand, type its name in **key** and its value in **value**. Click **+ Add variable** for another row, or the **×** at the end of a row to remove it.
4. To paste several values at once, click **Edit as JSON** and paste an object such as `{"session.customer_id": "C1001"}`. You can also paste `key: value` lines into a key field.
5. Click **Save**.

The values are sent with every message in this conversation from then on, as your system would send them. They also apply to a [simulated caller](https://www.aui.io/help/testing/simulated-callers) run in the same thread.

![Close crop of the Agent variables panel in dark mode, open above the message box. Under Caller, a list shows 'Alex - Alex Morgan, Gold, Classic ABC123 AT...'. A note says the program's context.given requires session.customer_id. One row has the key session.customer_id and the value C-ALEX, followed by + Add variable, the text Sent with every turn, as the calling system would, and the Cancel and Save buttons. Edit as JSON is at the top right.](https://www.aui.io/assets/help/testing/agent-variables-and-test-callers/variables-panel.png)

*Picking a test caller fills the agent variables your system would send.*

To see what a particular turn received, open it in the Reasoning pane: the **Turn** tab's **Request** section lists what was sent with the request under **Advanced**.

## Test callers

Test callers are part of the agent's definition, so everyone who works on the agent sees the same ones. You find them in two places:

- **The Agent panel.** The **Overview** tab lists every test caller with who they are and the value they send, such as their customer ID, with a button to copy it. See [The Agent panel](https://www.aui.io/help/agent-program/the-agent-panel).
- **The Caller list** in **Agent variables**, described above.

A new thread starts with the first test caller already selected. In **Simulated caller** mode, the simulated customer plays the selected test caller and knows their details. See [Simulate a caller](https://www.aui.io/help/testing/simulated-callers).

The same test callers are used in the agent's worked examples and scripted cases, so a regression plays the same customers you test with.

To add a test caller or change one, ask the builder in **Build** mode, for example: "Add a test caller: Jordan Lee, Platinum member, customer ID C1003, traveling with two children on booking DEF456." The new caller appears once the change is in your unsaved changes, and is saved for everyone when you push. A test caller's values should match a customer that exists in the data the agent reads, such as the [sandbox database](https://www.aui.io/help/integrations/sandbox-database).

> [!NOTE]
> The sandbox database has a **Personas** tab. Personas are related but separate: they are sample users offered in the picker of the deployed demo web widget, not the test callers you pick in the Playground. See [The sandbox database](https://www.aui.io/help/integrations/sandbox-database).
