Skip to content

Files

Latest commit

7f43362 · Apr 17, 2025

History

History
285 lines (247 loc) · 7.8 KB

README.md

File metadata and controls

285 lines (247 loc) · 7.8 KB

LiveKit Agents Examples

LiveKit Logo
Static Badge Static Badge

Example applications and code snippets for LiveKit Agents

This repository contains example code and demo applications for LiveKit Agents, a suite of tools for building, deploying, and scaling real-time voice and video AI agents.

LiveKit Agents

LiveKit Agents is a Python library that enables you to build intelligent conversational agents with speech, text, and media capabilities. This repository contains examples that demonstrate how to use various features of the library.

Installation

To use these examples, first install the LiveKit Agents library:

pip install livekit-agents

Key Features of LiveKit Agents

  • 🗣️ Speech and Voice Processing - Built-in STT, TTS, and VAD capabilities for natural conversations.
  • 💬 Comprehensive LLM Support - Integrate with OpenAI, Anthropic, Google, and more.
  • 📞 Telephony Integration - Make and receive SIP calls with your agents.
  • 📊 Metrics and Monitoring - Track and analyze agent performance.
  • 🔄 Real-time Processing - Stream audio, text, and video in real-time.
  • 📱 Multi-modal Capabilities - Handle text, audio, and video simultaneously.
  • 🌐 Multilingual Support - Transcribe and respond in multiple languages.
  • 🧩 Extensible Plugin System - Add custom capabilities to your agents.

Official Documentation

For full documentation of LiveKit Agents, visit https://docs.livekit.io/agents/

Example Demos

🎙️ Listen and Respond

Basic agent that listens for user input and provides a response.

Code

🔄 Uninterruptable

An agent that continues speaking without being interrupted.

Code

🏥 Medical Office Triage

Agent that triages patients based on symptoms and medical history.

Code

🛍️ Personal Shopper

AI shopping assistant that helps find products based on user preferences.

Code

☎️ Phone Caller

Agent that can make outbound phone calls and handle conversations.

Code

🌐 Change Language

Agent that can switch between different languages during conversation.

Code

🔄 TTS Comparison

Compare different text-to-speech providers side by side.

Code

📞 SIP Warm Handoff

Transfer calls from an AI agent to a human operator seamlessly.

Code

📝 Transcriber

Real-time speech transcription with high accuracy.

Code

🗣️ Realtime OpenAI

Integrate with OpenAI's streaming API for natural conversations.

Code

🔤 Keyword Detection

Detect specific keywords in speech in real-time.

Code

🎮 Function Calling

Implement function calling capabilities in your agents.

Code

📞 SIP Lifecycle

Complete lifecycle management for SIP calls.

Code

🔄 Context Variables

Maintain conversation context across interactions.

Code

🔊 Playing Audio

Play audio files during agent interactions.

Code

🎙️ Sound Repeater

Simple sound repeating demo for testing audio pipelines.

Code

📱 Raspberry Pi Transcriber

Run transcription on Raspberry Pi hardware.

Code

📞 Answer Incoming Calls

Set up an agent to answer incoming SIP calls.

Code

🤖 Vision Agent 👀

An AI-powered assistant that can answer questions about what it sees.

Code

🔍 RAG-Enriched Agent

An agent that can answer questions about the LiveKit docs site.

Code

Code Examples by Category

Basic Features

LLM Integrations

TTS Integrations

STT and Voice Processing

Realtime Processing

Advanced LLM Features

Translation Features

Telephony

Metrics and Monitoring

Hardware Integration

Vision Agents

Complex Demo Agents