Overview
The LiveKit AgentHuman plugin provides seamless integration between AgentHuman talking avatars and LiveKit’s real-time communication platform. Add lifelike AI avatars to your LiveKit rooms with just a few lines of code. Perfect for:- Video conferencing applications
- Real-time collaboration tools
- Live streaming platforms
- Interactive webinars
Installation
Quick Start
- ✅ AgentHuman session creation
- ✅ WebSocket connection and authentication
- ✅ Audio track processing and format conversion
- ✅ Room participant management
- ✅ Automatic avatar video streaming
Configuration Options
Plugin Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your AgentHuman API key |
avatarId | string | Yes | Avatar ID to use |
displayName | string | No | Avatar display name in room (default: 'AI Avatar (AH)') |
videoWidth | number | No | Video width in pixels (default: 1280) |
videoHeight | number | No | Video height in pixels (default: 720) |
aspectRatio | string | No | Video aspect ratio: '16:9', '9:16', '1:1' (default: '16:9') |
autoConnect | boolean | No | Auto-connect on room join (default: true) |
Complete Examples
Python Example
TypeScript/React Example
Plugin Features
Automatic Audio Processing
The plugin automatically:- Listens to audio tracks in the room
- Converts audio to required format (16-bit mono PCM)
- Sends audio to AgentHuman WebSocket
- Avatar generates video
- Video appears in LiveKit room
Event Handling
Manual Control
Room Configuration
Server-Side Room Creation
Client-Side Connection
Best Practices
1. Plugin Lifecycle Management
2. Error Handling
3. Multiple Avatars
Troubleshooting
Plugin Not Connecting
Cause: Invalid API credentials or LiveKit connection issues Solution:Avatar Not Appearing in Room
Cause: Plugin not initialized or room permissions issue Solution:- Check LiveKit room has capacity
- Verify avatar participant permissions
- Wait 2-3 seconds for avatar to join
Audio Not Processing
Cause: Audio track not subscribed or format issues Solution:Resources
- GitHub Repository: github.com/agenthuman/livekit-agenthuman
- Example Projects: github.com/agenthuman/livekit-examples
- LiveKit Docs: docs.livekit.io
- API Reference: Making Avatars Talk
Support
Need help with LiveKit integration?- Email: [email protected]
- Discord: discord.gg/agenthuman
- GitHub Issues: github.com/agenthuman/livekit-agenthuman/issues