Skip to main content
Keep your LiveKit agent where it runs and swap its speech to text and text to speech for SLNG hosted models. You can also point the language model at the SLNG Context Router. The rest of your pipeline stays as it is. There are two ways to do it. Set up the layers in the dashboard and copy the migration prompt for your coding agent, or make the edits yourself.

Prerequisites

  • A running LiveKit agent (Python).
  • An SLNG API key. See Create your API key.
  • A BYOK LLM key registered in your org, so the router has a model to route to. See Bring your own key.
  • For the assisted path, a coding agent that supports skills.

Set up in the dashboard

Improving an agent is à la carte. Turn on speech to text, the language model, text to speech, or any mix of the three, and leave the rest to your current stack. You decide which layers to optimize. Set up the ones you want, then copy the prompt SLNG builds from your choices.
1

Choose LiveKit

Start a new project, choose Improve my agent, and under In your own code select LiveKit.
New project chooser with LiveKit highlighted under In your own code

Choose LiveKit in the Improve my agent flow.

2

Set up Listen

Open Listen, turn on speech to text, and choose the model your agent should use. Leave it off to keep your current speech to text.
Listen section with the Include STT toggle on

Turn on Listen and pick a speech to text model.

3

Set up Think

Open Think, turn on the language model, and choose the model your agent should use.
Think section with the language model turned on and a model chosen

Think turned on with a language model selected.

4

Set up Speak

Open Speak and choose the text to speech model and voice. Use the Include TTS toggle to route this layer through SLNG or leave it on your current provider.
Speak section with the Include TTS toggle highlighted

Use the Include TTS toggle to turn text to speech on or off.

5

Copy the prompt

Click Integrate in the top right, then Copy prompt in the modal. The prompt is built from your Listen, Think, and Speak choices. Hand it to your coding agent, which installs the livekit-migration skill and applies the change.
The Integrate button in the top right of the project

Click Integrate in the top right.

The Integrate modal with a Copy prompt button

Copy the prompt.

Your model IDs, voice, language, and region come from what you picked.

Edit the code yourself

If you would rather not use a coding agent, make the same edits directly. The removed lines below depend on your current providers, so match them to your code.
1

Install the plugin

Use your project’s package manager.
2

Point STT and TTS at SLNG

Swap the two constructors that feed your session. Keep the models, voice, language, and region you selected.
3

Point the LLM at the SLNG Context Router

Keep LiveKit’s OpenAI plugin and repoint it at the router. Pass stable agent and session identifiers in the headers. Use a fixed agent_id for the running agent and the current room or session ID for session_id.
4

Verify

Run one spoken turn through your agent and confirm it completes speech to text, the LLM, and text to speech.

Next steps