All skills
elevenlabs avatar

/agents

@279173d official
by elevenlabselevenlabs/skills462 stars
74

Build voice AI agents with ElevenLabs. Use when creating voice assistants, customer service bots, interactive voice characters, or any real-time voice conversation experience, and when configuring an agent's tools, workflows, or procedures, including creating, editing, compiling, and publishing procedure drafts on an agent branch over the SDKs or REST API.

Use this Skill: https://skilld.dev/gh/elevenlabs/skills/agents

This session only. Nothing lands on disk.

referencesoutbound-calls.md

≈2.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Outbound Calls

Make outbound phone calls using your ElevenLabs agent via Twilio or Exotel integration.

Prerequisites

  1. A configured ElevenLabs agent
  2. A Twilio or Exotel phone number linked to your agent
  3. Your ElevenLabs API key

Find a linked phone number

List phone numbers that support outbound calls and filter by the assigned agent:

Python

phone_numbers = client.conversational_ai.phone_numbers.list_v_2(
    agent_id="your-agent-id",
    supports_outbound=True,
    page_size=100,
)

JavaScript

const phoneNumbers = await client.conversationalAi.phoneNumbers.listV2({
  agentId: "your-agent-id",
  supportsOutbound: true,
  pageSize: 100,
});

Use the returned phone_number_id (phoneNumberId in JavaScript) as agent_phone_number_id. When has_more (hasMore) is true, pass next_cursor (nextCursor) as cursor to retrieve the next page. See the phone number list API for additional filters.

Basic Usage

See the main agents skill for basic Twilio Python, JavaScript, and CLI examples.

Request Parameters

Parameter Type Provider Required Description
agent_id string Twilio, Exotel Yes The ID of your ElevenLabs agent
agent_phone_number_id string Twilio, Exotel Yes The ID of the linked phone number
to_number string Twilio, Exotel Yes The destination phone number in E.164 format
conversation_initiation_client_data object Twilio, Exotel No Override conversation settings for this call
telephony_call_config object Twilio, Exotel No Telephony call settings like ringing timeout
call_recording_enabled boolean Twilio No Whether to let Twilio record the call

conversation_initiation_client_data also accepts branch_id to route the call to a specific agent branch and environment to control how environment variables resolve for that call.

Response

{
  "success": true,
  "message": "Call initiated successfully",
  "conversation_id": "conv_abc123",
  "callSid": "CA1234567890abcdef"
}
Field Type Description
success boolean Whether the call was initiated successfully
message string Status message
conversation_id string ElevenLabs conversation ID for tracking
callSid string Provider call SID for reference

Exotel Calls

Use the Exotel endpoint when the linked phone number uses the Exotel provider:

elevenlabs agents exotel outbound_call \
  --agent-id "your-agent-id" \
  --agent-phone-number-id "your-phone-number-id" \
  --to-number "+1234567890"

Customizing the Call

Override agent settings for a specific call using conversation_initiation_client_data:

Python

response = client.conversational_ai.twilio.outbound_call(
    agent_id="your-agent-id",
    agent_phone_number_id="your-phone-number-id",
    to_number="+1234567890",
    call_recording_enabled=True,
    conversation_initiation_client_data={
        "branch_id": "branch_support_staging",
        "environment": "staging",
        "conversation_config_override": {
            "agent": {
                "first_message": "Hello! This is a reminder about your appointment tomorrow.",
                "language": "en"
            },
            "tts": {
                "voice_id": "JBFqnCBsd6RMkjVDRZzb"
            }
        },
        "dynamic_variables": {
            "customer_name": "John",
            "appointment_time": "2:00 PM"
        }
    }
)

JavaScript

const response = await client.conversationalAi.twilio.outboundCall({
  agentId: "your-agent-id",
  agentPhoneNumberId: "your-phone-number-id",
  toNumber: "+1234567890",
  callRecordingEnabled: true,
  conversationInitiationClientData: {
    branchId: "branch_support_staging",
    environment: "staging",
    conversationConfigOverride: {
      agent: {
        firstMessage: "Hello! This is a reminder about your appointment tomorrow.",
        language: "en",
      },
      tts: {
        voiceId: "JBFqnCBsd6RMkjVDRZzb",
      },
    },
    dynamicVariables: {
      customer_name: "John",
      appointment_time: "2:00 PM",
    },
  },
});

Configuration Overrides

Agent Settings

Option Type Description
first_message string Custom greeting for this call
language string Language code (e.g., "en", "es", "fr")
prompt object Override agent prompt and LLM settings

TTS Settings

Option Type Description
voice_id string Voice ID to use for this call
stability number Voice stability (0.0-1.0)
similarity_boost number Voice similarity boost (0.0-1.0)
speed number Speech speed multiplier
pronunciation_dictionary_locators array Pronunciation dictionaries for the call; each locator requires pronunciation_dictionary_id and version_id

Conversation Settings

Option Type Description
max_duration_seconds integer Maximum duration of this conversation in seconds

