Skip to content

livekit-examples/python-agents-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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