Skip to content

Repository files navigation

The LiveKit icon, the name of the repository and some sample code in the background.

LiveKit Node SDKs

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

Monorepo Navigation



Development Setup

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.

Setup Monorepo

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 install

In order to link up initial dependencies and check whether everything has installed correctly run

pnpm build

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

Setup Submodules

Run the following command to install the submodules.

git submodule update --init --recursive

Then run pnpm build to make sure everything is up to date.


LiveKit Ecosystem
Agents SDKsPython · Node.js
LiveKit SDKsBrowser · Swift · Android · Flutter · React Native · Rust · Node.js · Python · Unity · Unity (WebGL) · ESP32 · C++
Starter AppsPython Agent · TypeScript Agent · React App · SwiftUI App · Android App · Flutter App · React Native App · Web Embed
UI ComponentsReact · Android Compose · SwiftUI · Flutter
Server APIsNode.js · Golang · Ruby · Java/Kotlin · Python · Rust · PHP (community) · .NET (community)
ResourcesDocs · Docs MCP Server · CLI · LiveKit Cloud
LiveKit Server OSSLiveKit server · Egress · Ingress · SIP
CommunityDeveloper Community · Slack · X · YouTube

About

LiveKit realtime and server SDKs for Node.JS

Topics

Resources

Stars

284 stars

Watchers

13 watching

Forks

Releases

Packages

Used by

Contributors

Languages