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 GetAgentResponseModel

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

Overview

Description

GetAgentResponseModel is a Pydantic model representing the full response returned when retrieving an agent from the ElevenLabs Conversational AI API. It is the top-level response object that aggregates all facets of an agent's configuration, including conversation settings, metadata, platform settings, phone numbers, WhatsApp accounts, workflows, and version/branch tracking.

This model is auto-generated by Fern from the ElevenLabs API definition and inherits from UncheckedBaseModel. It serves as the primary data structure for agent retrieval operations.

Usage

GetAgentResponseModel is returned by the ElevenLabs API when fetching an agent by ID. It provides a comprehensive view of the agent's current state, including all configuration, metadata, and connected channels (phone, WhatsApp). It is typically consumed by client applications to display or manage agent settings.

Code Reference

Source Location

src/elevenlabs/types/get_agent_response_model.py

Class Signature

class GetAgentResponseModel(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types import GetAgentResponseModel

I/O Contract

Field Type Required Description
agent_id str Yes The ID of the agent.
name str Yes The name of the agent.
conversation_config ConversationalConfig Yes The conversation configuration of the agent.
metadata AgentMetadataResponseModel Yes The metadata of the agent.
platform_settings Optional[AgentPlatformSettingsResponseModel] No The platform settings of the agent.
phone_numbers Optional[List[GetAgentResponseModelPhoneNumbersItem]] No The phone numbers of the agent.
whatsapp_accounts Optional[List[GetWhatsAppAccountResponse]] No WhatsApp accounts assigned to the agent.
workflow Optional[AgentWorkflowResponseModel] No The workflow of the agent.
access_info Optional[ResourceAccessInfo] No The access information of the agent for the user.
tags Optional[List[str]] No Agent tags used to categorize the agent.
version_id Optional[str] No The ID of the version the agent is on.
branch_id Optional[str] No The ID of the branch the agent is on.
main_branch_id Optional[str] No The ID of the main branch for this agent.

Usage Examples

Retrieving and Inspecting an Agent

from elevenlabs import ElevenLabs

client = ElevenLabs(api_key="your-api-key")
agent = client.conversational_ai.agents.get(agent_id="agent_abc123")

# agent is a GetAgentResponseModel instance
print(f"Agent: {agent.name} (ID: {agent.agent_id})")
print(f"Branch: {agent.branch_id}")
print(f"Tags: {agent.tags}")

Accessing Nested Configuration

# Access the conversation configuration
conv_config = agent.conversation_config

# Access phone numbers if assigned
if agent.phone_numbers:
    for phone in agent.phone_numbers:
        print(f"Phone: {phone}")

# Check version and branch info
if agent.version_id:
    print(f"Version: {agent.version_id}")
if agent.branch_id:
    print(f"Branch: {agent.branch_id}")

Related Pages

Page Connections

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