This guide covers the server side of LiveKit Agents Integration. Your LiveKit Agents worker usesDocumentation Index
Fetch the complete documentation index at: https://docs.spatius.ai/llms.txt
Use this file to discover all available pages before exploring further.
livekit-plugins-spatius to send avatar speech audio to Spatius and receive Spatius-published audio and motion data in the LiveKit room.
Using the LiveKit Agents framework
If you already use LiveKit Agents to build your voice agent, add livekit-plugins-spatius. The package hooks into your agent pipeline and sends TTS audio to Spatius; Motion Server publishes the lip-synced audio and motion stream into your LiveKit room. For a working end-to-end reference, see AvatarKit Voice Agent Demo.How it works
- Your agent runs as usual (VAD, STT, LLM, TTS or Realtime), your current AgentSession setup.
livekit-plugins-spatiusintercepts TTS audio from the agent and sends it to Spatius.- Motion Server generates motion data from the agent audio and publishes the synchronized audio + motion stream to the same LiveKit room.
- Your client joins the room and uses the Spatius RTC client to render the avatar.
livekit-plugins-spatius.
livekit-plugins-spatius
Installlivekit-plugins-spatius tracks specific livekit-agents releases. Pin both in your pyproject.toml together — letting your resolver pull the newest livekit-agents independently can drift past what the plugin supports and break AgentSession construction at runtime. The quickstart demo shows the currently aligned pair.| Variable | Required | Description |
|---|---|---|
SPATIUS_API_KEY | Yes | Your Spatius API key |
SPATIUS_APP_ID | Yes | Your Spatius app ID |
SPATIUS_AVATAR_ID | Yes | Avatar to use |
SPATIUS_REGION | No | Region used to compose endpoints. Defaults to us-west |
LIVEKIT_URL | Yes | Your LiveKit server URL |
LIVEKIT_API_KEY | Yes | LiveKit API key |
LIVEKIT_API_SECRET | Yes | LiveKit API secret |
Advanced: endpoint overrides
Advanced: endpoint overrides
For normal production use, set only
SPATIUS_REGION=us-west and the plugin composes the endpoints automatically. Set these only when proxying or testing against a staging environment.| Variable | Description |
|---|---|
SPATIUS_CONSOLE_ENDPOINT | Override Console API URL (default: https://console.<region>.spatius.ai/v1/console) |
SPATIUS_INGRESS_ENDPOINT | Override ingress WebSocket URL (default: wss://api.<region>.spatius.ai/v2/driveningress) |
AvatarSession and start it with your agent session and room. livekit-plugins-spatius attaches to the pipeline and sends avatar speech audio to Spatius; Motion Server publishes the avatar’s audio and motion stream to the room.