livekit
БесплатноБез исполняемых скриптовНе проверенBuild real-time audio and video applications with LiveKit. Use when a user asks to implement WebRTC rooms, video conferencing, live streaming, screen sharing…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
LiveKit — Real-Time Voice & Video Infrastructure
Overview
LiveKit is an open-source WebRTC platform for real-time voice and video: a self-hostable SFU server, client SDKs for web/mobile, server SDKs for room and token management, SIP telephony bridging, and the Agents framework for building voice AI. Checked against livekit-agents 1.8.4, livekit-server-sdk (Node) 2.19.1 and livekit-client 2.22.3 (October 2026).
Breaking change since the 1.0 Agents release: livekit.agents.voice_assistant.VoiceAssistant and fnc_ctx are gone. Voice agents are now built from an Agent (instructions + tools) run inside an AgentSession (STT/LLM/TTS/VAD pipeline), started with session.start(...).
Instructions
Voice Agent with LiveKit Agents Framework
# agent.py — AI voice agent using LiveKit Agents 1.x
from livekit.agents import Agent, AgentSession, JobContext, JobProcess, WorkerOptions, cli, function_tool
from livekit.plugins import deepgram, openai, elevenlabs, silero
def prewarm(proc: JobProcess):
"""Pre-load models at worker startup for faster first response."""
proc.userdata["vad"] = silero.VAD.load()
class ClinicAssistant(Agent):
def __init__(self) -> None:
super().__init__(
instructions="You are a friendly scheduling assistant for a dental clinic. "
"Confirm the patient's name and desired date before booking.",
)
@function_tool
async def book_appointment(self, patient_name: str, date_iso: str) -> str:
"""Book an appointment for the patient on the given ISO date."""
return f"Booked {patient_name} for {date_iso}."
async def entrypoint(ctx: JobContext):
"""Called when a participant joins a LiveKit room."""
await ctx.connect()
session = AgentSession(
vad=ctx.proc.userdata["vad"],
stt=deepgram.STT(model="nova-3"),
llm=openai.LLM(model="gpt-4o"),
tts=elevenlabs.TTS(
voice_id="pNInz6obpgDQGcFmaJgB",
model="eleven_turbo_v2_5",
),
)
await session.start(agent=ClinicAssistant(), room=ctx.room)
await session.generate_reply(instructions="Greet the caller and ask how you can help.")
if __name__ == "__main__":
cli.run_app(
WorkerOptions(
entrypoint_fnc=entrypoint,
prewarm_fnc=prewarm,
),
)
Run it locally with python agent.py console (talk to it in the terminal, no LiveKit room needed) or python agent.py dev (connects to a real room, hot-reloads on save).
SIP Telephony Integration
# livekit-sip.yaml — Connect phone calls to LiveKit rooms
# Incoming calls from a SIP trunk (Twilio, Telnyx) route to AI agent
apiVersion: livekit.io/v1
kind: SIPTrunk
metadata:
name: clinic-inbound
spec:
inbound:
numbers: ["+15551234567"]
allowed_addresses: ["*.pstn.twilio.com"]
auth_username: "livekit"
auth_password: "${SIP_PASSWORD}"
rules:
- rule: ".*"
room_name: "clinic-agent-room"
participant_identity: "caller-${phone}"
# Create SIP trunk and dispatch rules via API
from livekit import api
lk = api.LiveKitAPI(
url=os.environ["LIVEKIT_URL"],
api_key=os.environ["LIVEKIT_API_KEY"],
api_secret=os.environ["LIVEKIT_API_SECRET"],
)
# Create SIP trunk for inbound calls
trunk = await lk.sip.create_sip_inbound_trunk(
api.CreateSIPInboundTrunkRequest(
trunk=api.SIPInboundTrunkInfo(
name="clinic",
numbers=["+15551234567"],
)
)
)
# Create dispatch rule — route calls to agent
await lk.sip.create_sip_dispatch_rule(
api.CreateSIPDispatchRuleRequest(
rule=api.SIPDispatchRule(
dispatch_rule_individual=api.SIPDispatchRuleIndividual(
room_prefix="call-", # Each call gets its own room
pin="", # No PIN required
),
),
trunk_ids=[trunk.sip_trunk_id],
)
)
Video Room (Web Client)
// React component for video conferencing
import { LiveKitRoom, VideoConference, RoomAudioRenderer } from "@livekit/components-react";
import "@livekit/components-styles";
function MeetingRoom({ token, serverUrl }: { token: string; serverUrl: string }) {
return (
<LiveKitRoom
token={token}
serverUrl={serverUrl}
connect={true}
audio={true}
video={true}
>
<VideoConference />
<RoomAudioRenderer />
</LiveKitRoom>
);
}
// Generate access token on server — AccessToken.toJwt() is async as of livekit-server-sdk v2
import { AccessToken } from "livekit-server-sdk";
async function createToken(roomName: string, participantName: string): Promise<string> {
const token = new AccessToken(
process.env.LIVEKIT_API_KEY,
process.env.LIVEKIT_API_SECRET,
{ identity: participantName }
);
token.addGrant({
roomJoin: true,
room: roomName,
canPublish: true,
canSubscribe: true,
});
return await
Установить livekit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл livekit?
Build real-time audio and video applications with LiveKit. Use when a user asks to implement WebRTC rooms, video conferencing, live streaming, screen sharing, or real-time communication using the LiveKit SDK.
Как установить скилл livekit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл livekit запускает скрипты?
Нет, скилл состоит только из инструкций (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