Skip to content

Advanced CLI reference

Everything that isn't part of the everyday init → run/dispatch → test → compile → docs loop covered in the core CLI reference: AI-assisted scaffolding, workflow graphs, publishing, production triggers, out-of-band approvals, dependency management, and introspection commands.

abt create (experimental)

Generates agent, workflow, source, exposure, retriever, transformer, trigger and test files from a natural-language prompt. It makes one model call per attempt, grounded in the project's existing resources. It only adds files and never overwrites one.

The plan is written and compiled in a temporary copy of the project first. The copy sits next to the project (.<name>-abt-scaffold-*), so relative paths such as paths.handlers: ../shared_handlers resolve as they do for the project. It is hidden from git status and removed afterwards. If the parent folder isn't writable, the copy goes to the system temp folder with the real folders linked beside it, so those paths still resolve. If a run is killed hard, the next run removes the leftover copy once it is ten minutes old. Your project changes only after you approve the full diff, and only if the files still match what the plan was made against. A declined, failed or interrupted run leaves the project untouched.

abt create -p "read a Slack thread and post a one-paragraph summary to Confluence"

The review shows a count line, then every new file in full:

1 file will change (1 new, 0 edited, +12 -0 lines)

+ agents/greeter.md (new)
    ---
    description: Greets people.
    ...

Create these files? [y/N]:

The whole change is printed, with additions in green and removals in red, and the question sits right under it. If the change is longer than the terminal, the count line is repeated above the question. Without a terminal, pass --auto-approve, or the command stops before it calls the model.

Prompts are workflow nodes. An agent that takes user input gets its prompt from a prompts/<name>.md node listed in edges:. Branching lives in workflows/, not in agent frontmatter; see Workflows.

Ambiguous prompt: the model asks one question instead of guessing. A question doesn't use up an attempt. --no-questions makes the model guess instead. Without a terminal, questions are off automatically. If the model decides nothing needs to change, for example because the agent already exists, it says why and the command stops without retrying (E_CREATE_NOTHING_TO_DO).

The command writes to the default folder names (agents/, workflows/, prompts/, ...). If paths: in abt.yaml moves one of them, it stops before calling the model and names the folder, because files written there would be invisible to the compiler.

Flag Default Meaning
-p, --prompt (required) What to build, in plain language.
--no-prompt off Skip prompts/; reuse an existing prompt stem instead.
--no-test off Skip tests/.
--auto-approve off Create without the review. Required without a terminal.
--no-questions off The model guesses instead of asking.
--allow-python off Let the plan write *.py files. They run during validation, so review them first. See Extending abt with plugins.
--max-attempts 3 Plan-and-compile attempts before giving up.
--timeout 180 Model seconds per attempt. Time spent answering a question doesn't count.

After a successful run, abt prints one sentence on what it did, the model calls, input and output tokens and the attempt number, then a command to try. For a workflow that command already names the variables its prompt nodes read, for example abt dispatch -s support_router --vars '{support_message: "<support_message>"}', because a workflow that starts with a prompt node takes its input from those variables and not from -p. For an agent it is abt run -s <agent> -p "<your message>".

Standard project options apply: --project-root, --target, --profiles-dir. Programmatic callers (abt.commands.create.create_from_prompt, abt.sdk.create) pass auto_approve=True or a confirm: str -> bool callback. There is no silent-apply default. An optional ask: str -> str answers clarifying questions.

abt modify (experimental)

Changes existing agent, workflow, source, exposure, retriever, transformer, trigger and test files from a natural-language prompt.

The model reads files with read_project_file, which returns long files in pages. It changes an existing file only through exact-text edits: each old must occur exactly once in the file, and the model must have read that file in this run. A new file is written in full. Like create, the plan is compiled in a copy first, and the project changes only after approval.

abt modify -p "make the greeter agent's tone more formal"

The review lists each changed file as a unified diff, with the count line first:

1 file will change (0 new, 1 edited, +1 -1 lines)

~ agents/greeter.md
    --- a/agents/greeter.md
    +++ b/agents/greeter.md
    @@ ...

Apply these changes? [y/N]:

Ambiguous prompt: the model asks one question instead of guessing. A question doesn't use up an attempt. --no-questions makes the model guess instead. Without a terminal, questions are off automatically. If the model decides nothing needs to change, it says why and the command stops without retrying (E_MODIFY_NOTHING_TO_DO).

modify can't delete or rename files, and a request that needs that stops with the model's explanation. It keeps each file's line endings and permissions. Like create, it needs the default folder names.

Flag Default Meaning
-p, --prompt (required) What to change, in plain language.
--auto-approve off Apply without the review. Required without a terminal.
--allow-python off Let the plan write or edit *.py files. They run during validation, so review them first.
--no-questions off The model guesses instead of asking.
--max-attempts 3 Plan-and-compile attempts before giving up.
--timeout 180 Model seconds per attempt. Time spent answering a question doesn't count.

Standard project options apply: --project-root, --target, --profiles-dir. Programmatic callers (abt.commands.modify.modify_from_prompt, abt.sdk.modify) pass auto_approve=True or a confirm: str -> bool callback. Optional ask: str -> str answers clarifying questions.

abt clean

Removes <workspace>/target/ and recreates an empty target/ directory (dbt-style cleanup). That includes the default checkpoint database (target/checkpoint/checkpoints.sqlite) and approval database (target/approvals/approvals.sqlite), so pending approvals and the runs paused on them are lost. Accepts --project-root and --workspace like other commands. With --dry-run it lists the items that would be removed and deletes nothing:

abt clean --dry-run
# (dry-run) Would remove 5 item(s) under: <workspace>/target
#   compiled
#   context
#   manifest.json
#   ...

Separate abt processes sharing a workspace are covered: abt clean leaves target/run_results/<run_id>/ of any run still in flight untouched. Runs register in target/.inflight/ for their lifetime; a marker older than 24h (a killed run, or a single run longer than that) is ignored. The reset and run-directory creation take an advisory lock on the workspace directory (POSIX only), so a run starting mid-clean is never missed.

abt clean --runs

Prunes old run_results/ directories while keeping compiled artifacts (manifest, context, skills) intact.

abt clean --runs --keep 10            # keep 10 most recent runs
abt clean --runs --older-than 7       # remove runs older than 7 days
abt clean --runs --keep 5 --older-than 3  # keep if EITHER condition met
abt clean --runs --keep 5 --dry-run   # preview what would be removed
Flag Description
--runs Only prune run_results (required to enable retention mode)
--keep N Keep the N most recent runs
--older-than DAYS Remove runs older than N days. 0 means "nothing is too new to delete", so it keeps nothing on its own and lets --keep decide
--dry-run Show what would be removed without deleting

At least one of --keep or --older-than is required with --runs.

abt clean --runs is the manual, one-shot version of this. A long-running abt watch consume worker prunes continuously instead, on its own retention loop paced by --run-results-sweep-interval (separate from --hygiene-interval, which paces queue reclaim) plus a repos/-only pass as each job finishes — see --prune-run-results. Both share the same retention core, so --keep/--older-than here mean exactly what --keep-runs/--run-results-max-age-hours mean there.

abt discover

Ranks agents for a natural-language task in a single active-profile model call. The project is compiled first (same as abt compile). Only names and descriptions from the manifest go into the prompt—not full system prompts, tools, or task bodies—so discovery stays bounded.

Default terminal output labels each row with a type (Agent) and uses color when stdout is a TTY.

Argument / flag Meaning
QUERY Required positional: describe the task in free text.
--top-k Max ranked suggestions (1–15, default 6).
--json Print a JSON array of {kind, name, score, reason, description} where kind is agent (each description is capped for readability). With --dry-run, prints the full agent catalog with the same cap on embedded descriptions (no model call).
--dry-run Print the full agent catalog and exit without calling the model.

Standard project options apply: --project-root, --workspace, --profiles-dir, --target, --vars, --lazy / --no-lazy, --debug, --final-response.

Discover vs abt run --auto: Discover ranks agents only. abt run --auto uses a separate routing call that also only chooses an agent (then runs it with the same task text as the user message). Neither routes to standalone prompts/ runs — use discover to find an agent, then abt run -s <agent> -p "…" with a task that references a prompt file if needed.

