Get started
Generate an API key
- Using TruGen.AI Developer Platform, generate an API key from our developers page.
- Set the newly generated API key as
TRUGEN_API_KEYenvironment variable in your.envfile.
Adding Avatar session to Livekit Agent
- To your existing Livekit agent, import the
trugenplugin fromlivekit.plugins.
- Instantiate a new instance of
AvatarSessionfrom thetrugenplugin and set the avatar id.
- Start the
trugen_avatarsession using the start method, while passing the current agent session and room context.
Complete Example
- Gracefully shutdown Livekit agent; use
ctx.room.disconnect()to close the room connection or usectx.shutdown()to end theJobContext.
More Resourcess
Available Avatars
Explore the list of all our ready to use avatars.
Our Examples
Explore our official Github Repo for more examples
Livekit Plugin Examples
Explore Livekit Agent plugin examples.
Livekit Documentation
Explore the Livekit documentation.