Skip to content

HieuDevs/python-agents-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 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.

Set Up & Installation

To use these examples, first clone the repository and then install the required dependencies:

git clone https://github.com/livekit-examples/python-agents-examples.git
cd python-agents-examples

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

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

About

Example applications and code snippets for LiveKit Agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.0%
  • TypeScript 9.4%
  • HTML 1.3%
  • Other 0.3%