Skip to main content
Test your LiveKit-powered voice agents by connecting them to UserTrace. Our simulated users will interact with your LiveKit-based agents through WebRTC connections for real-time voice conversations.

Getting Started

1. Connect Your LiveKit Agent

In the UserTrace dashboard, navigate to Agent Setup and select LiveKit Integration. Required Information:
  • LiveKit Server URL (WSS endpoint)
  • API Key and Secret
  • Room name or agent identifier
Example:

2. Set Evaluation Context

Define your pass and fail criteria for voice interactions: Example Pass/Fail Criteria:

Testing Process

Real-Time Voice Testing

LiveKit testing follows a WebRTC-based approach:
  1. UserTrace connects to your LiveKit room
  2. WebRTC connection is established with your agent
  3. Real-time audio streams are initiated
  4. Simulated user interacts based on scenario
  5. Conversation quality and agent responses are monitored
  6. Results are analyzed including technical metrics
Connection Flow:
  1. Room Join: UserTrace joins specified LiveKit room
  2. Agent Discovery: Identifies your voice agent participant
  3. Audio Setup: Establishes bidirectional audio streams
  4. Conversation Start: Begins scenario-based interaction
  5. Quality Monitoring: Tracks audio quality and latency
  6. Natural Completion: Ends when scenario objectives are met

LiveKit-Specific Features

Real-Time Infrastructure

WebRTC Quality:
  • Ultra-low latency voice communication
  • Adaptive bitrate for varying network conditions
  • Echo cancellation and noise suppression
  • Network resilience and recovery
Room Management:
  • Multi-participant support
  • Dynamic participant joining/leaving
  • Room metadata and configuration
  • Custom room layouts and settings

Agent Architecture

Server-Side Agents:
  • Python/Node.js agent implementations
  • Real-time audio processing
  • AI model integration
  • Custom business logic
Client-Side Integrations:
  • Web browser compatibility
  • Mobile app support
  • Desktop application integration
  • Custom client implementations

Best Practices

Performance

Real-Time Optimization• Target < 200ms end-to-end latency • Use LiveKit’s adaptive streaming • Optimize AI model inference time • Monitor connection quality metrics

Reliability

Connection Stability• Implement reconnection logic • Handle network interruptions • Use LiveKit’s connection events • Monitor participant status

Implementation Examples

Server Agent Setup

Python Agent Example:
Room Configuration:

Authentication

Token Generation:

Common Scenarios

Interactive Voice Assistants:
  • Personal assistant interactions
  • Smart home control
  • Task management
  • Information retrieval
Customer Support:
  • Real-time help desk
  • Technical troubleshooting
  • Product information
  • Issue resolution
Collaborative Applications:
  • Team meetings with AI participants
  • Educational tutoring sessions
  • Brainstorming facilitation
  • Multi-user voice experiences

Advanced Features

AI Integration

Speech-to-Text:
  • Real-time transcription
  • Multiple language support
  • Custom vocabulary
  • Confidence scoring
Text-to-Speech:
  • Natural voice synthesis
  • Voice cloning capabilities
  • Emotion and tone control
  • Multi-speaker support
LLM Integration:
  • Streaming AI responses
  • Context preservation
  • Function calling
  • Multi-modal processing

Quality Monitoring

Audio Metrics:

Troubleshooting

Common Issues: Connection Problems:
  • WebRTC connection fails: Check firewall settings and TURN servers
  • Audio not flowing: Verify microphone permissions and audio tracks
  • High latency: Optimize server location and network routing
  • Frequent disconnections: Monitor network stability and implement reconnection
Agent Issues:
  • Agent not responding: Check LiveKit agent deployment and logs
  • Poor audio quality: Verify audio processing pipeline and network bandwidth
  • Delayed responses: Optimize AI model inference and processing time
  • Memory leaks: Monitor resource usage in long-running sessions

Development Setup

Local Testing

Docker Setup:
Configuration File:
Need help with LiveKit integration? Check the LiveKit documentation or contact support@getusertrace.com.