GitHub Repository
Source code for this quickstart.
Code Walkthrough
Backend and frontend architecture walkthrough.
How LiveKit + SpatialReal Work Together
In this architecture, each system has a clear responsibility:- LiveKit handles room lifecycle, client/worker connectivity, microphone transport, and agent dispatch.
- SpatialReal takes agent response audio, generates lip-sync + avatar animation, and publishes avatar output back into the room.
- Frontend only needs to join LiveKit and render with AvatarKit UI
Prerequisites
- Node.js 18+
- Python 3.10+
pnpmuv- SpatialReal credentials (
SPATIALREAL_API_KEY,SPATIALREAL_APP_ID,SPATIALREAL_AVATAR_ID) - LiveKit credentials (
LIVEKIT_URL,LIVEKIT_API_KEY,LIVEKIT_API_SECRET) - Gemini key (
GOOGLE_API_KEY)
Next
- Want to understand the backend dispatch flow and AvatarKit UI frontend logic? See Agent Quickstart Walkthrough.

