How livekit-examples/agent-starter-python works
This repository is a Python LiveKit voice-assistant starter. A user connects through a frontend or telephony client to a LiveKit room; the registered agent handler starts a session, which combines speech recognition, turn handling, an LLM, and speech synthesis. The starter also configures expressive speech, keyterm-aware recognition, and background noise cancellation. README-documented observability is included; implementation details beyond the sampled agent file are not inferred.
Main entry points: agent.py Agent session
Components 12
Connection
- LiveKit room
- Agent handler
src/agent.py
Conversation
- Agent session
src/agent.py - Assistant behavior
src/agent.py - Turn handling
src/agent.py - Language model
src/agent.py - Agent observability
Audio processing
- Speech recognition
src/agent.py - Speech synthesis
src/agent.py - Noise cancellation
src/agent.py
Other components
- Voice user
- Frontend or phone
Connections 12
- Voice user → Frontend or phone: speaks to
README.md - Frontend or phone → LiveKit room: connects through
README.md - LiveKit room → Agent handler: dispatches session
src/agent.py - Agent handler → Agent session: starts
src/agent.py - Agent handler → LiveKit room: connects room
src/agent.py - Agent session → Assistant behavior: starts with
src/agent.py - Assistant behavior → Language model: configures
src/agent.py - Agent session → Speech recognition: configures
src/agent.py - Agent session → Turn handling: configures
src/agent.py - Agent session → Speech synthesis: configures
src/agent.py - Agent session → Noise cancellation: enhances audio
src/agent.py - Agent session → Agent observability: records traces
README.md