agents
ElevenLabs Agents Platform
Build voice AI agents with natural conversations, multiple LLM providers, custom tools, and easy web embedding.
Setup, before writing any code: if
ELEVENLABS_API_KEYisn't set for this project, runnpx -y @elevenlabs/cli@latest onboard initfrom the app's folder first and follow what it prints: it signs the user in and stores a key for the project, so nobody copies one by hand. When the user approved in the browser, that also signed the ElevenLabs CLI in, so don't runelevenlabs auth loginafter it. When they added the key by hand (on a remote machine), or a CLI command answers 401, load the env file into the command instead, for example(set -a && . ./.env.local && set +a && npx -y @elevenlabs/cli@latest agents list); the CLI reads a.envon its own. Otherwise see the Installation Guide for CLI and SDK setup.
Quick Start with CLI
The ElevenLabs CLI is the recommended way to create and manage agents:
# Install CLI and authenticate. After onboarding, skip these two lines and run each
# command below through npx instead, e.g. `npx -y @elevenlabs/cli@latest agents init`
npm install -g @elevenlabs/cli
elevenlabs auth login
# Initialize project and create an agent
elevenlabs agents init
elevenlabs agents add "My Assistant" --template default