Skip to main content
Protoface Realtime turns an agent’s audio into live avatar video. This sample uses Gemini Live, and the same avatar flow applies to agents built from separate STT, LLM, and TTS components. For more examples you can clone and run, see the quickstart repo.

Prerequisites

  • A Protoface API key from app.protoface.com, covered in Authentication.
  • A LiveKit project with LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET.
  • A Google Gemini API key for the sample realtime model, set as GOOGLE_API_KEY.

1. Install

2. Set environment variables

Create a .env file:

3. Add the avatar

Create agent.py:

4. Run the agent

Open Agents Playground, connect to your LiveKit project, join the room, and talk to the agent.

Expected result

  • A protoface-avatar-agent participant joins the same LiveKit room.
  • The avatar publishes audio and video.
  • avatar.session_id contains the sess_... ID, which moves through queued, starting, and running before the first frame.
  • The session ends when the agent stops, or on await avatar.aclose().

Troubleshooting

LiveKit Agents covers plugin options, the session lifecycle, and the REST endpoints underneath. Avatars shows how to replace the stock avatar with your own.