Skip to main content
New to LiveKit? This guide assumes basic familiarity with the LiveKit Agent Framework. Start there first, then come back here for Telnyx-specific setup.

1. Install the plugin

pip install "telnyx-livekit-plugin @ git+https://github.com/team-telnyx/telnyx-livekit-plugin.git#subdirectory=telnyx-livekit-plugin"
Plugin source on GitHub

2. Write your agent

Create agent.py:
from livekit.agents import AgentSession, AutoSubscribe, WorkerOptions, cli, llm
from livekit.plugins import openai, telnyx

async def entrypoint(ctx):
    await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)

    session = AgentSession(
        stt=telnyx.deepgram.STT(model="nova-3", language="en"),
        tts=telnyx.TTS(voice="Rime.ArcanaV3.astra"),
        llm=openai.LLM.with_telnyx(model="moonshotai/Kimi-K2.5"),
    )

    await session.start(
        room=ctx.room,
        agent=llm.ChatContext().append(
            role="system",
            text="You are a helpful voice assistant.",
        ),
    )

if __name__ == "__main__":
    cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
The only Telnyx-specific parts are the stt, tts, and llm — everything else is standard LiveKit.

3. Add a requirements file

Create requirements.txt:
livekit-agents
livekit-plugins-openai
telnyx-livekit-plugin @ git+https://github.com/team-telnyx/telnyx-livekit-plugin.git#subdirectory=telnyx-livekit-plugin

4. Deploy

lk agent deploy . --secrets TELNYX_API_KEY=$TELNYX_API_KEY
The platform builds your image in-cluster, deploys it, and starts the worker. Check the status:
lk agent list
Tail logs once it’s running:
lk agent logs --id <AGENT_ID>

Swap models

The example above uses Telnyx-hosted defaults. Swap any component independently:
  • STT — Nova-3, Nova-2, Flux, Google, Azure → STT models
  • TTS — Telnyx Natural, HD Voices, MiniMax, ElevenLabs (BYOK), Azure → TTS models
  • LLM — Kimi-K2.5, Qwen3, GPT-4o, Claude (BYOK) → LLM models

Next steps