Conversational AI CLI
Overview
The ElevenLabs ConvAI CLI transforms how you build and deploy conversational AI agents by treating them as code. Instead of manually configuring agents through web interfaces, you define them in version-controlled configuration files and deploy them like any other application.
The CLI also provides a local scratch pad that coding agents like claude code can use to reason about your voice agents. Whether you’re auto-generating customer support bots from your existing documentation, creating personalized sales agents for each client, or building docs agents that stay synchronized with your codebase, the CLI makes it effortless.
Prefer to jump straight to the code?
What you can build
- Instant docs agents: Generate agents from your API documentation that are always up-to-date with your latest changes
- Site-aware assistants: Parse your Vercel app routes and components to create agents that understand your application structure
- Integration-ready bots: Connect to your existing APIs, databases, and tools through webhook and client-side integrations
Key features
- Agents as Code: Version control your AI agents alongside your application code—never lose track of changes or accidentally overwrite production configurations
- Multi-environment Support: Deploy the same agent logic across dev, staging, and production with environment-specific configurations and API keys
- Secure Authentication: Production-ready security with OS keychain integration and environment variable support for CI/CD pipelines
- Tool Management: Connect to any API, database, or service through webhook and client-side tool integrations with built-in authentication
Installation
The CLI requires Node.js version 16.0.0 or higher.
After installation, the convai
command will be available globally in your terminal.
Quick start
Initialize a new project
This creates the project structure with configuration directories and registry files.
Project structure
The CLI creates a structured project directory:
Authentication
The CLI uses a multi-layered authentication system for secure API key management:
Authentication methods (by priority)
- Environment variables (highest priority):
ELEVENLABS_API_KEY
2. OS keychain/credential store: Uses the keytar library for secure storage 3. Secure file storage:~/.convai/api_key
with restricted permissions (600)
Authentication commands
Agent management
Creating agents
Create agents using pre-built templates:
Options:
--template <type>
: Choose from available templates (default: default)--env <env>
: Target environment (default: dev)--skip-upload
: Create locally without uploading to platform
Example:
Templates
The CLI provides six pre-built templates for common use cases:
default
Complete configuration with all available fields, sensible defaults, full voice/text support, widget customization, and evaluation criteria.
minimal
Essential fields only including basic prompt, language, TTS, and conversation settings.
voice-only
Optimized for voice interactions with disabled text input and advanced voice settings.
text-only
customer-service
Professional empathetic prompts, low temperature (0.1), 30-minute duration, and evaluation criteria.
assistant
General-purpose AI assistant with balanced creativity (temperature 0.3) and versatile voice/text support.
Template commands
Synchronization
Keep your local configurations synchronized with the ElevenLabs platform:
Status and monitoring
Import and export
Tool management
The CLI supports two types of tools for extending agent capabilities:
Webhook tools
HTTP API integrations with authentication and timeout configuration:
Client tools
Direct client-side integrations:
Widget generation
Generate HTML embed code for web integration:
This outputs HTML code like:
Configuration files
Agent configuration structure
Each agent configuration includes:
Environment management
The CLI supports multiple environments with separate configurations: