abt chat
abt chat is an interactive debug REPL for one workflow. It compiles the
workflow's manifest once, then dispatches a fresh turn on every Enter — the
fastest way to poke at a multi-source workflow's wiring, tweak a mock payload,
and re-run without leaving the terminal. Every turn skips exposures
unconditionally: abt chat is for inspecting behavior, never for triggering
real deliveries.
Quick start
This walkthrough uses the advanced starter from abt init. It ships the
incident_response workflow, which has two sources: slack_thread and
linked_jira.
mkdir my-incident-agents && cd my-incident-agents
abt init --provider openai --template advanced
export OPENAI_API_KEY=...
export SLACK_BOT_TOKEN=...
export ATLASSIAN_API_TOKEN=...
abt compile
abt chat incident_response
abt compile needs none of these variables. abt chat reads every variable the profile
names, so it stops with environment variable 'SLACK_BOT_TOKEN' is not set unless
SLACK_BOT_TOKEN and ATLASSIAN_API_TOKEN are set, even if you don't use Slack or Jira. A
placeholder value is enough: chat mocks the sources by default, so they are never fetched.
OPENAI_API_KEY must be real for a turn to get an answer. The banner, /source
and routing work with a placeholder.
abt chat · incident_response
type `<name>: value` · linked_jira, slack_thread
thread d8691ce1 · sqlite · exposures skipped
>
The banner's second line tells you what a bare typed line will do before you
type it. The thread id changes on every run unless you pass --thread-id.
No slash command, no $EDITOR, no name prefix. Each turn re-dispatches
the workflow from START, so every node sees the current state of every
source.
The routing rule: how many unpinned sources are there?
A typed line's destination follows one rule, keyed on how many of the
workflow's sources are still unpinned (not fixed by --mock-source/
--mock-sources — more on pinning below):
- Zero — the line is a prompt override. Covers a sourceless workflow and one whose every source is pinned.
- One — the whole line is that source's payload, verbatim. There is no
<name>:parsing, so a payload containing a colon ("note: deploy is broken") is not split. - Two or more — the line must be prefixed
<name>: value. A bare line or an unknown name prints an error and fires no turn; the REPL waits for the next line.
In incident_response both sources are unpinned, so the rule is "two or more":
> hello there
name the source — `<name>: value`. Available: linked_jira, slack_thread
Each prefixed line fires immediately:
> slack_thread: Customer says checkout times out on mobile
> linked_jira: ISSUE-42
A bare exit and any line starting with / are REPL verbs, intercepted
before routing — they can never become a source payload. For a payload that
looks like one (/incident declare, or literally exit), use
/source mock <name> "/incident declare".
Pinning a source with --mock-source
Pin the source you are not iterating on and the workflow collapses back to bare, unprefixed lines.
abt chat incident_response --mock-source linked_jira=ISSUE-42
abt chat · incident_response
type to set source · slack_thread
linked_jira is pinned: it keeps that payload for every turn unless you change it
with /source (see below), drops out of the banner's target list, and is
never overwritten by a typed line — only slack_thread remains, so the prompt goes
back to taking bare input. --mock-sources '{linked_jira: "ISSUE-42"}' pins the same
way; both flags feed the same merge, and --mock-source wins on overlap. A pinned
source is otherwise a normal mock: it still shows up in /source list and
can be flipped live like any other.
Inspecting and bulk-editing sources: /source
Beyond typed input, /source is the tool for looking at the current
source state or editing several payloads at once — not the primary way to
set a single payload day to day. abt chat renders the union of every
node's sources in one table, regardless of which node owns which:
> /source
slack_thread investigate_incident mocked <empty>
linked_jira investigate_incident mocked <empty>
Set a mock directly (equivalent to what a typed line does, but without
routing ambiguity — useful when scripting a sequence of /source commands):
> /source mock slack_thread "Customer says checkout times out on mobile"
✓ slack_thread mocked
Or flip one source to live so it fetches for real on the next turn while the other stays mocked — useful for isolating which source is producing bad downstream behavior:
> /source live linked_jira
✓ linked_jira is live
/source live and /source mock <name> <value> only accept names that are
actually declared by a node in this workflow — an unknown name is rejected
with an error rather than silently ignored:
> /source live bogus
Unknown mock source name(s): bogus. Known sources: linked_jira, slack_thread
Bulk-editing payloads: the /source mock editor round-trip
For editing more than one payload at once, /source mock with no
arguments opens $EDITOR on a YAML document listing every known source and
its current mock payload:
> /source mock
# abt chat - incident_response - edit payloads, save to apply
# copy this block into --mock-sources for CI
slack_thread: ''
linked_jira: ''
Edit the values, save, and quit. abt chat parses and validates the result,
applies every valid entry, and reports what changed:
2 sources updated - slack_thread (42 chars), linked_jira (8 chars)
An aborted edit, invalid YAML, or a document that isn't a mapping leaves the previous mocks untouched and prints why, instead of raising.
The same YAML block also works as a --mock-sources value, so a payload
combination that reproduces a bug pastes straight into a non-interactive run.
This runs the full workflow, so it needs a working OPENAI_API_KEY:
abt dispatch -s incident_response --skip-exposures --mock-sources '{slack_thread: "Customer says checkout times out on mobile", linked_jira: "ISSUE-42"}'
See Sources for how sources are declared and how
mock and live resolution works outside of abt chat.
Resuming a session with --thread-id
abt chat checkpoints to sqlite unless a backend is set explicitly. It resolves the backend the
same way abt run and abt dispatch do — --checkpoint-backend, then ABT_CHECKPOINT_BACKEND, then
the entry agent's checkpoint: frontmatter, then config.checkpoint: in abt.yaml — and the banner
shows the result. With no --thread-id, it generates a random short id each run — printed in the
banner, not derived from the workflow or prompt — so exiting and re-running starts a fresh thread.
Pass --thread-id to resume a specific conversation instead:
abt chat incident_response --thread-id debug-checkout
Running that same command again later reuses debug-checkout's checkpointed
state, so prior turns are still there for the workflow to build on. A thread id
is bound to the workflow it was first used with. Reusing it for a different
workflow is a hard error rather than a silent mismatch:
ERROR: thread 'debug-checkout' belongs to workflow 'incident_response', not 'other_workflow'. Use a different --thread-id or resume the original workflow.
Use a new --thread-id (or drop it entirely) to start over.
--ephemeral forces the memory backend, which builds a fresh in-memory
saver per node execution. Nothing is written to disk — but nothing carries
between turns either, so each turn starts with no history. Use it to check a
single turn in isolation; stay on the default sqlite backend for
multi-turn work.
See Checkpointing for thread id resolution rules and backend selection in more depth.
On the sqlite backend, the checkpoint file (and its thread → workflow
sidecar) lives at .abt/chat/checkpoints.sqlite, relative to the project
root or --workspace. That path is deliberately outside target/, so
abt clean does not wipe chat history.
A configured checkpoint.config.path in abt.yaml, or a user-set
ABT_CHECKPOINT_SQLITE_PATH, still wins over that default.
Slash commands
| Command | Effect |
|---|---|
| (empty Enter) | Re-run the last input (prompt or source payload, whichever was last dispatched). |
/help |
List available commands. |
/exit |
Quit. |
/new |
Start a fresh conversation thread (keeps workflow, mocks and pins). |
/reload |
Recompile the manifest; keeps the previous one if compilation fails. |
/rerun |
Re-run the last input. |
/source / /source list |
Show the source table (name, owning node, mocked/live, payload preview). |
/source mock |
Open $EDITOR on all sources' mock payloads. |
/source mock <name> <value> |
Set one source's mock payload directly. |
/source live <name> |
Mark one source live. |
Slash commands autocomplete as you type — start with / to see every command,
keep typing to narrow it down. Ctrl+C cancels an in-flight turn; at an idle
prompt it shows a hint, and pressing it twice within two seconds exits.
Limitation: workflows with human-approval gates
abt chat does not support approval-gated nodes yet
If any node in the workflow requires a human approval, the turn will hang
forever with no prompt and no timeout — abt chat does not yet wire a
confirmation gate through to the dispatch, so there is nothing to answer the
approval request. Ctrl+C cancels the hung turn and returns you to the
prompt, but the turn cannot complete.
Until this is wired up, do not use abt chat on a workflow containing an
approval-gated node. Use abt dispatch (which supports --bypass-approvals
and the abt approvals workflow) for those workflows instead.
See the CLI reference for the full option table.