Skip to main content
Give a face to your LiveKit agents with TruGen Avatars, using our official LiveKit Agents plugin.
1

Install the plugin

Install the TruGen plugin from the LiveKit registry:
2

Generate an API key

  1. Using the TruGen Developer Platform, generate an API key from the developers page.
  2. Set the newly generated API key as TRUGEN_API_KEY environment variable in your .env file.
3

Add Avatar session to your LiveKit Agent

  1. Import the trugen plugin from livekit.plugins:
  1. Instantiate a new AvatarSession and set the avatar ID:
  1. Start the avatar session, passing the current agent session and room context:

Complete Example

  1. To gracefully shut down, use ctx.room.disconnect() to close the room connection or ctx.shutdown() to end the JobContext.
TruGen automatically stops the session when the room is disconnected or the primary participant disconnects.

More Resources

Available Avatars

Explore the full list of ready-to-use avatars.

TruGen Examples

Official GitHub examples for LiveKit + TruGen.

LiveKit Plugin Examples

Explore LiveKit Agent plugin examples.

LiveKit Documentation

Explore the full LiveKit documentation.