Agent skill

Operating Livekit Agents

by livekit-examples in livekit-examples/agent-starter-python

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…

MITAuto-check passedDevOps & Cloud

Install Operating Livekit Agents

skills CLI
$ npx skills add livekit-examples/agent-starter-python --skill operating-livekit-agents -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install livekit-examples/agent-starter-python operating-livekit-agents --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/livekit-examples/agent-starter-python.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/operating-livekit-agents .claude/skills/operating-livekit-agents && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
operating-livekit-agents
GitHub stars
264
Used in
1 other repo
Token cost
~2.4k tokens
SKILL.md length
1,338 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 5 steps: A project directory is bound to an agent… → The agent ships as a container. The CLI… → Each deploy creates a version and rolls… → …
  • The user says deploy my agent
  • SKILL.md covers Deploying to LiveKit Cloud, The worker process model, Providers and Performance: measure before…, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Operating Livekit Agents is an agent skill from livekit-examples/agent-starter-python. 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…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Observability, Async programming and Deployment. The repository describes itself as: A complete voice AI starter for LiveKit Agents with Python. The licence is MIT.

When your agent uses it

  • The user says deploy my agent
  • Roll back the deployment
  • Tail the agent logs
  • The first call after a restart is slow

Example prompts

  • “deploy my agent”
  • “roll back the deployment”
  • “tail the agent logs”
  • “/operating-livekit-agents”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. A project directory is bound to an agent by a config file the CLI writes (livekit.toml).
  2. The agent ships as a container. The CLI can generate a Dockerfile for the project, or you
  3. Each deploy creates a version and rolls it out. status, versions, and logs (build logs
  4. Secrets are injected as environment variables and managed apart from the code — never
  5. Rollback returns to a previous version. How instant that is depends on the plan; the docs

What it can do on your machine

Read from SKILL.md and the folder at commit 76ddabb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Operating Livekit Agents loads about 2.4k tokens when it runs. Until then it costs about 203 tokens; SKILL.md has 1,338 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~203
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from livekit-examples/agent-starter-python at commit 76ddabb, republished under its MIT licence (© livekit-examples). 1,338 words, ~2,422 tokens.

Download SKILL.mdSave it as .claude/skills/operating-livekit-agents/SKILL.md (or your agent's skills folder).
name
operating-livekit-agents
description
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).
license
MIT
metadata.author
livekit

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

The shape is stable even as the flags move:

  1. 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.
  2. 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 what dev mode runs.
  3. Each deploy creates a version and rolls it out. status, versions, and logs (build logs and deploy logs are separate) tell you what's live and why a rollout failed.
  4. Secrets are injected as environment variables and managed apart from the code — never baked into the image or committed. Changing secrets restarts the agent.
  5. 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.

After a deploy, verify with the same tools you'd use on a stranger's agent: status for the rollout, logs for the first minutes, and a real conversation — running-livekit-simulations can run a scenario file against the deployed agent by name, which is the cheapest end-to-end check that the thing serving traffic is the thing you meant to ship.

The worker process model

Both SDKs run sessions in worker processes spawned from a parent. Misunderstanding this is the single most common source of production-only bugs.

The parent prewarms; children inherit. Load expensive, read-only resources — VAD and turn detection models, persistent clients — once in the parent through the SDK's prewarm hook, and each session inherits them without re-loading. Everything shared this way must be read-only or concurrency-safe; mutating parent state from a child is undefined behavior. Don't prewarm session-specific state, and don't prewarm what costs more memory than it saves — every byte in the parent is in every child's footprint. Then verify the child actually uses the prewarmed instance: the classic mistake is prewarming a model and having session code load a fresh one anyway, so the prewarm did nothing and startup is still slow.

The framework owns the event loop. Never create a new async runtime inside a worker, and never block on an async call from a synchronous constructor to force a result. If initialization needs async work, load lazily on first use from an already-async method, or split construction from an awaited initialize step. When you see errors about events bound to a different loop, a loop already running, tasks destroyed while pending, or a closed loop that can't be reused, the cause is almost always one of those two things — trace back to where a runtime was created or a sync path awaited something.

Providers

STT, TTS, LLM, VAD and any backend will fail in production: rate limits, timeouts, overload, outages. Set timeouts — a call that hangs is worse than one that fails fast. Distinguish transient failures worth retrying from persistent ones that need a fallback or escalation. Degrade to a meaningful spoken response, never to silence. Log provider response times, because rising latency is usually the first sign of an outage.

Adding a provider to an existing agent: check whether the SDK already has a plugin before writing one; follow how the codebase already initializes, configures, and handles errors for its other providers; run its config through the same pipeline; and test under realistic latency, not just happy-path responses.

Performance: measure before you change anything

The metric users feel is time to first audio — from the caller finishing to the agent starting to speak. Break it down before optimizing: connection, provider initialization, first inference, tool execution. Watch context growth over a long call; unbounded history means every turn is slower than the last.

The anti-patterns worth grepping for:

  • Synchronous I/O in an async context. One blocking HTTP call or file read freezes audio for every concurrent operation in that process.
  • Loading during a call — a model or connection established on first use inside a session is latency the caller hears. Move it to prewarm or session setup.
  • Unbounded context with no summarization.
  • Every tool registered globally regardless of conversation phase; each definition costs every LLM call.

Endpointing and turn detection are tuning parameters, not defaults to accept. Too aggressive and the agent talks over people who pause to think; too conservative and every reply feels late. The right setting depends on the use case — a support agent handling complex questions wants patience, a quick-answer assistant wants speed. Measure with audio simulations (running-livekit-simulations scores turn-taking and perceived latency) rather than by feel.

Show full SKILL.md (497 more words)Show less

Shutdown and upgrades

In production mode the server drains on a termination signal: it stops taking new jobs, finishes active ones up to a drain timeout, then exits. Two things break this. An orchestrator grace period shorter than the drain timeout kills calls mid-sentence — match them. And post-call work (writing state, publishing events, finalizing recordings) that isn't tied to the job's lifecycle gets cut off — make sure it completes inside the drain. Dev mode has no drain, so shutdown behavior has to be tested in start mode.

The SDK moves fast and breaks things across versions. Pin the version. Read the changelog with reading-livekit-docs before upgrading. Upgrade on a branch, run the test suite, then have real conversations and run the simulation suite — some regressions only appear in actual dialogue. Watch latency and error rates for the first hours after the deploy.

Observability

Three things make a production incident tractable instead of a mystery:

  • Every log line carries the session id, so one call can be traced end to end.
  • Phase boundaries are timed — connected, first user speech, first agent response — so you can see where latency entered, not just that it did.
  • Provider metrics are tracked separately from application logs, so a degrading provider is visible without digging.

LiveKit Cloud provides agent logs, session insights, and tracing you can export to your own observability provider; the docs describe what's available and how to wire it.

Debugging a production failure

Classify first, then reproduce:

  • Loop and task errors — the worker process model, above. Find where a runtime was created or a sync path awaited.
  • Provider timeouts vs. degradation — a single timeout is transient; a rising latency trend is systemic. Provider response-time logs tell you which.
  • Silent tool failures — a tool that raised was caught by the framework and the user heard a vague reply or nothing. Tools need explicit error handling that returns something the model can say.
  • Connection instability — understand the SDK's built-in reconnection before adding retries on top of it; log connection state changes.

Then take it local: reproduce the conversation with debugging-livekit-agents, pin the cause as a test with testing-livekit-agents, and if it was a whole-conversation failure, add a scenario so it can't come back quietly.

Changing a codebase that's already live

Read the project's own docs and conventions first — they override anything general. Read two or three modules like the one you're about to add before writing it, and follow how they're initialized, configured, tested, and wired into the config pipeline. Use the test fixtures and mock patterns that already exist rather than building parallel ones; a second way to do something that already has a way confuses every future contributor. Mock at the boundary — the provider call, the database — and exercise the real module logic.

  • Designing the agent in the first place: building-livekit-agents
  • Reproducing a bad conversation locally: debugging-livekit-agents
  • Pinning a production bug as a test: testing-livekit-agents
  • End-to-end checks against a deployed agent: running-livekit-simulations
  • Deployment and observability docs, changelogs: reading-livekit-docs

© livekit-examples, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/operating-livekit-agents of livekit-examples/agent-starter-python.

Open the folder on GitHubat commit 76ddabb

Used in 2 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in livekit-examples/agent-starter-python, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Operating Livekit Agents next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Operating Livekit Agents compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Operating Livekit Agents this skilllivekit-examples/agent-starter-python2641 repos~2.4kAutomated safety check: PassMIT
Motel Debugkitlangton/motel298—~2.2kAutomated safety check: PassMIT
Aspiremicrosoft/aspire.dev1964 repos~1.1kAutomated safety check: PassMIT
Codex Session Debuggingweave-os/router5.6k—~4.5kAutomated safety check: WarnApache-2.0
Medusa Cloud Local Buildmedusajs/medusa-agent-skills227—~1kAutomated safety check: NotesNone
Log Aggregationaspectrr/deer405—~1.4kAutomated safety check: PassMIT

Similar skills

  • Motel Debug

    kitlangton/motel

    Debug applications with motel, a local OpenTelemetry ingest and query server.

    298 GitHub stars~2.2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Aspire

    microsoft/aspire.dev

    Official

    Orchestrates Aspire distributed applications using the Aspire CLI for running, debugging, and managing distributed apps.

    196 GitHub starsUsed in 4 repos~1.1k tokens
    DevOps & CloudAuto-check passed
  • Correlates a Codex CLI session's local transcript with a model router's production logs to explain why a reply rendered the way it did.

    5.6k GitHub stars~4.5k tokensUpdated today
    DevOps & CloudAuto-check: warnings
  • Medusa Cloud Local Build

    medusajs/medusa-agent-skills

    Reproduces a Medusa Cloud build on your machine with mcloud local build, to debug build-failed deployments without pushing or waiting on Cloud.

    227 GitHub stars~1k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: notes
  • Log Aggregation

    aspectrr/deer

    ELK Stack deployment, Logstash pipeline building, Filebeat configuration, and Kibana dashboard setup.

    405 GitHub stars~1.4k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • Gcloud Usage

    fcakyon/claude-codex-settings

    This skill should be used when user asks about "GCloud logs", "Cloud Logging queries", "Google Cloud metrics", "GCP observability", "trace analysis", or "debugging production issues on GCP".

    1.2k GitHub stars~871 tokensUpdated today
    DevOps & CloudAuto-check passed

More from livekit-examples/agent-starter-python

  • Writing Livekit Scenarios

    livekit-examples/agent-starter-python

    Creates and maintains the scenarios a LiveKit agent simulation runs, and wires the agent to consume them.

    264 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Debugging Livekit Agents

    livekit-examples/agent-starter-python

    Drives a multi-turn conversation with a LiveKit agent running locally to see what it does.

    264 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Reading Livekit Docs

    livekit-examples/agent-starter-python

    Looks up current LiveKit facts (API signatures, CLI flags, config options, model and provider support, SDK changelogs, pricing) from the docs instead of answering from memory.

    264 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Running Livekit Simulations

    livekit-examples/agent-starter-python

    Runs LiveKit agent simulations and acts on the results. An agent skill from livekit-examples/agent-starter-python.

    264 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Building Livekit Agents

    livekit-examples/agent-starter-python

    Builds voice and chat AI agents with LiveKit Agents and LiveKit Cloud.

    264 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check: notes
  • Testing Livekit Agents

    livekit-examples/agent-starter-python

    Writes turn-level tests for a LiveKit agent in the user's normal test suite: pytest (Python) or Vitest (Node.js).

    264 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed

Questions about Operating Livekit Agents

What does Operating Livekit Agents do?

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…. Operating Livekit Agents is an agent skill from livekit-examples/agent-starter-python. 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.

When should I use Operating Livekit Agents?

Operating Livekit Agents fits situations like: the user says deploy my agent; roll back the deployment; tail the agent logs; the first call after a restart is slow.

How do I install Operating Livekit Agents in Claude Code?

Run `npx skills add livekit-examples/agent-starter-python --skill operating-livekit-agents -a claude-code`. Or copy the skill folder (.agents/skills/operating-livekit-agents in livekit-examples/agent-starter-python) into .claude/skills/operating-livekit-agents in your project. Claude Code loads it when a task matches its description.

How do I install Operating Livekit Agents in Codex?

Run `npx skills add livekit-examples/agent-starter-python --skill operating-livekit-agents -a codex`. Or copy the skill folder (.agents/skills/operating-livekit-agents in livekit-examples/agent-starter-python) into .agents/skills/operating-livekit-agents in your project. Codex loads it when a task matches its description.

Can I use Operating Livekit Agents in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add livekit-examples/agent-starter-python --skill operating-livekit-agents -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/operating-livekit-agents, .gemini/skills/operating-livekit-agents, .github/skills/operating-livekit-agents and .opencode/skills/operating-livekit-agents in your project.

What does Operating Livekit Agents need to run?

SKILL.md names no scripts, command-line tools or credentials: Operating Livekit Agents is instructions for the agent only.

Does Operating Livekit Agents access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Operating Livekit Agents safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Operating Livekit Agents use?

Operating Livekit Agents is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Operating Livekit Agents use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Operating Livekit Agents?

Skills that share tags, products or a category with Operating Livekit Agents: Motel Debug (kitlangton/motel, 298 stars), Aspire (microsoft/aspire.dev, 196 stars), Codex Session Debugging (weave-os/router, 5.6k stars) and Medusa Cloud Local Build (medusajs/medusa-agent-skills, 227 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Operating Livekit Agents?

livekit-examples (a GitHub organization) maintains it in livekit-examples/agent-starter-python, which has 264 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

Source: livekit-examples/agent-starter-python on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.