Tailor each conversation with personalized context for each user.

While overrides are still supported for completely replacing system prompts or first messages, we recommend using Dynamic Variables as the preferred way to customize your agent’s responses and inject real-time data. Dynamic Variables offer better maintainability and a more structured approach to personalization.

Overrides enable your assistant to adapt its behavior for each user interaction. You can pass custom data and settings at the start of each conversation, allowing the assistant to personalize its responses and knowledge with real-time context. Overrides completely override the agent’s default values defined in the agent’s dashboard.

Overview

Overrides allow you to modify your AI agent’s behavior in real-time without creating multiple agents. This enables you to personalize responses with user-specific data.

Overrides can be enable for the following fields in the agent’s security settings:

  • System prompt
  • First message
  • Language
  • Voice ID

When overrides are enabled for a field, providing an override is still optional. If not provided, the agent will use the default values defined in the agent’s dashboard. An error will be thrown if an override is provided for a field that does not have overrides enabled.

Here are a few examples where overrides can be useful:

  • Greet users by their name
  • Include account-specific details in responses
  • Adjust the agent’s language or tone based on user preferences
  • Pass real-time data like account balances or order status

Overrides are particularly useful for applications requiring personalized interactions or handling sensitive user data that shouldn’t be stored in the agent’s base configuration.

Guide

Prerequisites

This guide will show you how to override the default agent System prompt & First message.

1

Enable overrides

For security reasons, overrides are disabled by default. Navigate to your agent’s settings and select the Security tab.

Enable the First message and System prompt overrides.

Enable overrides

2

Override the conversation

In your code, where the conversation is started, pass the overrides as a parameter.

Ensure you have the latest SDK installed.

1from elevenlabs.conversational_ai.conversation import Conversation, ConversationConfig
2...
3conversation_override = {
4 "agent": {
5 "prompt": {
6 "prompt": f"The customer's bank account balance is {customer_balance}. They are based in {customer_location}."
7 },
8 "first_message": f"Hi {customer_name}, how can I help you today?",
9 "language": "en" # Optional: override the language.
10 },
11 "tts": {
12 "voice_id": "" # Optional: override the voice.
13 }
14}
15
16config = ConversationConfig(
17 conversation_config_override=conversation_override
18)
19conversation = Conversation(
20 ...
21 config=config,
22 ...
23)
24conversation.start_session()

To override the agent voice or language, you’ll need to enable these in the Security tab.

Built with