Overrides

Tailor each conversation with personalized context for each user.

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.

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.

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

See the WebSocket reference for all available messages and options.

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