Wire it in
Assign aDialogMachine to ctx.session.dialog_machine - the SDK auto-wraps
it in a SuperDialogAdapter (see
Adapters):
Flows are built once (
create_dialog_flow calls an LLM at build time, not at
runtime) and saved as JSON you version-control. The build model and the runtime
model can differ - build with a strong model, run with a fast one. See the
SuperDialog Quickstart.Voice-specific patterns
These patterns are specific to running a DialogMachine inside a live call. For flows, tools, and sessions themselves, see the SuperDialog docs.Give tools call context
Define tools as closures inside your entrypoint to capture per-call data:Inject instructions mid-call
Push a runtime directive into the machine from a session hook:Switch flows mid-call
Detect completion
Flows have terminal states. Afterrun() returns, check whether the dialog
finished or the caller hung up mid-flow:
Go deeper
SuperDialog
The framework itself: flows, tools, sessions, CLI.
Embedding Guide: Unpod Voice
The full worked example: DialogMachine inside an AgentRunner session.
Thinking in Flows
The mental model for designing dialog flows.
Bring Your Agent
Prefer your own brain? Adapters for LangChain, OpenAI, Anthropic, HTTP.