
Operating Livekit Agents
Deploys and operates a LiveKit agent in production: shipping a version to LiveKit Cloud...
Install
npx skills add fcakyon/claude-codex-settings --skill operating-livekit-agents -g -a claude-code -y- Repository
- fcakyon/claude-codex-settings1.2k
- Category
- Design
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,289 tokens
- Runs scripts
- No, instructions only
What it does
Deploys and operates a LiveKit agent in production: shipping a version to LiveKit Cloud and rolling it back, secrets and configuration, the worker process model and prewarming, safe async inside worker processes, provider timeouts and degradation, graceful shutdown, SDK upgrades, and observability. Use when the user says "deploy my agent", "roll back the deployment", "tail the agent logs", "the first call after a restart is slow", "attached to a different loop / event loop is closed", "prewarm the VAD", "shut down without dropping calls", "upgrade livekit-agents safely", "correlate logs by session", or is changing an agent codebase that is already live. Not for designing the agent (building-livekit-agents) or reproducing one bad conversation locally (debugging-livekit-agents).
Operating LiveKit agents
Everything after the agent works: getting a version onto LiveKit Cloud, keeping it fast and alive
under real load, and changing it without breaking what's already running. The commands live under
lk agent; read lk agent --help and each subcommand's help rather than trusting this skill for
flags, it deliberately doesn't restate them. reading-livekit-docs has the deployment and
observability docs.
Deploying to LiveKit Cloud
On a self-hosted LiveKit server the lk agent deploy commands do not apply. Ship the agent as a
container or process under your own tooling (Docker, Kubernetes, systemd), keep secrets in its
environment, and look up the server side with lk docs get-page /home/self-hosting. The worker,
shutdown, and observability guidance below applies either way.
The shape is stable even as the flags move:
- A project directory is bound to an agent by a config file the CLI writes (
livekit.toml). Commands run from that directory find the agent without an id. - The agent ships as a container. The CLI can generate a Dockerfile for the project, or you
bring a prebuilt image. Run the container's start command locally (
lk agent start) before the first deploy, it's production mode, with production logging and a shutdown drain, and it is not whatdevmode runs. - Each deploy creates a version and rolls it out.
status,versions, andlogs(build logs and deploy logs are separate) tell you what's live and why a rollout failed. - Secrets are injected as environment variables and managed apart from the code, never baked into the image or committed. Changing secrets restarts the agent.
- Rollback returns to a previous version. How instant that is depends on the plan; the docs say. Know the rollback command before you need it.


