End-to-end realtime stack for connecting humans and AI https://docs.livekit.io
  • Go 99.8%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Chen a390d03d28
Adding metrics for frame metadata use (#4687)
* adding observability metrics for frame metadata usage

* remove else if

* revert log additions

* revert

* rename for consistency

* remove redundant metrics

* add total track w/ packet trailer metric
2026-10-21 15:58:36 -07:00
.github chore(deps): update github workflows (#5024) 2026-10-18 21:28:02 -07:00
.oss-scanner Add OSS Scanner build image and threat model (#4995) 2026-10-12 14:33:39 -07:00
cmd fix: build with Go 1.27.3 (eMudhra intermediate CA compromise) (#5034) 2026-10-20 13:37:00 -07:00
deploy Stats collect v2 (#1291) 2023-01-11 14:49:50 -07:00
pkg Adding metrics for frame metadata use (#4687) 2026-10-21 15:58:36 -07:00
test Use constant data channel ids in proto (#5029) 2026-10-19 19:41:05 +08:00
version Release v1.13.10. (#5001) 2026-10-14 12:47:27 +05:30
.gitignore Correctly ignore .idea directory (#1686) 2023-05-05 22:40:12 -07:00
.golangci.yml update protocol for protojson (#4510) 2026-05-07 00:55:00 -07:00
.goreleaser.yaml fix goreleaser workflow, version 1.13.1 (#4577) 2026-06-08 16:15:09 -07:00
bootstrap.sh Replace /bin/bash with env call (#2409) 2024-01-25 15:49:36 -08:00
CHANGELOG.md Release v1.13.10. (#5001) 2026-10-14 12:47:27 +05:30
config-sample.yaml Support file-backed username/credential for external TURN servers (#4784) 2026-10-19 16:00:00 +08:00
Dockerfile fix: build with Go 1.27.3 (eMudhra intermediate CA compromise) (#5034) 2026-10-20 13:37:00 -07:00
go.mod pion/webrtc deps for multi codec negotiation when media engine copy is disabled (#5038) 2026-10-21 22:56:30 +05:30
go.sum pion/webrtc deps for multi codec negotiation when media engine copy is disabled (#5038) 2026-10-21 22:56:30 +05:30
install-livekit.sh feat: make INSTALL_PATH overridable in install script (#3954) 2026-02-26 14:43:30 -08:00
LICENSE update license & readme 2021-06-03 23:22:19 -07:00
magefile.go Update renovate and pinning behavior, run tools from go.mod (#4759) 2026-08-17 09:25:02 -07:00
magefile_unix.go Adding license notices (#1913) 2023-07-27 16:43:19 -07:00
magefile_windows.go Adding license notices (#1913) 2023-07-27 16:43:19 -07:00
NOTICE Adding license notices (#1913) 2023-07-27 16:43:19 -07:00
README.md README rewrite (#4837) 2026-09-08 15:48:01 -04:00
renovate.json Track action versions and stop quarantining our own actions (#4877) 2026-09-16 20:45:20 -07:00

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

LiveKit: Realtime infrastructure for voice, video, and AI agents

LiveKit is an open source platform for building voice, video, and physical AI agents. This repository is the LiveKit server: a scalable, distributed WebRTC SFU that moves realtime audio, video, and data between people, devices, and AI models. The SDKs, agents frameworks, and companion services are linked in the table at the bottom of this page.

LiveKit's server is written in Go, using the awesome Pion WebRTC implementation.

GitHub stars Slack community Twitter Follow Ask DeepWiki GitHub release (latest SemVer) GitHub Workflow Status License

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.

Used in production by

LiveKit carries billions of calls a year for companies including Salesforce, Nvidia, Oracle, SAP, Deutsche Telekom, Spotify, Tinder, Coursera, Headspace, Skydio, Retell, Decagon, Cresta, and HeyGen. Read how Assort Health, Playback, and Polymath Robotics use it, or see more customers.

Features

Documentation & Guides

https://docs.livekit.io

Working with a coding agent? Give it the LiveKit Docs MCP server, or start with the coding agents guide.

Live Demos

Install

Tip

We recommend installing LiveKit CLI along with the server. It lets you access server APIs, create tokens, generate test traffic, and scaffold and deploy agents.

The following will install LiveKit's media server:

MacOS

brew install livekit

Linux

curl -sSL https://get.livekit.io | bash

Windows

Download the latest release here

Getting Started

Starting LiveKit

Start LiveKit in development mode by running livekit-server --dev. It'll use a placeholder API key/secret pair.

API Key: devkey
API Secret: secret

To customize your setup for production, refer to our deployment docs

Creating access token

A user connecting to a LiveKit room requires an access token. Access tokens (JWT) encode the user's identity and the room permissions they've been granted. You can generate a token with our CLI:

lk token create \
    --api-key devkey --api-secret secret \
    --join --room my-first-room --identity user1 \
    --valid-for 24h

Test with example app

Head over to our example app and enter a generated token to connect to your LiveKit server.

Once connected, your video and audio are now being published to your new LiveKit instance!

Simulating a test publisher

lk room join \
    --url ws://localhost:7880 \
    --api-key devkey --api-secret secret \
    --identity bot-user1 \
    --publish-demo \
    my-first-room

This command publishes a looped demo video to a room. Due to how the video clip was encoded (keyframes every 3s), there's a slight delay before the browser has sufficient data to begin rendering frames. This is an artifact of the simulation.

Adding an agent

Agents join rooms as participants, the same way a browser or a phone does. Follow the Voice AI quickstart to build one. An agent connects to a self-hosted server the same way it connects to LiveKit Cloud; when running without Cloud, use model plugins in place of LiveKit Inference.

Deployment

Use LiveKit Cloud

LiveKit Cloud is the fastest and most reliable way to run LiveKit. It runs in 19+ regions with 99.99% uptime and adds agent hosting, model inference, telephony, and observability on top of the server. The Build plan is free, with no credit card required.

Sign up for LiveKit Cloud.

Self-host

Read our deployment docs for more information. Official Docker images and Helm charts are available.

Building from source

Pre-requisites:

  • Go 1.26+ is installed
  • GOPATH/bin is in your PATH

Then run

git clone https://github.com/livekit/livekit
cd livekit
./bootstrap.sh
mage

Contributing

We welcome your contributions toward improving LiveKit! Please join us on Slack or in the Developer Community to discuss your ideas and/or PRs.

License

LiveKit server is licensed under Apache License v2.0.


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