Prerequisites
- A Protoface API key from app.protoface.com, covered in Authentication.
- A LiveKit project with
LIVEKIT_URL,LIVEKIT_API_KEY, andLIVEKIT_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
Createagent.py:
4. Run the agent
Expected result
- A
protoface-avatar-agentparticipant joins the same LiveKit room. - The avatar publishes audio and video.
avatar.session_idcontains thesess_...ID, which moves throughqueued,starting, andrunningbefore 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.

