Agent skill

Building Livekit Agents

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

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

MITAuto-check: notesAI & LLM Engineering

Install Building Livekit Agents

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

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

GitHub CLI
$ gh skill install livekit-examples/agent-starter-python building-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/building-livekit-agents .claude/skills/building-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
building-livekit-agents
GitHub stars
264
Used in
1 other repo
Token cost
~2.4k tokens
SKILL.md length
1,314 words
Files
2 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 4 steps: Load reading-livekit-docs and look up… → Confirm the project is connected to a… → Decide the workflow shape before writing… → …
  • The user asks to build a voice agent
  • SKILL.md covers Before you write code, How voice changes the…, Structure: handoffs and tasks and Tools, plus 6 more sections
  • Needs LIVEKIT_API_KEY and LIVEKIT_API_SECRET

What it does

Building Livekit Agents is an agent skill from livekit-examples/agent-starter-python. Builds voice and chat AI agents with LiveKit Agents and LiveKit Cloud. Use when the user asks to "build a voice agent", "create a LiveKit agent", "add voice AI to my app", "implement handoffs", "structure an agent workflow", "my agent is slow / too chatty", "it says it booked but nothing was saved", "make it confirm before committing", "it keeps re-asking things the caller already said", or is writing code against the LiveKit Agents SDK. Covers architecture: designing for latency, keeping context small, splitting…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/state-and-effects.md`).

It sits in AI & LLM Engineering, covering Speech recognition and synthesis. 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 asks to build a voice agent
  • Create a LiveKit agent
  • Add voice AI to my app
  • Implement handoffs

Example prompts

  • “build a voice agent”
  • “create a LiveKit agent”
  • “add voice AI to my app”
  • “/building-livekit-agents”

Requirements

  • A credential in LIVEKIT_API_KEY
  • A credential in LIVEKIT_API_SECRET

Workflow steps

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

  1. Load reading-livekit-docs and look up the APIs you're about to use. Don't write LiveKit
  2. Confirm the project is connected to a LiveKit Cloud project (or a LiveKit OSS server)
  3. Decide the workflow shape before writing the first agent class (see "Structure" below).
  4. Plan how you'll verify it. Decide now whether you'll use debugging-livekit-agents (drive a

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 these keys or tokens, usually read from environment variables:

    • LIVEKIT_API_KEY
    • LIVEKIT_API_SECRET

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

Context cost

Building Livekit Agents loads about 2.4k tokens when it runs, and up to ~4.5k if it reads all its reference files. Until then it costs about 207 tokens; SKILL.md has 1,314 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~207
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.5k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:28
    _KEY`, `LIVEKIT_API_SECRET`, usually in `.env`. The CLI can set these

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,314 words, ~2,401 tokens.

Download SKILL.mdSave it as .claude/skills/building-livekit-agents/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
building-livekit-agents
description
Builds voice and chat AI agents with LiveKit Agents and LiveKit Cloud. Use when the user asks to "build a voice agent", "create a LiveKit agent", "add voice AI to my app", "implement handoffs", "structure an agent workflow", "my agent is slow / too chatty", "it says it booked but nothing was saved", "make it confirm before committing", "it keeps re-asking things the caller already said", or is writing code against the LiveKit Agents SDK. Covers architecture: designing for latency, keeping context small, splitting a monolithic agent into handoffs and tasks, and designing for voice. Also covers keeping the model in charge of meaning while code owns state, approvals, and effects. For API specifics use reading-livekit-docs. To check behavior use debugging-livekit-agents and testing-livekit-agents.
license
MIT
metadata.author
livekit

Building LiveKit agents

This skill covers how to structure a voice agent. It has no API specifics, because those change; get them from reading-livekit-docs.

It assumes LiveKit Cloud, the recommended path: managed infrastructure, plus LiveKit Inference for models so you don't manage per-provider API keys.