abt discover "investigate a failed deploy" --project-root .
abt discover "run our incident agent" --top-k 8 --json
abt discover "what agents exist" --dry-run

Then run explicitly, for example: abt dispatch -s <workflow>, abt run -s <agent> -p "…", abt run --auto "…" (LLM picks the agent), or pass task text from a prompts/ file via shell substitution (see examples under abt run).

abt approvals (experimental)

Experimental

The approval gate is experimental; this command group may change in a minor release.

Manage out-of-band approval rows persisted in target/approvals/approvals.sqlite. See External approvals for the full feature documentation and provider catalog.

abt approvals list
abt approvals list --status pending --agent ops_restart
abt approvals show <APPROVAL_ID>
abt approvals poll <APPROVAL_ID>
abt approvals resume <APPROVAL_ID> --approve --by you@example.com
abt approvals resume <APPROVAL_ID> --deny --by you@example.com
abt approvals cancel <APPROVAL_ID>
abt approvals cancel --thread-id <tid>
abt approvals cancel <APPROVAL_ID> --keep-checkpoint
Subcommand Purpose
list Print recent approval rows. Filter with --thread-id, --agent (the value in the AGENT column, which is the dispatched workflow name), and --status (pending / resolved / orphaned / cancelled / expired / failed).
show APPROVAL_ID The whole row: ID, status, agent, tool, resource, thread ID, prompt index, created and decided times, decided-by, decision, handle and config hash.
poll APPROVAL_ID Manually trigger one provider fetch_decision cycle (low-latency nudge). Rarely needed — abt dispatch polls on resume.
resume APPROVAL_ID --approve\|--deny --by <id> Force a decision on a row. Primary recovery path when the posted artifact is unreachable (orphan recovery). The decision is recorded immediately, but the row stays pending until you run abt dispatch -s <workflow> --thread-id <same id> again: that run replays the decision into the paused graph (a denial reaches the agent as a rejected tool call) and resolves the row. --by is recorded as given and not checked against allowed_approvers (operator-trusted).
cancel APPROVAL_ID Mark the row cancelled. The paused run is not resumed. A cancelled row cannot take a decision. To deny a paused run, use resume --deny instead, then run abt dispatch again with the same --thread-id.
cancel --thread-id <tid> Cancel every pending row on the thread.
cancel … --keep-checkpoint Same as cancel, but suppress the reminder about the dangling checkpoint.

All commands accept the standard --project-root, --target, and --profiles-dir options.

abt debug

Preflight checks — "can I run right now?" — modelled on dbt debug. Validates environment, abt.yaml, the resolved profile/target and the live LLM connection (a one-token request through the same provider factory a run uses). Does not compile the manifest. Exits non-zero on any failure, so it works as a CI gate. See Preflight checks.

abt debug --project-root .
abt debug --project-root . --connection        # profile + live connection only
abt debug --project-root . --target prod --profiles-dir ~/.abt
Argument / flag Meaning
--connection Only resolve the profile and test the live LLM connection; skip environment/project checks (like dbt debug --connection).
--project-root, --target, --profiles-dir Same as other commands.

Exits 0 when all checks pass (skipped checks never fail the command), 1 when any check errors. Connection errors are routed through the CLI redaction chokepoint, so provider API keys are masked.

abt doctor

Static health checks on compiled agents, plus optional LLM prompt review. Always compiles first (writes manifest.json like abt run / abt test). See Agent health checks.

abt doctor --project-root .
abt doctor -s hello --project-root .
abt doctor --tag infra --project-root .
abt doctor -s my_agent --project-root .
abt doctor --deep --project-root . --target dev

abt doctor has two independent selectors — don't confuse them:

