Overview
The LiveKit CLI (lk) is the essential developer tool for building agents with LiveKit. Use it to set up your coding agent, scaffold an agent, run and test it locally, deploy it to LiveKit Cloud, and read its sessions to find and fix problems. It also manages your LiveKit Cloud account, rooms, and telephony.
GitHub repository
Source code and releases for the LiveKit CLI.
Get started
To install the CLI and link a project, see the CLI setup guide.
Agent workflow
A typical agent goes from template to deployment in a few commands. Then you read its sessions to find and fix problems:
lk cloud auth --user-auth # Sign in to LiveKit Cloud as yourselflk agent init my-agent --user-auth # Scaffold an agent and set up your coding agentcd my-agentlk agent console --user-auth # Talk to it locallylk agent simulate text --user-auth # Test it against simulated userslk agent create --user-auth # Deploy it to LiveKit Cloudlk agent deploy --user-auth # Deploy each new versionlk analytics session list --user-auth # Read its sessions to find and fix problems
User authentication is in beta and requires LiveKit CLI v2.19.4 or later. To use an API key instead, sign in with lk cloud auth and leave out --user-auth.
lk a is short for lk agent.
Set up your coding agent
lk agent init offers to add LiveKit's Agent Skills and the Docs MCP server to Claude Code, Codex, Cursor, and other coding agents in your new project. For an existing project, run lk skills install in its directory, or add --global to install for all projects. lk docs searches and fetches the LiveKit docs from the terminal.
Skills installation reference
Install, update, and remove skills with lk skills.
Docs search reference
Search and read the docs with lk docs.
Build and run locally
lk agent init scaffolds a Python or Node.js agent from a starter template. lk agent console lets you talk to it through your microphone, lk agent dev runs it with auto-reload, and lk agent start runs it in production mode.
Agent development reference
Reference for init, dev, start, and console.
Test it
lk agent debugger lets a coding agent or script talk to your agent one turn at a time and see the tool calls and errors behind each reply. lk agent simulate runs whole conversations against simulated users and scores them.
Agent testing reference
Reference for debugger and simulate.
Deploy to LiveKit Cloud
lk agent create registers your agent with LiveKit Cloud and deploys its first version. After that, lk agent deploy builds and deploys each new version. Other commands check status, stream logs, manage secrets, and roll back.
Agent deployment reference
Reference for deploying and managing agents on LiveKit Cloud.
Improve your agent
After your agent takes real calls, lk analytics session reads the observability data of its sessions: transcripts, logs, traces, metrics, and recordings. A coding agent can read this data to find the problems that users have with your agent, change your code to fix them, test the change with lk agent simulate, and deploy it. These commands need user authentication. They read data only from sessions that run while agent observability is on for the project.
lk cloud auth --user-authlk analytics session list --user-auth --jsonlk analytics session transcript SESSION_ID --user-auth --json
For example, give your coding agent this prompt:
Use lk analytics to read yesterday's sessions in project my-project, find the most common problems, and fix them.
Name the project in the prompt. Otherwise, the coding agent uses your default project.
Session analytics reference
Reference for finding sessions and reading their observability data.
Manage LiveKit Cloud
Sign in with your LiveKit Cloud account to manage projects, members, API keys, and webhooks:
lk cloud auth --user-authlk project create my-project --user-data-recording --user-authlk project invite create teammate@example.com --role admin --project my-project --user-auth
Most commands take the --json option, so scripts and coding agents can read the output. User authentication is in beta.
To learn more, see the following topics:
- Authentication: Sign in to LiveKit Cloud with your user account or an API key.
- Projects: Switch projects, and create and configure LiveKit Cloud projects.
Other commands
The CLI also covers the rest of LiveKit:
- App templates: Create agents, frontends, and mobile apps from templates.
- Rooms and participants: Manage rooms, create tokens, and dispatch agents.
- Egress and ingress: Record, stream, and import media.
- Telephony: Manage SIP trunks, dispatch rules, and phone numbers.
- Load testing: Load test rooms and agents.