Skip to main content

How it works

SuperDialog ships a DialogMachineLLM plugin (named for the legacy engine, but it accepts any superdialog Agent) that wires an agent into a LiveKit Agent via the llm= parameter - the same pattern LiveKit’s own livekit-plugins-langchain uses. LiveKit’s AgentSession drives the conversation (STT → LLM → TTS). DialogMachineLLM sits in the LLM slot and translates between LiveKit’s ChatContext and SuperDialog’s turn() API. On the Playbook engine (the default), streaming is real: the Talker’s tokens reach TTS as they are generated, and a barge-in (the host aborting the stream mid-utterance) interrupts speech, never the state machine - the Director’s decision still lands.

Install

Minimal example

With STT and TTS

Per-call dialog machine

For production, create a fresh agent per call so conversation state is isolated:
Advanced / legacy. Pass a PlaybookAgent for explicit Talker/Director LLMs, or DialogMachine(Flow.load("kyc.json"), llm="anthropic/claude-opus-4-7", engine="flow") for the legacy graph engine - same adapter, same wiring. Voice-event plumbing (feeding silence timeouts into agent.runtime.on_external) is roadmap; today the adapter covers the text path.

Mid-call context injection

Push system instructions during a call with assist:

When to use this adapter

  • You’re already using LiveKit for media routing (rooms, WebRTC, recording)
  • You want SuperDialog to manage turn-by-turn dialog logic
  • You need a clean separation between media transport (LiveKit) and conversation logic (SuperDialog)