Skip to main content

Why start here

Before setting up any voice infrastructure, test your agent in a terminal. You get the full end-to-end dialog experience - same logic, same LLM calls, same tool execution - with nothing but Python. This is also the recommended build loop:
  1. superdialog generate a playbook from a prompt
  2. Chat with it in the CLI
  3. Iterate on the prose, slots, and advance rules
  4. Only then wire it into LiveKit / PipeCat / Unpod

Option 1: bundled CLI

The CLI reads OPENAI_API_KEY / ANTHROPIC_API_KEY from your environment and runs the playbook on the Playbook engine. chat defaults to ./playbook.yaml, then ./flow.json, and auto-detects any format. Override the model:
The per-turn status line ([checkpoint=<id> ended=<bool>]) names the live checkpoint so you can watch outcomes advance.

Option 2: Python REPL loop

For more control - custom tools, a split Talker/Director, or to inspect the event log:
Inspect the event log. Drop to PlaybookAgent and agent.event_log.to_jsonl() is the audit artifact - every utterance, slot write, advance, and tool call, replayable offline:
Legacy graph engine. superdialog chat kyc.json --mode flow runs the original graph engine. In code, construct DialogMachine(Flow.load("kyc.json"), llm=..., engine="flow", traversal_dir="./traversal_history") and drive the same loop; traversal_dir writes a timestamped JSON per completed session (full node path, every turn, collected slots).

Which engine am I on?

The status line tells you: [checkpoint=<id> ended=<bool>] is the Playbook engine (the default); [<ms>ms] is the legacy DialogMachine (--mode flow). A bare --flow x.json shows the checkpoint form because flow JSON is compiled onto the Playbook engine.

When to move to the next step

Once your agent behaves correctly in the CLI: