Skip to main content
Every provider choice lives in one place: the AgentSession built in agent/src/agent.py.
agent/src/agent.py
The plugins come from one import at the top of the same file:
agent/src/agent.py

Changing one

Three edits, all in agent/.
1

Add the plugin

2

Import it

Add it to the from livekit.plugins import ... line in src/agent.py.
3

Replace the argument

Swap the one constructor argument. The other two are untouched.
Set the new provider’s key in the root .env (and in agent/.env if you run the worker by hand). Then rebuild the worker image:

Voice, model and language

Model names are strings on the constructor, so changing a voice or a model version is a one-word edit. inworld.TTS also takes voice, which is "Ashley" by default.

VAD and turn detection are separate

vad and turn_handling are not provider choices in the same sense:
  • The Silero VAD is loaded once per process in prewarm() and shared across sessions through ctx.proc.userdata["vad"].
  • Turn detection is LiveKit’s MultilingualModel, and interruption is set to VAD mode.
Changing speech to text or the model does not touch either.
scripts/doctor.py probes Deepgram, Cerebras and Inworld by name. Its provider list is hardcoded, so after a swap it checks a key the session no longer uses. Its agent-name, LiveKit and stack checks stay correct.

Noise cancellation

An opt-in, noted in a comment in src/agent.py:
Then import RoomInputOptions from livekit.agents and noise_cancellation from livekit.plugins, and pass it to session.start: