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.

referencesinstallation.md

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

Installation

CLI (Recommended)

The ElevenLabs CLI is the recommended way to create and manage agents:

# npm (any platform with Node.js)
npm install -g @elevenlabs/cli
# macOS / Linux (Homebrew)
brew install elevenlabs/tap/elevenlabs
# Windows (Scoop)
scoop bucket add elevenlabs https://github.com/elevenlabs/scoop-bucket
scoop install elevenlabs
# Shell installer (any platform)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/elevenlabs/cli/releases/latest/download/elevenlabs-cli-installer.sh | sh

Authentication

Set ELEVENLABS_API_KEY in your environment — the CLI picks it up automatically:

export ELEVENLABS_API_KEY="your-api-key"

Or authenticate with OAuth, which stores credentials in the OS keyring:

elevenlabs auth login          # Authenticate with OAuth
elevenlabs auth whoami         # Verify current login status
elevenlabs auth logout         # Remove stored credentials

Quick Start

# Initialize a new project
elevenlabs agents init

# Create an agent from template
elevenlabs agents add "My Assistant" --template default

# Push to ElevenLabs platform
elevenlabs agents push

JavaScript / TypeScript SDK

For programmatic access and client-side integration:

npm install @elevenlabs/elevenlabs-js@latest

Important: Always use @elevenlabs/elevenlabs-js. The old elevenlabs npm package (v1.x) is deprecated and should not be used.

import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

// Option 1: Environment variable (recommended)
// Set ELEVENLABS_API_KEY in your environment
const client = new ElevenLabsClient();

// Option 2: Pass directly
const client = new ElevenLabsClient({ apiKey: "your-api-key" });

Migrating from deprecated packages

If you have old packages installed, remove them:

# Remove deprecated packages
npm uninstall elevenlabs

# Install the current packages
npm install @elevenlabs/elevenlabs-js@latest

# For browser apps, install the package that matches your UI layer:
npm install @elevenlabs/client@latest  # Vanilla JavaScript in the browser
npm install @elevenlabs/react@latest   # React on the web

Import changes:

import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { Conversation } from "@elevenlabs/client";
import {
  ConversationProvider,
  useConversationControls,
  useConversationStatus,
} from "@elevenlabs/react";

@elevenlabs/react re-exports @elevenlabs/client, so React apps usually only need @elevenlabs/react. Wrap hook consumers in ConversationProvider and prefer granular hooks such as useConversationControls and useConversationStatus; useConversation remains available as the convenience all-in-one hook.

Use @elevenlabs/react-native for React Native projects with the same provider-and-hooks API; only the import path changes.

Python

pip install elevenlabs
from elevenlabs import ElevenLabs

# Option 1: Environment variable (recommended)
# Set ELEVENLABS_API_KEY in your environment
client = ElevenLabs()

# Option 2: Pass directly
client = ElevenLabs(api_key="your-api-key")

CLI Usage

Every REST endpoint is available as a CLI subcommand. Set your API key as an environment variable and the CLI picks it up automatically — no headers or key flags needed:

export ELEVENLABS_API_KEY="your-api-key"

elevenlabs agents create \
  --json '{"name": "My Agent", "conversation_config": {"agent": {"prompt": {"prompt": "You are helpful.", "llm": "gemini-2.0-flash"}}, "tts": {"voice_id": "JBFqnCBsd6RMkjVDRZzb"}}}'

Getting an API Key

  1. Sign up at elevenlabs.io
  2. Go to API Keys
  3. Click Create API Key
  4. Copy and store securely

Or use the setup-api-key skill for guided setup.

Environment Variables

Variable Description
ELEVENLABS_API_KEY Your ElevenLabs API key (required)

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.