Use this SDK to add realtime video, audio and data features to your Node app. By connecting to LiveKit Cloud or a self-hosted server, you can quickly build applications such as multi-modal AI, live streaming, or video calls with just a few lines of code.
Important
If you're building Voice AI, LiveKit Agents is the SDK for code-first realtime voice agents. STT, LLM, TTS, turn detection, expressive speech, keyterm accuracy, tool usage, and telephony all come bundled in the framework. It's available in both Python and Node.js.
# agent.py
from livekit import agents
from livekit.agents import Agent, AgentServer, AgentSession, STTContextOptions, TurnHandlingOptions, inference
server = AgentServer()
@server.rtc_session(agent_name="my-agent")
async def my_agent(ctx: agents.JobContext):
session = AgentSession(
stt=inference.STT(model="deepgram/nova-3", language="multi"),
llm=inference.LLM(model="google/gemma-4-31b-it"),
tts=inference.TTS(model="inworld/inworld-tts-2", voice="Ashley"),
turn_handling=TurnHandlingOptions(turn_detection=inference.TurnDetector()),
stt_context_options=STTContextOptions(keyterms=["LiveKit", "Acme Corp"]),
expressive=True,
)
await session.start(room=ctx.room, agent=Agent(instructions="You are a helpful voice AI assistant."))
await session.generate_reply(instructions="Greet the user and offer your assistance.")
if __name__ == "__main__":
agents.cli.run_app(server)Models come from LiveKit Inference with no per-provider API keys, and LiveKit Cloud handles deployment and observability. Visit the docs for more info at docs.livekit.io/agents.
Using a coding agent? Install the LiveKit skill with npx skills add livekit/agent-skills and add the docs MCP at https://docs.livekit.io/mcp/ (see coding agent support).
- Packages:
- Server SDK - to interact with server APIs.
- Node realtime SDK - to connect to LiveKit as a server-side participant, and to publish and subscribe to audio, video, and data.
- Examples
If you are interested in contributing to the project or running the examples that are part of this mono-repository, then you must first set up your development environment.
This repo consists of multiple packages that partly build on top of each other. It relies on pnpm workspaces and Turborepo (which gets installed automatically).
Clone the repo and run pnpm install the root level:
pnpm installIn order to link up initial dependencies and check whether everything has installed correctly run
pnpm buildThis will build all the packages in /packages and the examples in /examples once.
After that you can use a more granular command to only rebuild the packages you are working on.
Run the following command to install the submodules.
git submodule update --init --recursiveThen run pnpm build to make sure everything is up to date.
| LiveKit Ecosystem | |
|---|---|
| Agents SDKs | Python · Node.js |
| LiveKit SDKs | Browser · Swift · Android · Flutter · React Native · Rust · Node.js · Python · Unity · Unity (WebGL) · ESP32 · C++ |
| Starter Apps | Python Agent · TypeScript Agent · React App · SwiftUI App · Android App · Flutter App · React Native App · Web Embed |
| UI Components | React · Android Compose · SwiftUI · Flutter |
| Server APIs | Node.js · Golang · Ruby · Java/Kotlin · Python · Rust · PHP (community) · .NET (community) |
| Resources | Docs · Docs MCP Server · CLI · LiveKit Cloud |
| LiveKit Server OSS | LiveKit server · Egress · Ingress · SIP |
| Community | Developer Community · Slack · X · YouTube |