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: Difference between revisions

From Leeroopedia
Auto-imported from implementations/Elevenlabs_Elevenlabs_python_AgentConfig.md
 
Sync from local file
 
Line 89: Line 89:
== Related Pages ==
== Related Pages ==


* [[Elevenlabs_Elevenlabs_python_PromptAgentApiModelInput]] - Agent prompt configuration input model
* [[Implementation:Elevenlabs_Elevenlabs_python_PromptAgentApiModelInput]] - Agent prompt configuration input model
* [[Elevenlabs_Elevenlabs_python_GetAgentResponseModel]] - Full agent response model containing agent configuration
* [[Implementation:Elevenlabs_Elevenlabs_python_GetAgentResponseModel]] - Full agent response model containing agent configuration
* [[Elevenlabs_Elevenlabs_python_TtsConversationalConfigInput]] - TTS configuration for conversational agents
* [[Implementation:Elevenlabs_Elevenlabs_python_TtsConversationalConfigInput]] - TTS configuration for conversational agents
* [[Elevenlabs_Elevenlabs_python_AsrConversationalConfig]] - ASR configuration for conversational agents
* [[Implementation:Elevenlabs_Elevenlabs_python_AsrConversationalConfig]] - ASR configuration for conversational agents


[[Category:Implementations]]
[[Category:Implementations]]

Latest revision as of 10:37, 27 September 2026

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