Where the agent runs and which LiveKit the project uses are separate questions. An agent the user self-hosts (on their own servers instead of LiveKit Cloud's agent hosting) still connects to LiveKit Cloud and can still use LiveKit Inference. Inference is a LiveKit Cloud feature, so it's only off the table when the project runs on LiveKit OSS. The architecture advice applies either way; on LiveKit OSS, models come from each provider's own plugin and API keys.

Before you write code

  1. Load reading-livekit-docs and look up the APIs you're about to use. Don't write LiveKit code from memory.
  2. Confirm the project is connected to a LiveKit Cloud project (or a LiveKit OSS server): LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET, usually in .env. The CLI can set these up.
  3. Decide the workflow shape before writing the first agent class (see "Structure" below). Splitting a monolith into handoffs later is much more work than starting with two agents.
  4. Plan how you'll verify it. Decide now whether you'll use debugging-livekit-agents (drive a real conversation), testing-livekit-agents (assert on turns), or both, because it affects how you factor the code.

How voice changes the requirements

A voice agent is more than a chat agent with a speaker attached. These constraints drive most design decisions:

Latency. Users expect a reply within a few hundred milliseconds. Context size, tool count, whether a tool call sits on the critical path, and whether responses stream all add to or save from that budget. Plan for network stalls and provider timeouts too; they happen routinely.

Context size. A 10,000-token system prompt with 50 tool definitions feels sluggish on any model, because the model re-reads all of it every turn. Give each phase only the tools it can reach and the instructions it needs.

Listening. Users can't skim or scroll back, and they'll talk over the agent. Long replies are a bug, silence sounds broken, and interruptions are normal.

Structure: handoffs and tasks

The usual failure is one agent that does everything. It collects every tool, instruction, and piece of state until it's slow and unreliable, and by that point splitting it is a rewrite.

Handoffs transfer control from one agent to another. Put them at natural conversation boundaries, like greeting → intake → resolution, or general support → billing specialist. Each agent then carries only its own tools and instructions. Choose a boundary where the context can be summarized for the next agent. If the next agent needs everything the previous one had, the boundary is in the wrong place.

Tasks are tightly scoped prompts aimed at one outcome. Use them for discrete operations that don't need a full agent, or where a focused prompt works better than a general one.

If you can't say in one sentence what an agent is responsible for, split it.

Tools

  • Tool descriptions drive behavior. When an agent calls the wrong tool or calls one at the wrong time, check the description before blaming the model. The most common cause is a description that doesn't say when to use the tool.
  • Keep tools off the critical path where you can. Users hear every tool call they wait on as latency.
  • Plan for tool failure. Decide what the agent says when a backend is down or returns nothing. An agent that makes up an answer when a tool fails is very hard to catch later.

The model interprets; your code owns the state

The model reads the conversation and proposes actions. Application code owns the records, the permission checks, the state transitions, and every external effect. Most agents that "work in the demo and fail in production" have that line blurred somewhere.

  • Never classify intent with code. Approval, refusal, correction, cancellation, "next Tuesday" — the runtime model interprets those. A regex, a keyword list, or a phrase whitelist will be wrong in ways you never test, and adding one as a "conservative" second gate has the same defect. Validate structure in code (typed dates, enums, required fields); leave meaning to the model.
  • A tool call is the model's interpretation, not proof it was right. Keep message provenance, version checks, ordering, and business rules in code, where they can be checked.
  • Tools return facts, not sentences. Compact data, outcomes, and actionable errors; the model chooses the wording. Script exact text only when the task mandates a verbatim disclosure.
  • Follow the user, not a form. Accept facts the caller volunteers together, ask only for what's missing or ambiguous, and never demand ritual wording ("say yes to confirm") after a clear answer.
  • One authoritative state object per session, and keep model-supplied facts separate from trusted identity, the clock, ids, and receipts.
Show full SKILL.md (499 more words)Show less

Make every change mean exactly one thing

The costliest agent bugs are mutations that did more or less than the caller meant: "no note for him" clearing the whole list, a correction that also reset a confirmed field, a re-stated value that invalidated an approval. Before writing a mutating tool, state its target, what changes, and what must stay the same — then pair it with the nearest request that must do something different.

The rules in short: omission preserves; missing, empty, unknown, and cleared are four different things; collections get application-issued ids; validate before applying; a scoped negative never clears a collection; unchanged values are no-ops. When a task requires review before an effect, approval is a later real user message for that version, delivery is tracked at the speech boundary, and success is published only after the write commits. The full treatment — including closing, output ownership, and how text and audio input take different hook paths — is in references/state-and-effects.md. Read it before building anything that books, edits, confirms, or ends calls.

Start with a failing complete-path test

Before expanding the tool surface or polishing the persona, pick one ordinary user goal and drive it through the real agent to its required effect — the booking exists, the record changed, the call ended. Write the expected result from the user's request, not from the application's own export. Then pair it with the first guard that must refuse, because a test that rejects everything proves nothing about the guard. Keep that pair green while you add everything else.

Verify before you call it done

Prompt changes break agent behavior as easily as code changes do, and trying it once by hand doesn't count as verification.

  • While building, drive conversations with debugging-livekit-agents. It runs your agent locally in text mode, lets you send turns, and shows the tool calls behind each reply.
  • Before you call it done, write tests with testing-livekit-agents. At minimum, cover the core behavior the user asked for, tool invocation with correct arguments if there are tools, and one failure path.
  • Before shipping a change to a live agent, run simulations with writing-livekit-scenarios and running-livekit-simulations.

If the user asks for no tests, build without them, mention once that you'd recommend them before production, and move on.

Common mistakes

  • Starting with one agent "just for now." You're deciding the structure up front; the implementation can still be simple.
  • Putting off latency. It compounds, and it only gets more expensive to fix.
  • Copying an example you don't understand. An example shows one pattern. Pasted whole, it brings extra context and components you can't explain.
  • Assuming your model knowledge is current. It isn't. See reading-livekit-docs.
  • Shipping on manual testing alone. Prompt edits change behavior without any visible error, and tests let you find out before users do.
  • Facts, APIs, changelogs: reading-livekit-docs
  • Drive a live conversation while building: debugging-livekit-agents
  • Turn-level tests: testing-livekit-agents
  • Whole-conversation testing: writing-livekit-scenarios, running-livekit-simulations
  • State, approvals, commits, delivery, closing: references/state-and-effects.md
  • Deploying it and keeping it healthy in production: operating-livekit-agents

© 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

SKILL.md and 1 other file (references) in .agents/skills/building-livekit-agents of livekit-examples/agent-starter-python.

  • SKILL.md
  • references/state-and-effects.md

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

Building 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.

Building Livekit Agents compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Building Livekit Agents this skilllivekit-examples/agent-starter-python2641 repos~2.4kAutomated safety check: NotesMIT
Reviewing Changerapidaai/voice-ai744—~751Automated safety check: PassCustom licence
Retellai CI Integrationjeremylongshore/tons-of-skills-marketplace2.8k—~497Automated safety check: PassMIT
Retellai Debug Bundlejeremylongshore/tons-of-skills-marketplace2.8k—~502Automated safety check: PassMIT
Digital Health Clinical Asr SetupNVIDIA/skills3.5k—~4.5kAutomated safety check: NotesApache-2.0
Retellai SDK Patternsjeremylongshore/tons-of-skills-marketplace2.8k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Reviewing Change

    rapidaai/voice-ai

    Perform an evidence-based review of a fixed change boundary.

    744 GitHub stars~751 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Retellai CI Integration

    jeremylongshore/tons-of-skills-marketplace

    Retell AI ci integration — AI voice agent and phone call automation.

    2.8k GitHub stars~497 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Retellai Debug Bundle

    jeremylongshore/tons-of-skills-marketplace

    Retell AI debug bundle — AI voice agent and phone call automation.

    2.8k GitHub stars~502 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Official

    Stage 1 of Clinical ASR Flywheel. An agent skill from NVIDIA/skills.

    3.5k GitHub stars~4.5k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Retellai SDK Patterns

    jeremylongshore/tons-of-skills-marketplace

    Production-ready Retell AI SDK patterns for voice agent applications.

    2.8k GitHub stars~1.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Triage

    TalAter/annyang

    Triage and close GitHub issues on TalAter/annyang. An agent skill from TalAter/annyang.

    6.8k GitHub starsUsed in 1 repo~810 tokens
    AI & LLM EngineeringAuto-check: notes

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
  • Operating Livekit Agents

    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…

    264 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • 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 Building Livekit Agents

What does Building Livekit Agents do?

Builds voice and chat AI agents with LiveKit Agents and LiveKit Cloud. Building Livekit Agents is an agent skill from livekit-examples/agent-starter-python. Builds voice and chat AI agents with LiveKit Agents and LiveKit Cloud.

When should I use Building Livekit Agents?

Building Livekit Agents fits situations like: the user asks to build a voice agent; create a LiveKit agent; add voice AI to my app; implement handoffs.

How do I install Building Livekit Agents in Claude Code?

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

How do I install Building Livekit Agents in Codex?

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

Can I use Building 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 building-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/building-livekit-agents, .gemini/skills/building-livekit-agents, .github/skills/building-livekit-agents and .opencode/skills/building-livekit-agents in your project.

What does Building Livekit Agents need to run?

Going by SKILL.md and its folder, Building Livekit Agents needs credentials named LIVEKIT_API_KEY and LIVEKIT_API_SECRET. Our summary lists: A credential in LIVEKIT_API_KEY; A credential in LIVEKIT_API_SECRET.

Does Building 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 Building Livekit Agents safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Building Livekit Agents use?

Building 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 Building Livekit Agents use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Building Livekit Agents?

Skills that share tags, products or a category with Building Livekit Agents: Reviewing Change (rapidaai/voice-ai, 744 stars), Retellai CI Integration (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Retellai Debug Bundle (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Digital Health Clinical Asr Setup (NVIDIA/skills, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Building 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.