Dynamic variables allow you to inject runtime values into your agent’s messages, system prompts, and tools. This enables you to personalize each conversation with user-specific data without creating multiple agents.
Dynamic variables can be integrated into multiple aspects of your agent:
Here are a few examples where dynamic variables are useful:
Dynamic variables are ideal for injecting user-specific data that shouldn’t be hardcoded into your agent’s configuration.
Your agent has access to these automatically available system variables:
system__agent_id - Unique identifier of the agent that initiated the conversation (stays stable throughout the conversation)system__current_agent_id - Unique identifier of the currently active agent (changes after agent transfers)system__caller_id - Caller’s phone number (voice calls only)system__called_number - Destination phone number (voice calls only)system__call_duration_secs - Call duration in secondssystem__time_utc - Current UTC time (ISO format)system__time - Current time in the specified timezone (human-readable format, e.g., “Friday, 12:33 12 December 2025”)system__timezone - User-provided timezone (must be valid for tzinfo)system__conversation_id - ElevenLabs’ unique conversation identifiersystem__call_sid - Call SID (twilio calls only)system__agent_turns - The total number of conversation turns the agent has taken during this conversation.system__current_agent_turns - The number of conversation turns the current agent has taken. Resets whenever the conversation transfers to a different agent.system__current_subagent_turns - The number of conversation turns the current subagent has taken. Resets whenever the workflow transitions to a different node.system__is_text_only - True if the conversation operates in text-only mode, false otherwise.system__conversation_history - JSON-serialized representation of the current conversation history. Lazily evaluated at the moment it is referenced. See format details below.System variables:
system__ (reserved prefix)system__ prefix.The system__conversation_history variable contains a JSON object with the following structure:
Each entry includes a role ("user", "agent", or "tool") and one of:
message — the text content of the turntool_requests — an array of tool calls made by the agent, with resolved parameter valuestool_results — an array of tool responsesIf a tool result or parameter contains a nested conversation history, it is redacted to a placeholder (e.g. [conversation_history (5 turns)]) to avoid unbounded recursive expansion.
This variable is useful for passing conversation context to tools (e.g. webhooks, custom LLMs) or for including conversation history in sub-agent prompts during handoffs.
Secret dynamic variables are populated in the same way as normal dynamic variables but indicate to our ElevenAgents that these should only be used in dynamic variable headers and never sent to an LLM provider as part of an agent’s system prompt or first message.
We recommend using these for auth tokens or private IDs that should not be sent to an LLM. To create a secret dynamic variable, simply prefix the dynamic variable with secret__.
Tool calls can create or update dynamic variables if they return a valid JSON object. To specify what should be extracted, set the object path(s) using dot notation. If the field or path doesn’t exist, nothing is updated.
Example of a response object and dot notation:
response.statusresponse.users.0.emailTo update a dynamic variable to be the first user’s email, set the assignment like so.

Assignments are a field of each server tool, that can be found documented here.
Add variables using double curly braces {{variable_name}} in your:


You can also define dynamic variables in the tool configuration.
To create a new dynamic variable, set the value type to Dynamic variable and click the + button.


Configure default values for testing without passing variables at runtime.
Set default values for each dynamic variable in the agent’s dashboard.

When starting a conversation, provide the dynamic variables in your code:
Ensure you have the latest SDK installed.
The public talk-to page supports dynamic variables through URL parameters, enabling you to personalize conversations when sharing agent links. This is particularly useful for embedding personalized agents in websites, emails, or marketing campaigns.
There are two methods to pass dynamic variables to the public talk-to page:
Pass variables as a base64-encoded JSON object using the vars parameter:
The vars parameter contains base64-encoded JSON:
Pass variables using var_ prefixed query parameters:
When both methods are used simultaneously, individual var_ parameters take precedence over the base64-encoded variables to prevent conflicts:
In this example, user_name will be “John” (from var_user_name) instead of “Jane” (from the base64-encoded vars).
Dynamic variables support these value types:
Verify that:
{{ variable_name }}Ensure that: