Prerequisites
- Python 3.10–3.14 and uv.
- The LiveKit CLI v2.19 or later (
brew install livekit-clion macOS). - A LiveKit Cloud project with Inference and billing enabled. This example uses LiveKit credentials for STT, LLM, and TTS; it needs no separate provider API keys.
- An Anam API key from Anam Lab and an avatar ID from Avatars.
- Node.js 24 and pnpm 9.15.9 (the starter’s declared package manager) for the React frontend used below.
Set up the agent
1
Install compatible packages
Create a Python project:The extras install
livekit-plugins-anam and livekit-plugins-silero at the same version. LiveKit Agents 1.8.9 or later is required for the fishaudio/drama-3 model. Keep the generated uv.lock for reproducible installs. LiveKit Inference provides Fish Audio TTS, so this example does not install the Fish Audio plugin or SDK.2
Configure server-side credentials
Create a LiveKit Cloud account and project, then copy the project URL, API key, and API secret from the project’s API key settings. Get your Anam API key from Anam Lab.Create Add
.env.local in the project root and replace the placeholders:.env.local
.env.local to .gitignore. Keep API keys and the LiveKit secret in your server environment or deployment secret store. Never put them in browser code or NEXT_PUBLIC_ variables. The browser receives a room-scoped participant token from the frontend’s server route.ANAM_AVATAR_ID selects the face. The Fish Audio voice ID belongs in the LiveKit TTS configuration. LIVEKIT_URL must be reachable by Anam’s servers; use the Cloud project’s wss:// URL, not a local LiveKit server.3
Create the voice and avatar session
Create The Anam plugin forwards the generated speech to Anam and publishes synchronized audio and video back into the same LiveKit room. Start
agent.py:agent.py
avatar.start() before session.start() so speech follows that route from the first greeting. participant_identity binds microphone input to the visitor, rather than the avatar participant that joins afterward.anam.PersonaConfig here comes from livekit.plugins.anam and uses avatarId and avatarModel. It is a different type from the standalone Anam Python SDK’s PersonaConfig.4
Run the agent
Download the model assets and start the worker from the project directory:Keep this terminal open. The worker registers with your LiveKit project under the dispatch name
fish-audio-agent and waits for a room assignment. Registration alone does not start a conversation.By default, lk agent dev registers under a random dev- deployment, and the starter frontend below only dispatches to production. --deployment production lets the frontend reach your local worker. Don’t use it in a project where a deployed agent with the same name serves real users; open the Agent Console link that lk agent dev prints instead.Connect a frontend
Use the React frontend from the LiveKit quickstart. In a second terminal, outside the Python project:.env.local in the frontend project:
.env.local
LIVEKIT_TOKEN_SERVER_ID unset so the starter uses its included token endpoint. AGENT_NAME must match agent_name in agent.py: this requests the named agent when the visitor joins. Anam credentials stay in the Python project.
http://localhost:3000, start a session, and allow microphone access. You should hear the greeting in Ethan’s Fish Audio voice and see the Anam avatar speaking in sync. Ask a short question and check that the reply has both audio and matching mouth movement. Disconnect when finished; the agent session closes when its linked visitor leaves.
The starter includes avatar rendering and a server token route for local development. Before exposing it publicly, add authentication and authorization to token issuance; follow LiveKit’s frontend authentication guidance.
Next steps
- Configuration: change the voice, tune Fish Audio, use your own Fish Audio API key, deploy, and troubleshoot
- LiveKit configuration: avatar options, Director Notes, and advanced examples
- Avatar gallery: browse stock avatars

