> ## Documentation Index
> Fetch the complete documentation index at: https://anam.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Customise an ElevenLabs session

> Personalise ElevenLabs conversations through Anam session tokens with dynamic variables, configuration overrides, user IDs, and custom LLM parameters.

Make conversations personal with user-specific greetings, language preferences, and agent instructions. Build on your working session from the [three-step quickstart](/docs/integrations/elevenlabs/agents#quickstart).

The Anam session token API accepts additional fields that are passed through to ElevenLabs when starting the conversation. These let you personalise each session — greet users by name, switch languages, override the system prompt, or pass data to a custom LLM backend. See the [ElevenLabs personalisation overview](https://elevenlabs.io/docs/eleven-agents/customization/personalization) for full details.

All of these fields are optional and go inside `elevenLabsAgentSettings` alongside `signedUrl` and `agentId` in your [server route](/docs/integrations/elevenlabs/server-side-setup):

```typescript theme={"system"}
body: JSON.stringify({
  personaConfig: { avatarId },
  environment: {
    elevenLabsAgentSettings: {
      signedUrl,
      agentId,
      dynamicVariables: { ... },          // optional
      conversationConfigOverride: { ... }, // optional
      userId: "...",                       // optional
      customLlmExtraBody: { ... },        // optional
    },
  },
}),
```

## Dynamic variables

Dynamic variables are the simplest way to personalise a conversation at runtime. Define placeholders like `{{user_name}}` in your agent's system prompt or first message in the ElevenLabs dashboard, then fill them in when creating the session token:

```typescript theme={"system"}
body: JSON.stringify({
  personaConfig: { avatarId },
  environment: {
    elevenLabsAgentSettings: {
      signedUrl,
      agentId,
      dynamicVariables: {
        user_name: "Alice",
        account_type: "premium",
      },
    },
  },
}),
```

See [ElevenLabs dynamic variables docs](https://elevenlabs.io/docs/eleven-agents/customization/personalization/dynamic-variables) for the full syntax.

## Overrides

Overrides let you change agent behaviour per conversation — things like the first message, language, system prompt, or TTS voice. Only include the fields you want to override; everything else keeps its default from the ElevenLabs dashboard.

```typescript theme={"system"}
body: JSON.stringify({
  personaConfig: { avatarId },
  environment: {
    elevenLabsAgentSettings: {
      signedUrl,
      agentId,
      conversationConfigOverride: {
        agent: {
          prompt: {
            prompt: "You are a helpful assistant. Always respond in Spanish.",
          },
          firstMessage: "¡Hola! ¿En qué puedo ayudarte hoy?",
          language: "es",
        },
      },
    },
  },
}),
```

See [ElevenLabs overrides docs](https://elevenlabs.io/docs/eleven-agents/customization/personalization/overrides) for the full list of overridable fields.

## User ID

Pass `userId` to identify the caller in ElevenLabs analytics and conversation history:

```typescript theme={"system"}
elevenLabsAgentSettings: {
  signedUrl,
  agentId,
  userId: "user_abc123",
},
```

## Custom LLM extra body

If your ElevenLabs agent is configured to call a custom LLM backend, `customLlmExtraBody` lets you pass arbitrary parameters alongside each request:

```typescript theme={"system"}
body: JSON.stringify({
  personaConfig: { avatarId },
  environment: {
    elevenLabsAgentSettings: {
      signedUrl,
      agentId,
      customLlmExtraBody: {
        session_context: { region: "eu", tier: "enterprise" },
      },
    },
  },
}),
```

See [ElevenLabs custom LLM docs](https://elevenlabs.io/docs/eleven-agents/customization/llm/custom-llm) for how to set up a custom LLM backend.

## Keep building

<CardGroup cols={2}>
  <Card title="Director Notes" icon="arrow-right" href="/docs/integrations/elevenlabs/director-notes">
    Add expressions that follow your agent's voice.
  </Card>

  <Card title="Client tools" icon="arrow-right" href="/docs/integrations/elevenlabs/client-tools">
    Let your agent trigger actions in your app.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.