Argument / flag Meaning
-s, --select Optional. A bare agent name (same syntax as abt compile -s). Selective compile only (agent's full subagents: closure written to the manifest). Not the run/dispatch positional model.
--tag TAG Post-compile: only check agents that list this tag.
--deep Run LLM prompt review per agent using config.testing.judge_model_id in abt.yaml (up to four model calls per agent).
--fail-on {error,warning} Exit 1 when any finding is at that severity or worse. Default: always exit 0.
--show-suppressed Also list the findings that doctor.disable muted.
--baseline FILE / --write-baseline FILE Gate only on findings not recorded in FILE / record the current findings in FILE and exit 0. See Agent health checks.
--format {text,json} json prints the findings (and the suppressed and skipped ones) as JSON instead of the text report.
--project-root, --target, --profiles-dir, --workspace Same as abt test.
--lazy / --no-lazy Context materialization behavior (same as other commands).
--vars Template vars for compile (same as abt compile).
--debug, -fr / --final-response Debug logging / minimal terminal output (the report is always printed).

Exits 0 when the report is produced, even if it lists errors, unless you pass --fail-on: then it exits 1 when a finding reaches that severity (the last line of output says how many). Exit 1 also covers a project doctor could not fully check (an agent file compile skipped, or no agent to check), whatever --fail-on says, and compile/bootstrap or unexpected errors; exit 2 is invalid CLI args. Static checks do not need a model profile, so a missing profiles.yaml still exits 0; --deep does need one and exits 1 with --deep needs a model profile (E_NO_PROFILE) when none is active.

abt list

Without --agent: print discovered agents, name and tags per line. With --tags, group lines by tag (--agent cannot be combined with --tags).

Optional -s / --select narrows which agents are printed (full project still compiles first) — a bare name or tag:<name>: a name here is a bare filter, not a partial-closure browser.

-s value Effect
tag:<name> Every agent whose tags include name (case-sensitive tag string).
agent That agent only.

--agent NAME: print one agent's own compiled wiring — its retrievers and its downstream consumers (the agents that list it under subagents:) as compiled (sources, prompts and exposures are workflow nodes; use abt graph). With -s, that agent must also match the filter. The Python API returns an AgentWiringView from list_agent_wiring — see Python SDK.

--json prints agents and workflows as one JSON object ({"agents": [...], "workflows": [...]}). -s narrows the agents only. It cannot be combined with --tags, --agent, --packages or --handlers. -q / --quiet hides progress and warning lines on stderr.

Supports --project-root, --target, --profiles-dir, and --vars. See Python SDK for list_project / list_agent_wiring.

With --packages, skip the agent catalog and print installed abt_packages.yml dependencies under .abt_packages/ and available templates/*/agent.md copy targets (see abt deps).

With --handlers, print every discovered lifecycle handler class under paths.handlers along with its __init__ signature (name, annotation, default, required flag) so you can see which kwargs a handler accepts before referencing it from agent frontmatter.

abt deps

Install shared abt packages declared in abt_packages.yml at the project root into .abt_packages/.

abt deps --project-root .
abt deps --clean --project-root .   # remove .abt_packages/ first
abt deps --upgrade --project-root . # ignore abt_packages.lock.yml, re-resolve every revision

Each package may ship tools, macros, providers, context .md files, skills, contracts, and templates. abt deps supports git: (clone + checkout revision) and local: (symlink or copy).

Resolved commit SHAs are pinned in abt_packages.lock.yml (commit it to version control) so reinstalls are reproducible instead of re-resolving revision: main against whatever the branch tip is today. See Packages — abt_packages.lock.yml.

abt lint

Check agent .md files and standalone-resource .yaml files (sources/, exposures/, retrievers/, transformers/, triggers/) for formatting consistency against abt's canonical format.

abt lint           # check only; exits 1 if any file would change
abt lint --fix     # rewrite files to canonical format in-place

Prints the list of non-conforming files and exits 1 without --fix; with --fix, rewrites them in place and exits 0. Files written by abt init already conform, so a fresh project passes abt lint unchanged.

abt graph

Render a workflow's resolved topology from workflows/*.yaml as a tree — order, branches (├─/└─), fan-in nodes (↓), loop-backs (↺), respond: literal terminals, and the variables the trigger binds. Read-only: no model calls, no dispatch.

abt graph support_ticket
abt graph support_ticket --format mermaid > support_ticket.mmd
Argument / flag Default Meaning
WORKFLOW_NAME (required) The workflow to render (filename stem, or its name:).
--project-root . Directory containing abt.yaml.
--format text text or mermaid (a Mermaid flowchart you can paste into Markdown).

See Workflows for the workflow schema.

abt publish

Publish the compiled manifest to the targets in abt.yaml's publish: section so other projects can import its public agents via loom. See Publishing manifests for targets, versions, and what is included.

abt publish sends the existing target/manifest.json and does not recompile, so run abt compile first whenever agents or config changed. It compiles on its own only when no manifest exists or the manifest came from abt compile -s.

abt compile                    # publish reads target/manifest.json; it does not recompile
abt publish --dry-run          # show what would be published; needs a `publish:` section
abt publish --local            # publish to ~/.abt/published/<project>/
abt publish --version 1.2.0
Flag Meaning
--local Publish to ~/.abt/published/<project>/ instead of the configured targets. Needs no publish: section, but at least one agent with access: public.
--dry-run Show what would be published without writing. Requires a publish: section unless combined with --local.
--version Override the publish version: a semver string or auto.
--project-root, --target, --profiles-dir, --workspace Same as other commands.

Lineage search syntax (abt docs generate)

After generating docs (see abt docs generate), the search box on the Lineage tab filters the graph in the browser. It changes only what you see. abt run and abt dispatch take a plain name through -s/--select (see the selection model), and so do abt compile, abt test and abt doctor, as documented in the core reference. For a workflow's order and branches, use abt graph <workflow_name> (see Workflows).

Input Shows
reviewer Nodes whose label contains the text, case-insensitively
+reviewer The matching nodes and everything that feeds them (upstream)
reviewer+ The matching nodes and everything they feed (downstream)
+reviewer+ Both directions
2+reviewer+1 A number limits the levels: here two upstream and one downstream
tag:infra Nodes with a matching tag. * matches any text and ? one character
kind:tool Nodes of that kind: agent, subagent, external, context, mcp, tool, skill, source, exposure, prompt, trigger, approval_gate or decision
reviewer planner Separate terms add up: the nodes either one matches
reviewer+ -kind:tool A term starting with - takes its matches out again, and works with any of the forms above

Spaces separate terms and a + belongs only at the start or end of a name, so a label or tag that contains a space or +, or starts with - or word:, cannot be searched for. Matches count only in the layers that are switched on; when every match sits in an unchecked layer, the page says so. A query it cannot read, such as a bare +, an unknown kind: or an unknown name:-style prefix, is flagged on the box with the reason and the graph stays as it was.

The + operators exist only in this box. The CLI selectors take a plain name.

abt docs package

Print the component → tool → access catalog from an installed package manifest (abt_package.yaml). Requires abt deps first.

abt docs package databricks --project-root .
abt docs package git --project-root .
abt docs package atlassian --project-root .
abt docs package slack --project-root .

Output includes manifest tool names, access level (read / write), and optional SDK mapping. Use this to pick provider__tool specs for agent frontmatter.

abt config show

Print resolved guardrails for an agent (dbt-style). When the agent uses package shorthand specs, also prints Package tooling lines: resolved tools, blocked write specs, and merged config.packages.*.

abt config show --agent investigator --project-root .
abt config show --agent investigator --middleware
Flag Meaning
--agent Required. Agent name (name: in agents/*.md), for abt.yaml's agents.<name>.config guardrail overrides. See Project schema — agents and Config precedence.
--middleware Show the resolved middleware stack with source annotations, instead of the guardrail summary.

See Config precedence and Packages — config.packages.

abt config resolve

Print effective recursion-limit and MCP-tuning config with per-key provenance (project-wide). Pass --agent to also resolve that agent's top-level recursion limit.

abt config resolve --project-root .
abt config resolve --agent investigator --project-root .
Flag Meaning
--agent Optional. Agent name — applies that agent's agents.<name>.config overrides.

Unlike abt config show (guardrails for one agent), abt config resolve reports project-wide settings — recursion limits and MCP tuning — with a provenance label after each value, for example 2500 (abt.yaml config.recursion_limit) or 150 (default). MCP-tuning values are labelled (abt.yaml) even when they are the built-in defaults, so confirm an override by checking abt.yaml itself. See Config precedence.

abt watch

Flags, endpoints and error codes for abt watch are in the abt watch reference. The abt watch guide covers setup and operation.

See also