What you need
- A LiveKit Cloud project: the free Build plan works, with no card required. You need its URL, API key and API secret. The starter runs its models on LiveKit Inference: Deepgram Nova-3 for speech-to-text, Gemma 4 31B as the LLM and Cartesia Sonic 3.5 for text-to-speech. The LiveKit project’s credentials pay for them, so there are no OpenAI, Deepgram or other model keys.
- A Simli API key, from your Simli dashboard. The free plan works.
- Python 3.10 or later (the starter uses uv), and Node.js 20.9 or later for the starter’s web page
Run the starter
create-simli-app-livekit-agents
A LiveKit Agents voice agent on LiveKit Inference, with a Simli Trinity-2 avatar and a small web page to talk to it. Its lockfile pins the versions it was tested with.
simli-agent and only joins rooms whose token dispatches it by that name, as the page’s token does, so other agents in your LiveKit project don’t join too. To rename it, set LIVEKIT_AGENT_NAME in both .env and frontend/.env.local. LiveKit’s Agents Playground works too: connect it to your project and set Agent name to simli-agent.
Build it yourself
1. Install the packages
2. Set your keys
Put them in a.env file next to your agent:
.env
LIVEKIT_* values. The Simli plugin reads them too: it gives the avatar a token to join the room.
3. Add the avatar to your agent
This is the core of the starter’s agent. The starter’sagent.py has the complete file.
agent.py
Trinity-2 options
This gives a Trinity-2 face Simli’s default 768x768 video. Fromlivekit-plugins-simli 1.8.10, SimliConfig also takes Trinity-2’s options, and sends them only when you set them. For a 16:9 video with the avatar at the bottom centre:
streaming_width, streaming_height, avatar_position_x, avatar_position_y, camera, and background_id and foreground_id. Set max_idle_time yourself: the plugin’s default is 30 seconds. On an older plugin, upgrade, or see Trinity-2 in LiveKit Agents and Pipecat.
4. Run it
simli-agent, or your LIVEKIT_AGENT_NAME.
python agent.py console talks to the agent in your terminal instead. It’s voice only, with no avatar, since there’s no LiveKit room, but it still needs the LIVEKIT_* values for LiveKit Inference. The starter’s agent handles that case. The LiveKit CLI can also run the same agent.py, with lk agent dev and lk agent console.
5. Talk to it
Use the starter’s web page, LiveKit’s Agents Playground with Agent name set tosimli-agent, or any LiveKit agent frontend whose token dispatches that name, such as agent-starter-react. The avatar’s video arrives as the agent’s video.
Troubleshooting
- The Simli avatar didn’t start: the Simli error logged just before says why.
401meansSIMLI_API_KEYis wrong,400means the face ID wasn’t found, and429means your Simli account is already running as many sessions as it can. - The Simli avatar didn’t join the room: usually Simli couldn’t reach your LiveKit server.
LIVEKIT_URLmust be reachable from the internet, notlocalhost. - The avatar appears but never answers, and the agent logs STT, LLM or TTS errors: LiveKit Inference refused the request. Check that
LIVEKIT_API_KEYandLIVEKIT_API_SECRETbelong to the project inLIVEKIT_URL, and whether this month’s Inference credit is used up. - The page says the avatar didn’t join: check that the agent is running, that
.envandfrontend/.env.localhold the sameLIVEKIT_*values, and thatLIVEKIT_AGENT_NAMEmatches in both if you set it.
Before you go to production
- Anyone who can join a room in your LiveKit project starts a conversation, which uses your Simli minutes and LiveKit Inference credit. The starter page’s token route has no sign-in, so a production build refuses to hand out tokens (403) until you add your own sign-in, or set
ALLOW_UNAUTHENTICATED_SESSIONS=truefor a demo. - The avatar leaves the room as soon as its agent does, so ending the agent’s session, or deleting the room, ends the Simli session and its billing. A brief network blip on the agent’s side doesn’t count: LiveKit resumes the connection.
- To deploy the agent, run
python agent.py starton any server, or see LiveKit’s deployment guide. The page builds withnpm run buildand runs withnpm start, or deploys to any Next.js host.
Learn more
- The starter’s README: changing the face, models, voice and prompt, and the free plans’ limits
- LiveKit’s guide to Simli
- LiveKit Agents docs: tools, other models and more