livekit/agents-js

Build realtime multimodal AI agents with Node.js

What it solves

This framework enables developers to build real-time, multi-modal voice agents that can see, hear, and interact with users. It solves the complexity of managing live audio/video streams, turn-taking, and integrating various AI models into a cohesive, production-ready conversational experience.

How it works

The framework acts as a bridge between your application and a LiveKit server. It uses a worker-based architecture where your agent waits for job requests from the server. Once a user joins a session, the worker manages the agent as a participant in the room, orchestrating the flow of data between speech-to-text (STT), large language models (LLM), and text-to-speech (TTS) services. It includes built-in tools for semantic turn detection to ensure natural conversations and supports MCP for easy tool integration.

Who it’s for

This is for Node.js developers who want to build interactive voice AI applications that require low-latency, real-time communication. It is ideal for those who need a flexible, open-source stack that can be self-hosted and customized with a wide range of AI model providers.

Highlights

  • Flexible Ecosystem: Mix and match various STT, LLM, and TTS providers to suit specific needs.
  • Semantic Turn Detection: Uses transformer models to accurately detect when a user has finished speaking, reducing awkward interruptions.
  • Production-Ready: Includes graceful shutdown handling to ensure ongoing sessions are not interrupted during deployments.
  • Native MCP Support: Integrate external tools and data sources with minimal configuration.
  • Multi-Modal Capabilities: Supports voice, text, and even avatar-based interactions through various plugins.

Related

  • Project
  • Project
  • Project
  • Project