22,127
stars
+106+135
2,553
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
README
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.
[!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.
python
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
- Scalable, distributed WebRTC SFU (Selective Forwarding Unit)
- People, devices, and AI agents join the same room as participants, with
agent dispatch to route agents in automatically or on demand
- Modern, full-featured SDKs for web, mobile, desktop, embedded, and server
- Built for production, supports JWT authentication
- Robust networking and connectivity, UDP/TCP/TURN
- Easy to deploy: single binary, Docker or Kubernetes
- Advanced features including:
- speaker detection
- simulcast
- selective subscription
- moderation APIs
- end-to-end encryption
- SVC codecs (VP9, AV1)
- data tracks for low-latency telemetry and teleoperation
- telephony over SIP
-