Skip to content
AI & Agents
Agent

installation

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

From plugin
elevenlabs-skills
4127 skills7 agents

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

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

Agent definition

installation.md

Installation

CLI (Recommended)

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

npm install -g @elevenlabs/cli
# or
pnpm add -g @elevenlabs/cli
# or
yarn global add @elevenlabs/cli

Requires Node.js 16.0.0 or higher.

Authentication

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

API keys are securely stored in `~/.agents/api_keys.json`.

Quick Start

# Initialize a new project
elevenlabs agents init

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

# 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

Temporary LiveKit WebSocket pin

There is a known LiveKit server compatibility issue where WebRTC startup may hit the underlying LiveKit WebSocket path `/rtc/v1` and return 404, causing delays or failed sessions in React, Next.js, Electron, and other browser clients. Until the upstream issue is resolved, pin `livekit-client` to `2.16.1` when using `connectionType: "webrtc"` or when logs mention `wss://livekit.rtc.elevenlabs.io/rtc/v1`:

{
  "overrides": {
    "livekit-client": "2.16.1"
  }
}

This belongs in the app's `package.json`. Apply it when logs include `/rtc/v1` 404s, `v1 RTC path not found`, or `could not establish pc connection`. Remove the override once the ElevenLabs LiveKit server or SDK no longer requires the workaround.

**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")

cURL / REST API

Set your API key as an environment variable:

export ELEVENLABS_API_KEY="your-api-key"

Include in requests via the `xi-api-key` header:

curl -X POST "https://api.elevenlabs.io/v1/convai/agents/create" \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"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](https://elevenlabs.io) 2. Go to [API Keys](https://elevenlabs.io/app/settings/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) |

Read more
Ships withelevenlabs-skills

Agent skills for ElevenLabs developer products. These skills follow the Agent Skills specification and can be used with any compatible AI coding assistant.

Get the whole plugin
Stats
418
Stars
58
Forks
Active
Maintenance
Python
Language
MIT
License
46m ago
Last commit
6mo ago
Created

Repo: elevenlabs/skills