For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
  • Get started
    • Overview
    • Quickstart
  • Configure
    • Overview
    • Voice & language
    • Knowledge base
    • Tools
    • Personalization
    • Authentication
  • Deploy
    • Overview
    • Environment variables
      • React SDK
      • JavaScript SDK
      • React components
      • Widget
    • WhatsApp
    • Batch calls
  • Monitor
    • Overview
    • Users
    • Testing
    • Experiments
    • Versioning
    • Conversation Analysis
    • Analytics
    • Real-time monitoring
    • OpenTelemetry traces
    • Privacy
    • Cost optimization
    • CLI
  • Advanced
    • Events
    • Custom models
    • LLM cascading
    • Post-call webhooks
  • Resources
    • UI components
  • Guides
    • Chat Mode
    • Burst pricing
    • ElevenLabs' docs agent
    • Scaling user interviews
    • Simulate Conversations
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
On this page
  • Modality configuration
  • Embedding the widget
  • Widget attributes
  • Runtime configuration
  • Dynamic variables
  • Overrides
  • Visual customization
  • Advanced implementation
  • Client Tools
  • Creating a Client Tool
  • Example Implementation
DeployWeb

Widget customization

Learn how to customize the widget appearance to match your brand, and personalize the agent's behavior from html.
Was this page helpful?
Previous

SIP trunking

Connect your existing phone system with ElevenLabs Agents using SIP trunking
Next
Built with

Widgets enable instant integration of ElevenAgents into any website. You can either customize your widget through the UI or through our type-safe ElevenAgents SDKs for complete control over styling and behavior. The SDK overrides take priority over UI customization. Our widget is multimodal and able to process both text and audio.

Modality configuration

The widget supports flexible input modes to match your use case. Configure these options in the dashboard Widget tab under the Interface section.

Multimodality is fully supported in our client SDKs, see more here.

Widget interface options

Available modes:

  • Voice only (default): Users interact through speech only.
  • Voice + text: Users can switch between voice and text input during conversations.
  • Chat Mode: Conversations start in chat (text-only) mode without voice capabilities when initiated with a text message.

For more information on using chat (text-only) mode via our SDKs, see our chat mode guide.

The widget defaults to voice-only mode. Enable the text input toggle to allow multimodal interactions, or enable text-only mode support for purely text-based conversations when initiated via text.

Embedding the widget

Widgets currently require public agents with authentication disabled. Ensure this is disabled in the Advanced tab of your agent settings.

Add this code snippet to your website’s <body> section. Place it in your main index.html file for site-wide availability:

Widget embed code
1<elevenlabs-convai agent-id="<replace-with-agent_7101k5zvyjhmfg983brhmhkd98n6>"></elevenlabs-convai>
2<script
3 src="https://unpkg.com/@elevenlabs/convai-widget-embed"
4 async
5 type="text/javascript"
6></script>

For enhanced security, define allowed domains in your agent’s Allowlist (located in the Security tab). This restricts access to specified hosts only.

Widget attributes

This basic embed code will display the widget with the default configuration defined in the agent’s dashboard. The widget supports various HTML attributes for further customization:

Core configuration
1<elevenlabs-convai
2 agent-id="agent_id" // Required: Your agent ID
3 signed-url="signed_url" // Alternative to agent-id
4 server-location="us" // Optional: "us" or default
5 variant="expanded" // Optional: Widget display mode
6 dismissible="true" // Optional: Allow the user to minimize the widget
7></elevenlabs-convai>
Visual customization
1<elevenlabs-convai
2 avatar-image-url="https://..." // Optional: Custom avatar image
3 avatar-orb-color-1="#6DB035" // Optional: Orb gradient color 1
4 avatar-orb-color-2="#F5CABB" // Optional: Orb gradient color 2
5></elevenlabs-convai>
Text customization
1<elevenlabs-convai
2 action-text="Need assistance?" // Optional: CTA button text
3 start-call-text="Begin conversation" // Optional: Start call button
4 end-call-text="End call" // Optional: End call button
5 expand-text="Open chat" // Optional: Expand widget text
6 listening-text="Listening..." // Optional: Listening state
7 speaking-text="Assistant speaking" // Optional: Speaking state
8></elevenlabs-convai>
Markdown rendering

The widget renders markdown in agent responses. Links display as plain text by default to prevent phishing.

1<elevenlabs-convai
2 markdown-link-allowed-hosts="example.com" // Domains where links are clickable (use "*" for all)
3 markdown-link-include-www="true" // Also allow www variants (default: true)
4 markdown-link-allow-http="true" // Allow http:// links (default: true)
5 syntax-highlight-theme="dark" // Code block theme: "dark", "light", or "auto"
6></elevenlabs-convai>

Runtime configuration

Two more html attributes can be used to customize the agent’s behavior at runtime. These two features can be used together, separately, or not at all

Dynamic variables

Dynamic variables allow you to inject runtime values into your agent’s messages, system prompts, and tools.

1<elevenlabs-convai
2 agent-id="agent_7101k5zvyjhmfg983brhmhkd98n6"
3 dynamic-variables='{"user_name": "John", "account_type": "premium"}'
4></elevenlabs-convai>

All dynamic variables that the agent requires must be passed in the widget.

See more in our dynamic variables guide.

Overrides

Overrides enable complete customization of your agent’s behavior at runtime:

1<elevenlabs-convai
2 agent-id="agent_7101k5zvyjhmfg983brhmhkd98n6"
3 override-language="es"
4 override-prompt="Custom system prompt for this user"
5 override-first-message="Hi! How can I help you today?"
6 override-voice-id="axXgspJ2msm3clMCkdW3"
7></elevenlabs-convai>

Overrides can be enabled for specific fields, and are entirely optional.

See more in our overrides guide.

Visual customization

Customize the widget’s appearance, text content, language selection, and more.

Update via the dashboard
Update via the CLI
Update via the API

Open your agent in the dashboard and navigate to the Widget tab to customize appearance, avatar, text, terms, language support, and more.

Widget customization

Appearance
Feedback
Avatar
Display text
Terms
Language
Muting
Shareable page

Customize the widget colors and shapes to match your brand identity.

Widget appearance


Advanced implementation

For more advanced customization, you should use the type-safe ElevenAgents SDKs with a Next.js, React, or Python application.

Client Tools

Client tools allow you to extend the functionality of the widget by adding event listeners. This enables the widget to perform actions such as:

  • Redirecting the user to a specific page
  • Sending an email to your support team
  • Redirecting the user to an external URL

To see examples of these tools in action, start a call with the agent in the bottom right corner of this page. The source code is available on GitHub for reference.

Creating a Client Tool

To create your first client tool, follow the client tools guide.

Example: Creating the redirectToExternalURL Tool

Client tool configuration

Example Implementation

Below is an example of how to handle the redirectToExternalURL tool triggered by the widget in your JavaScript code:

index.js
1document.addEventListener("DOMContentLoaded", () => {
2 const widget = document.querySelector("elevenlabs-convai");
3
4 if (widget) {
5 // Listen for the widget's "call" event to trigger client-side tools
6 widget.addEventListener("elevenlabs-convai:call", (event) => {
7 event.detail.config.clientTools = {
8 // Note: To use this example, the client tool called "redirectToExternalURL" (case-sensitive) must have been created with the configuration defined above.
9 redirectToExternalURL: ({ url }) => {
10 window.open(url, "_blank", "noopener,noreferrer");
11 },
12 };
13 });
14 }
15});

Explore our type-safe SDKs for React, Next.js, and Python implementations.