livekit
LiveKit SDKを活用し、WebRTCによるビデオ会議やライブストリーミング、画面共有など、リアルタイムな音声・ビデオアプリケーションを構築するSkill。
📜 元の英語説明(参考)
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 SDKを活用し、WebRTCによるビデオ会議やライブストリーミング、画面共有など、リアルタイムな音声・ビデオアプリケーションを構築するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o livekit.zip https://jpskill.com/download/15077.zip && unzip -o livekit.zip && rm livekit.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15077.zip -OutFile "$d\livekit.zip"; Expand-Archive "$d\livekit.zip" -DestinationPath $d -Force; ri "$d\livekit.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
livekit.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
livekitフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
LiveKit — リアルタイム音声 & ビデオインフラストラクチャ
概要
あなたは、リアルタイム音声およびビデオアプリケーションを構築するためのオープンソースの WebRTC プラットフォームである LiveKit の専門家です。LiveKit のサーバー SDK、クライアント SDK、および AI を活用したリアルタイムインタラクションのための Agents フレームワークを使用して、開発者が音声 AI エージェント、ビデオ会議、ライブストリーミング、および電話統合を構築するのを支援します。
手順
LiveKit Agents フレームワークを使用した音声エージェント
# agent.py — LiveKit Agents を使用した AI 音声エージェント
from livekit.agents import AutoSubscribe, JobContext, WorkerOptions, cli, JobProcess
from livekit.agents.voice_assistant import VoiceAssistant
from livekit.plugins import deepgram, openai, elevenlabs, silero
def prewarm(proc: JobProcess):
"""ワーカーの起動時にモデルを事前ロードして、最初の応答を高速化します。"""
proc.userdata["vad"] = silero.VAD.load()
async def entrypoint(ctx: JobContext):
"""着信音声インタラクションを処理します。
参加者が LiveKit ルームに参加したときに呼び出されます。
完全な STT → LLM → TTS パイプラインをセットアップします。
"""
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
# 参加者(発信者)が参加するのを待ちます
participant = await ctx.wait_for_participant()
assistant = VoiceAssistant(
vad=ctx.proc.userdata["vad"],
stt=deepgram.STT(model="nova-2"),
llm=openai.LLM(model="gpt-4o"),
tts=elevenlabs.TTS(
voice_id="pNInz6obpgDQGcFmaJgB",
model_id="eleven_turbo_v2_5",
),
# 関数呼び出し — エージェントは予約、スケジュールの確認ができます
fnc_ctx=MyFunctions(),
)
assistant.start(ctx.room, participant)
await assistant.say("Hello! How can I help you today?")
if __name__ == "__main__":
cli.run_app(
WorkerOptions(
entrypoint_fnc=entrypoint,
prewarm_fnc=prewarm,
),
)
SIP 電話統合
# livekit-sip.yaml — 電話の通話を LiveKit ルームに接続します
# SIP トランク (Twilio, Telnyx) からの着信通話は AI エージェントにルーティングされます
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}"
# API 経由で SIP トランクとディスパッチルールを作成します
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"],
)
# 着信通話用の SIP トランクを作成します
trunk = await lk.sip.create_sip_inbound_trunk(
api.CreateSIPInboundTrunkRequest(
trunk=api.SIPInboundTrunkInfo(
name="clinic",
numbers=["+15551234567"],
)
)
)
# ディスパッチルールを作成します — 通話をエージェントにルーティングします
await lk.sip.create_sip_dispatch_rule(
api.CreateSIPDispatchRuleRequest(
rule=api.SIPDispatchRule(
dispatch_rule_individual=api.SIPDispatchRuleIndividual(
room_prefix="call-", # 各通話は独自のルームを取得します
pin="", # PIN は不要です
),
),
trunk_ids=[trunk.sip_trunk_id],
)
)
ビデオルーム (Web クライアント)
// ビデオ会議用の React コンポーネント
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>
);
}
// サーバーでアクセストークンを生成します
import { AccessToken } from "livekit-server-sdk";
function createToken(roomName: string, participantName: string): 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 token.toJwt();
}
インストール
# サーバー
docker run -d --name livekit -p 7880:7880 -p 7881:7881 \
livekit/livekit-server --dev
# Python エージェントフレームワーク
pip install livekit-agents livekit-plugins-deepgram livekit-plugins-openai livekit-plugins-elevenlabs livekit-plugins-silero
# JavaScript クライアント
npm install livekit-client @livekit/components-react
# LiveKit Cloud: https://cloud.livekit.io (マネージドホスティング)
例
例 1: ユーザーが livekit のセットアップを依頼する
ユーザー: "私のプロジェクトのために livekit をセットアップするのを手伝ってください"
エージェントは以下を行う必要があります。
- システム要件と前提条件を確認します
- livekit をインストールまたは構成します
- 初期プロジェクト構造をセットアップします
- セットアップが正しく動作することを確認します
例 2: ユーザーが livekit を使用して機能を構築することを依頼する
ユーザー: "livekit を使用してダッシュボードを作成してください"
エージェントは以下を行う必要があります。
- コンポーネントまたは構成をスキャフォールドします
- 適切なデータソースに接続します
- 要求された機能を実装します
- 出力をテストおよび検証します
ガイドライン
- 音声 AI 用のエージェントフレームワーク — 完全な STT→LLM→TTS パイプラインには、VoiceAssistant を備えた
livekit-agentsを使用します。割り込み、ターンテーキング、およびオーディオルーティングを処理します - 電話用の SIP — SIP トランク (Twilio, Telnyx) 経由で電話番号を接続します。LiveKit は WebRTC↔SIP ブリッジを処理します
- Silero VAD — 常に音声アクティビティ検出を含めます。エージェントがバックグラウンドノイズに応答するのを防ぎます
- モデルの事前準備 —
prewarm_fncで VAD およびその他のモデルをロードします。最初の通話でのコールドスタートレイテンシを排除します - 通話ごとのルーム — 各電話/インタラクションに対して一意のルームを作成します。クリーンな分離と簡単なクリーンアップ
- 本番環境向けのクラウド — セルフホスティングの代わりに LiveKit Cloud を使用します。スケーリング、TURN サーバー、およびグローバルエッジノードを処理します
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
LiveKit — Real-Time Voice & Video Infrastructure
Overview
You are an expert in LiveKit, the open-source WebRTC platform for building real-time voice and video applications. You help developers build voice AI agents, video conferencing, live streaming, and telephony integrations using LiveKit's server SDK, client SDKs, and Agents framework for AI-powered real-time interactions.
Instructions
Voice Agent with LiveKit Agents Framework
# agent.py — AI voice agent using LiveKit Agents
from livekit.agents import AutoSubscribe, JobContext, WorkerOptions, cli, JobProcess
from livekit.agents.voice_assistant import VoiceAssistant
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()
async def entrypoint(ctx: JobContext):
"""Handle an incoming voice interaction.
Called when a participant joins a LiveKit room.
Sets up the full STT → LLM → TTS pipeline.
"""
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
# Wait for a participant (the caller) to join
participant = await ctx.wait_for_participant()
assistant = VoiceAssistant(
vad=ctx.proc.userdata["vad"],
stt=deepgram.STT(model="nova-2"),
llm=openai.LLM(model="gpt-4o"),
tts=elevenlabs.TTS(
voice_id="pNInz6obpgDQGcFmaJgB",
model_id="eleven_turbo_v2_5",
),
# Function calling — agent can book appointments, check schedules
fnc_ctx=MyFunctions(),
)
assistant.start(ctx.room, participant)
await assistant.say("Hello! How can I help you today?")
if __name__ == "__main__":
cli.run_app(
WorkerOptions(
entrypoint_fnc=entrypoint,
prewarm_fnc=prewarm,
),
)
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
import { AccessToken } from "livekit-server-sdk";
function createToken(roomName: string, participantName: string): 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 token.toJwt();
}
Installation
# Server
docker run -d --name livekit -p 7880:7880 -p 7881:7881 \
livekit/livekit-server --dev
# Python agent framework
pip install livekit-agents livekit-plugins-deepgram livekit-plugins-openai livekit-plugins-elevenlabs livekit-plugins-silero
# JavaScript client
npm install livekit-client @livekit/components-react
# LiveKit Cloud: https://cloud.livekit.io (managed hosting)
Examples
Example 1: User asks to set up livekit
User: "Help me set up livekit for my project"
The agent should:
- Check system requirements and prerequisites
- Install or configure livekit
- Set up initial project structure
- Verify the setup works correctly
Example 2: User asks to build a feature with livekit
User: "Create a dashboard using livekit"
The agent should:
- Scaffold the component or configuration
- Connect to the appropriate data source
- Implement the requested feature
- Test and validate the output
Guidelines
- Agents framework for voice AI — Use
livekit-agentswith VoiceAssistant for the complete STT→LLM→TTS pipeline; handles interruptions, turn-taking, and audio routing - SIP for telephony — Connect phone numbers via SIP trunks (Twilio, Telnyx); LiveKit handles the WebRTC↔SIP bridge
- Silero VAD — Always include voice activity detection; prevents the agent from responding to background noise
- Prewarm models — Load VAD and other models in
prewarm_fnc; eliminates cold-start latency on first call - Room-per-call — Create a unique room for each phone call/interaction; clean isolation and easy cleanup
- Cloud for production — Use LiveKit Cloud instead of self-hosting; handles scaling, TURN servers, and global edge nodes
- Function calling — Give your agent tools via
fnc_ctx; the LLM decides when to call APIs during conversation - Interruption handling — LiveKit agents handle barge-in natively; the caller can interrupt the AI mid-sentence