Project flags
abt follows a dbt-style split between project flags (flags:), structured config (config:), and vars (vars:).
For the full flag-by-flag reference table (CLI/env mapping, precedence, registry internals), see Project flags reference.
When to use what
| Layer | Use for |
|---|---|
flags: |
Project-wide invocation defaults mirroring registry CLI options: stateless, lazy context, partial parse, live compile, fail-fast, strict tool schemas (strict_tools), MCP schema sanitization (sanitize_mcp_schemas), binary offload (offload_binary_content), debug logging |
config: |
Nested blocks and run guardrails: middleware: (timeouts, model-call cap, token budget), recursion_limit, collapse, checkpoint, handlers, … |
vars: |
Template variables for {{ var('name') }} |
approvals: |
HITL approval store and resources |
An unknown key under flags: is ignored, so a typo such as stateles does not fail the compile. abt prints one Warning: line on stderr that names the key and suggests the closest flag (Did you mean 'stateless'?) or lists the valid ones.
Do not put guardrails under flags: — declare them under config: middleware: (project default) or agent frontmatter (per-agent override). Guardrails are config-only (no CLI overrides). Precedence: agent frontmatter → abt.yaml config:. See Declarative Middleware, Config precedence, and abt config show --agent NAME.
Stateless example
flags:
stateless: true
abt compile # scratch workspace, from flags.stateless
abt dispatch -s my_workflow --stateless # run and dispatch read only the CLI flag
abt compile and abt docs resolve stateless as CLI flag → environment variable → flags: in abt.yaml, and ABT_STATELESS=0 disables flags.stateless: true for one session. abt run, abt dispatch and the SDK runner read only --stateless.
See Stateless runs for workspace and artifact export behavior.
Live compile + guardrails
By default compile does not start MCP servers, and a failed external-context or remote-skill fetch only warns. Make every compile live
project-wide (e.g. for CI deploy jobs) with live_compile: true; --live does it for a single invocation
without touching abt.yaml, and --no-live turns the project default off.
flags:
live_compile: true # CI deploy jobs: always resolve MCP tool-lists at compile time
config:
middleware:
- run_timeout:
graceful_timeout_seconds: 2700
- model_call_limit:
max_model_calls: 80
- token_budget:
max_total_tokens: 500000
recursion_limit: 600
default_subagent_recursion_limit: 600 # only needed when an agent has `subagents:`
recursion_limit has to cover every model call the guardrails allow, and each call costs several graph steps (see recursion_limit). For the stack above, the minimum is 570 when the agent has tools and 490 when it has none. Compile fails and names the minimum when the limit is too low. Subagents are checked against default_subagent_recursion_limit instead of recursion_limit.
No CLI or env overrides for guardrails. See Declarative Middleware and Config precedence.
SDK
AbtRunner resolves flags through the same choke point as the CLI:
runner.invoke(["run", "-s", "agent", "-p", "hi", "--stateless"])
runner.invoke(["compile", "--stateless"], project_root="/path/to/project")
Guardrail middleware config comes only from agent frontmatter and abt.yaml config:. It is not a flags: entry, and the keyword arguments of invoke(...) reject guardrail options.
Reference: flags.md.