LiveKit Agents Integration is a Platform Integration. Use it when your voice agent runs in LiveKit Agents and you wantDocumentation 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 connect that agent worker to Motion Server. The package attaches to your agent and pipes agent audio to Motion Server; Motion Server publishes lip-synced audio and motion data back into the same LiveKit room.
LiveKit Agents is the platform integration; the RTC Adapter (@spatius/avatarkit-rtc) is the Web client adapter that renders the avatar stream from the LiveKit room. The LiveKit room itself is the transport.
Web Only: The current AvatarKit RTC client demo path targets Web. LiveKit ships iOS and Android client SDKs, but Spatius does not yet provide iOS or Android demos for this path.
Architecture
- LiveKit room handles transport.
- Agent worker runs your voice agent with
livekit-plugins-spatiusattached. - Motion Server generates motion data from the agent audio and publishes the synchronized audio + motion stream back into the room.
- AvatarKit RTC client joins the room and renders the avatar.
@spatius/avatarkit renders the avatar locally in the browser.
Frontend installation
- pnpm
- npm
- yarn
- bun
Frontend setup
Toolchain setup
Configure your build tool to load the AvatarKit WebAssembly assets. See Toolchain Setup.
Pick a UI path
- For drop-in React components, use AvatarKit UI.
- To own the UI and connection flow yourself, use the JavaScript API below.
JavaScript API (custom UI)
Step-by-step JS API setup
Step-by-step JS API setup
LiveKit Agents plugin installation
- pip
- uv
Server setup
If you already use LiveKit Agents, addlivekit-plugins-spatius to your agent worker. The package attaches to your AgentSession and pipes TTS audio to Spatius; Motion Server publishes the resulting audio and motion data to the same LiveKit room.
Required environment variables:
- Spatius:
SPATIUS_API_KEY,SPATIUS_APP_ID,SPATIUS_AVATAR_ID - Optional region:
SPATIUS_REGIONdefaults tous-west - LiveKit:
LIVEKIT_URL,LIVEKIT_API_KEY,LIVEKIT_API_SECRET
AvatarSession and start it with your agent session and room:
livekit-plugins-spatius flow, interruption behavior, and API links.
Next steps
Server
Add
livekit-plugins-spatius to your LiveKit Agents worker.Client
Render the avatar in your Web app with
@spatius/avatarkit-rtc.