operating-livekit-agents
БесплатноБез исполняемых скриптовНе проверенDeploys and operates a LiveKit agent in production: shipping a version to LiveKit Cloud and rolling it back, secrets and configuration, the worker process…
от livekit★ 81 звезда на GitHubОб этом скилле
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:
- 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, so create once and deploy after that. Creating again from a copy without that file registers a second agent with the same name in the project, and nothing warns you. - 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.
Run these commands with --yes, as building-livekit-agents explains, so they don't stop at a
menu. Creating an agent can then ask for a value such as the region; take it from the user rather
than guessing. Set LK_SOURCE=skills on them too, as reading-livekit-docs explains.
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.
Before the first real traffic, check that the project records sessions (see
Observability). A session that ran while recording was off has nothing to read
afterward. If the agent is meant to take phone calls and no number routes to it yet, offer to set
one up (the reach step in building-livekit-agents); buying a number costs money, so ask first.
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.
Both SDKs have fallback built in. LiveKit Inference switches STT and TTS models server-side, and a
fallback adapter switches between plugin instances (STT, LLM, TTS) in the agent process. Use the
one that matches where the agent's models already come from before writing your own retry logic;
the fallback strategies page (reading-livekit-docs) has the parameters.
Adding a provider to an
Установить operating-livekit-agents в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл operating-livekit-agents?
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", "why is the session transcript empty", "turn on observability", 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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл operating-livekit-agents запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic