> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Variables & Personalization

Variables make each conversation dynamic: greet callers by name, carry data through the call, and capture structured results afterwards.

## The Variables tab

Open the **Variables** tab in the agent to manage variables. It splits them into **Input variables** and **Output variables**, and lists each with its value. Use **Add** to create one, and the **···** actions menu to **Edit** or **Delete** a variable.

![The Variables tab on Input variables, listing developer\_name and gender with default values, plus Search and Add.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/0c35651e4d489b4916b28d23f824a10020b0704f3576f3302aacfca59b664e82/voice-agents/images/variables-input.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260730%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260730T094601Z&X-Amz-Expires=604800&X-Amz-Signature=c7164feac3bff27f8976acf2d69ad1bf5e2df0ab43bf17fcd47a2a055b48d7d4&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

![The Variables tab on Output variables, with a Successful when goal rule and a table of output variables including call\_disposition and next\_step\_agreed.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/141eb1d92541e464d4ac8dfb830cf35b7a4a95dad47fe2b484ca46fce77a6a01/voice-agents/images/variables-output-goals.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260730%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260730T094601Z&X-Amz-Expires=604800&X-Amz-Signature=bb62c31731399d1ab46f8636f05d96287e2f356dd269f30c3e5597cbae6fc5c5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Agent variables

There is really only **one** kind of variable: the **agent variable**. "Input variables" and "output variables" are just frontend labels for how you use one, not different types or separate storage.

Any agent variable can be:

* **Used to personalize the conversation** (these appear as *input variables*), for example greeting the caller by name.
* **Set to update after the interaction**, so the agent extracts them from the conversation once the call ends (these appear as *output variables*), for example a disposition or resolution.

The same variable can do both. And because they are all agent variables, [tools](/conversations/build/tools) can read and write them too (see [Using variables in tools](#using-variables-in-tools)).

## Input variables

Input variables personalize the conversation: greeting the caller by name, tailoring the pitch, and so on. Each has a **name** and a **default value**. At runtime they are populated from sources such as:

* Telephony metadata (for example, the caller's number)
* An [on-start hook](/conversations/build/on-start-on-end-hooks) response
* [Campaign](/conversations/deploy/campaigns) row fields for outbound calls

## Controlling context sent to the LLM

Each input variable has a toggle that controls whether it's sent to the LLM. It's on by default, so the value is included in the agent's context. Turn it off to not send it in the context anymore.

## Output variables

Output variables are **post-call extraction** variables: the agent extracts them from the conversation, creating and enriching your data from every call (disposition, interest, resolution, and so on). Each output variable has:

* **Data type**: **String** or **Enum**. For an Enum, define the allowed **values** (for example, `agreed_to_resume` / `not_interested`).
* **Extraction prompt**: describe how to extract the value from the conversation. Genie can **Improve** the prompt for you.

![Edit output variable modal for next\_step\_agreed, with Data Type set to String, an Improve button on the Extraction Prompt, and Save Changes.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/6efacda5147f075d67cb11c5f87e029db0cb5f2ebcf926b14f0e0320f75c606c/voice-agents/images/output-variable-modal.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260730%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260730T094601Z&X-Amz-Expires=604800&X-Amz-Signature=dd707ca140cfa5d656de0d7c22ad4209a7d67439877959b408c95c440ff3d04c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Call goal

On the **Output variables** tab, define success with a **Successful when** rule: `<variable>` `<operator>` `<value>` (for example, `call_disposition` `=` `agreed_to_resume`). Every call is then scored against this goal, which powers the success and outcome insights in [Agent Analytics](/conversations/monitor/agent-analytics).

![Output variables tab with Successful when call\_disposition equals, and a value dropdown open showing enum options such as wrong\_person.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/141eb1d92541e464d4ac8dfb830cf35b7a4a95dad47fe2b484ca46fce77a6a01/voice-agents/images/variables-output-goals.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260730%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260730T094601Z&X-Amz-Expires=604800&X-Amz-Signature=bb62c31731399d1ab46f8636f05d96287e2f356dd269f30c3e5597cbae6fc5c5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Using variables in tools

Because input and output variables are all agent variables, [tools](/conversations/build/tools) can read and write them. For example, the [API tool](/conversations/build/tools/https-tool) can pass agent variables in its request and store the response (or results) back into agent variables.

## In analytics

Every agent variable surfaces as the call's **final agent variables** in [Agent Analytics](/conversations/monitor/agent-analytics), and the [call goal](#call-goal) drives the success insights.

## PII flagging and privacy transforms

Mark variables that contain personal data and apply privacy transforms (mask, hash) as needed.