Telephony Call Configuration

Option Type Description
ringing_timeout_secs integer How long to ring the recipient before giving up (default: 60)
twilio_machine_detection object or null Twilio answering-machine detection settings. Omit or set to null to disable. Ignored for non-Twilio providers and inbound calls.

Set twilio_machine_detection.mode to enable for an early human-or-machine verdict or detect_message_end to wait for the end of a voicemail greeting. The default is enable. Detection runs asynchronously. Its verdict arrives through the separate answering_machine_detection webhook event, which must be enabled in the workspace or agent webhook settings.

Dynamic Variables

Pass custom data to your agent's prompt using dynamic_variables. Reference them in your agent's prompt with {{variable_name}} syntax.

Branch and Environment Routing

Use branch_id inside conversation_initiation_client_data for per-call branch routing on Twilio, Exotel, or SIP trunk outbound calls. Use environment alongside it when the call should resolve workspace environment variables against a non-default deployment target such as staging or production.

When assigning dynamic variables, you can use the sanitize option to remove sensitive values from tool responses before they are sent to the LLM and transcript, while still allowing variable assignment:

Field Type Default Description
sanitize boolean false If true, the assignment's value is removed from tool responses before sending to LLM/transcript but still processed for variable assignment

Complete Example

from elevenlabs import ElevenLabs

client = ElevenLabs()

# Make personalized outbound calls
customers = [
    {"name": "Alice", "phone": "+1234567890", "balance": "$150.00"},
    {"name": "Bob", "phone": "+0987654321", "balance": "$75.50"},
]

for customer in customers:
    try:
        response = client.conversational_ai.twilio.outbound_call(
            agent_id="payment-reminder-agent",
            agent_phone_number_id="your-phone-number-id",
            to_number=customer["phone"],
            call_recording_enabled=True,
            conversation_initiation_client_data={
                "conversation_config_override": {
                    "agent": {
                        "first_message": f"Hello {customer['name']}, this is a friendly reminder about your account."
                    }
                },
                "dynamic_variables": {
                    "customer_name": customer["name"],
                    "balance": customer["balance"]
                }
            }
        )
        print(f"Called {customer['name']}: {response.conversation_id}")
    except Exception as e:
        print(f"Failed to call {customer['name']}: {e}")

Source: SKILL.md on GitHub

No alerts2d5 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill is a comprehensive technical guide for building and configuring voice AI agents using the ElevenLabs platform. It utilizes official vendor tools, SDKs, and standard security practices for managing API keys and external connections.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: LOW · No issues

  • Runlayer6mo

    1/6 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 279173d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago
compatibility
Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
Other metadata
metadata
{
  "openclaw": {
    "requires": {
      "env": [
        "ELEVENLABS_API_KEY"
      ]
    },
    "primaryEnv": "ELEVENLABS_API_KEY"
  }
}
  • React
  • Python
  • elevenlabs
  • voice-ai
  • conversational-ai
  • agents
  • llm
  • text-to-speech
  • websocket
  • webrtc
  • javascript

README badge

README badge for elevenlabs/skills/agents

Creates voice AI agents with natural conversation, support for multiple LLM providers (OpenAI, Anthropic, Google, ElevenLabs), and integration of custom tools via webhooks or client-side handlers. Use for voice assistants, customer service bots, or any real-time voice conversation experience with optional web embedding via React hooks or JavaScript SDK.

Generated from the current SKILL.md.

Which LLM providers and models does this skill support?
The skill supports OpenAI (gpt-4o, gpt-4-turbo, gpt-5 family), Anthropic (Claude 3.5/3.7 Sonnet, Opus, Haiku), Google (Gemini 2.0/2.5/3.x Flash), ElevenLabs (Qwen, GLM), and custom LLM endpoints. Use GET /v1/convai/llm/list to inspect the current model catalog including token limits and capability flags.
Do I need an API key to use this skill?
Yes. The skill requires an ELEVENLABS_API_KEY environment variable and internet access to interact with the ElevenLabs platform API.
Can agents use external tools and APIs?
Yes. Agents support webhook tools (server-side API calls), client tools (browser-side execution), built-in system tools (end_call, transfer_to_number, language_detection), and pre-built integration tools (Salesforce, HubSpot, Zendesk, Cal.com).
Is there a LiveKit WebRTC compatibility issue I should know about?
WebRTC clients using livekit-client versions newer than 2.16.1 may fail during the LiveKit WebSocket handshake. Pin livekit-client to 2.16.1 in package.json overrides if you see /rtc/v1 404 errors or connection failures during session startup.
Can I route conversations through multiple steps and sub-agents?
Yes. The skill supports workflows with discrete steps, branching logic via unconditional/LLM/expression edges, and tool dispatch nodes with success/failure routing. Sub-agents are defined as override_agent nodes with additional prompts and scoped tool access.

Generated from the current SKILL.md. These answers refresh after source changes.