Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python AgentConfig

From Leeroopedia
Revision as of 12:24, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Elevenlabs_Elevenlabs_python_AgentConfig.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Field Value
source Elevenlabs_Elevenlabs_python
domains Conversational AI, Agent Configuration
last_updated 2026-02-15

Overview

Description

AgentConfig is a Pydantic model that defines the core configuration for a conversational AI agent in the ElevenLabs Python SDK. It encapsulates the fundamental settings that determine how an agent initiates and conducts conversations, including the first message, language settings, dynamic variable configuration, and the agent's prompt definition.

This model is auto-generated by Fern from the ElevenLabs API definition and inherits from UncheckedBaseModel. It supports both Pydantic v1 and v2 and is configured as a frozen (immutable) model with extra fields allowed.

Usage

AgentConfig is used when creating or updating conversational AI agents via the ElevenLabs API. It is typically nested within larger agent configuration structures such as ConversationalConfig. The model controls the agent's greeting behavior, language, and prompt-level configuration.

Code Reference

Source Location

src/elevenlabs/types/agent_config.py

Class Signature

class AgentConfig(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types import AgentConfig

I/O Contract

Field Type Required Description
first_message Optional[str] No If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.
language Optional[str] No Language of the agent - used for ASR and TTS.
hinglish_mode Optional[bool] No When enabled and language is Hindi, the agent will respond in Hinglish.
dynamic_variables Optional[DynamicVariablesConfig] No Configuration for dynamic variables.
disable_first_message_interruptions Optional[bool] No If true, the user will not be able to interrupt the agent while the first message is being delivered.
prompt Optional[PromptAgentApiModelOutput] No The prompt for the agent.

Usage Examples

Creating a Basic Agent Configuration

from elevenlabs.types import AgentConfig

config = AgentConfig(
    first_message="Hello! How can I help you today?",
    language="en",
    disable_first_message_interruptions=True,
)

Creating a Hinglish Agent Configuration

from elevenlabs.types import AgentConfig

config = AgentConfig(
    first_message="Namaste! Aap kaise hain?",
    language="hi",
    hinglish_mode=True,
)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment