Skip to main content
Use this quickstart to run the LiveKit Agent + SpatialReal Avatar demo quickly. This page focuses on clone-and-run. The frontend is built with AvatarKit UI, and code-level explanation is in a separate Guide page.

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+
  • pnpm
  • uv
  • 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)
1

Clone the repo and enter the quickstart folder

2

Create env files

Fill backend/.env:
backend/.env
Fill frontend/.env:
frontend/.env
3

Install dependencies

4

Run the stack (3 terminals)

Open http://localhost:3000, click Connect, then Enable Mic to start speaking.

Next