Building Livekit Agents logo

Building Livekit Agents

Organization
livekit
building-livekit-agents

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.

Overview

Publisherlivekit
Repositoryagent-skills
Skill namebuilding-livekit-agents
Stars
71
Forks
12
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by livekit on GitHub. Read the source before you install it.

Installation

Install the Building Livekit Agents AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/livekit/agent-skills/tree/main/skills/building-livekit-agents
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/livekit/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/building-livekit-agents .claude/skills/building-livekit-agents
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Building Livekit Agents in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Building Livekit Agents on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Building Livekit Agents is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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.

Related skills

  • 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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Building Livekit Agents AI skill do?

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

Why use Building Livekit Agents on TypingMind?

Because you install it once and use it with any model. Building Livekit Agents is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Building Livekit Agents in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/livekit/agent-skills/tree/main/skills/building-livekit-agents. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Building Livekit Agents?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Building Livekit Agents?

As many as you like. As long as a model supports skills, you can use Building Livekit Agents with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Building Livekit Agents AI skill free?

Yes. It is published on GitHub by livekit under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