Configuration
A project uses two config files, similar to dbt's project and profiles split. Commit abt.yaml for structure and non-secret settings. Keep profiles.yaml local for models and credentials. vars.yaml holds default values for Jinja variables.
| File | Purpose | In git? |
|---|---|---|
abt.yaml |
Paths, config:, flags:, guardrails, publish: |
Yes |
profiles.yaml |
Model provider, credentials, env |
No |
vars.yaml |
Defaults for {{ var() }} |
Yes |
abt.yaml must not repeat a key at the same level. A duplicate key fails compile with E_INVALID_ABT_YAML and names the key, instead of silently keeping the last value.
One order for every setting that has more than one source: CLI > env > abt.yaml > default. The Config precedence page has the full merge order for guardrails and flags.
Model IDs in examples are placeholders. <bedrock-model-id> and <anthropic-model-id> stand for model IDs your provider offers. The prefix before the colon selects the LangChain provider, such as bedrock_converse:, anthropic:, openai: or azure_openai:.
abt.yaml
profile
Name of the block in profiles.yaml to load. If omitted, the loader uses the alphabetically first profile name, skipping names that start with _.
paths
Directories where components are discovered, relative to the project root.
| Key | Default | Discovers |
|---|---|---|
agents |
agents |
Agent markdown files |
sources |
sources |
Sources fetched before the downstream agent |
exposures |
exposures |
Destinations such as Slack, run after the agent succeeds |
retrievers |
retrievers |
RAG-style enrichment, referenced from retrievers: |
transformers |
transformers |
Reshape or gate steps before exposures |
triggers |
triggers |
Event triggers for abt watch; dormant unless enabled: true |
providers |
providers |
Python modules that extend abt |
workflows |
workflows |
Run order and edges between nodes |
prompts |
prompts |
Plain user-message templates |
few_shots |
few_shots |
Shared YAML trajectories for agent few_shots: |
macros |
macros |
Jinja macro files, imported by filename |
tools |
tools |
Python modules with @tool functions |
mcps |
mcps |
MCP JSON sources; must be a directory |
contracts |
contracts |
Pydantic BaseModel classes for output_schema |
context |
context |
Local context files for {{ context.local() }}. abt init writes this key, but abt always reads context/: changing the value has no effect |
handlers |
handlers |
Python modules with abt.sdk.Handler subclasses |
skills |
[".abt/skills"] |
Skill folders; agents reference a skill by name |
external |
external |
Extra vendored assets |
tests |
tests |
YAML test suites for abt test |
middlewares/ is a fixed location, and this key does not override it.
A paths: key that is not in this table is ignored without a warning. An unknown key under config: fails the compile instead and suggests the closest name, such as config.recursion_limt: unknown key (did you mean 'recursion_limit'?).
.abtignore
Optional file at the project root that excludes paths from discovery. It holds one fnmatch pattern per line; # starts a comment. A pattern matches the POSIX path from the project root or the filename.
# Exclude drafts and CI-generated files
agents/draft-*.md
*_wip.md
All discovery honors it. Limits: no ! negation, no trailing / for directories, and no **. Use *, which matches within one path segment.
vars
Defaults for {{ var('name') }} in agents, prompts and context files. Set them in vars.yaml at the project root or under vars:. --vars on the command line wins over both: vars.yaml < vars: < --vars.
A var() without a default must be set somewhere, or abt compile fails. Add a default in the call instead: {{ var('name', 'fallback') }}.
Source overrides
The top-level sources: key tunes a source defined in sources/*.yaml. Only the nested config: deep-merges, and abt.yaml wins on conflicts. Other fields are reserved. Unknown source names log a warning and are ignored.
sources:
slack_thread:
config:
max_messages: 120
Scoped guardrails (agents:)
The top-level agents: key, keyed by agent name, tunes guardrails for one agent. Each entry accepts only config:, with recursion_limit, default_subagent_recursion_limit, synthesis_model and middleware:. Merge order: config:, then agents.<name>.config, then agent frontmatter, which wins. Unknown agent names log a compile warning.
Inspect the result with abt config show --agent <name>, and add --middleware for the full stack.
flags
Scalar toggles for invocation mode. Precedence: CLI > env > flags: > default. The registry is in Project flags.
flags:
stateless: false
lazy_context: false
partial_parse: true
strict_tools: false
sanitize_mcp_schemas: true
offload_binary_content: false
Guardrails (timeouts, budgets, model-call limits and recursion_limit) belong under config:.
publish
Pushes the compiled manifest to remote targets for cross-project use with Loom. See Publishing manifests.
publish:
version: null # null = overwrite, "auto" = timestamp, "X.Y.Z" = semver
strip_prompts: false # clear system_prompt from published agents
targets:
- type: s3
config:
bucket: <your-bucket>
key: "{{ project_name }}/manifest.json"
region_name: eu-central-1
Target types are local, s3 and http. Config values accept {{ project_name }} and {{ env_var('NAME') }}.
config
Non-secret project settings, validated strictly at abt compile: an unknown key or a bad value fails the compile. These blocks compile into manifest.json, and runtime reads only the manifest. A middleware: value that calls env_var() renders when the agent starts, so secrets never reach compiled artifacts.
Keys marked init are written by abt init. The others are optional.
| Key | Default | Description | Link |
|---|---|---|---|
agents.<name>.config |
none | Per-agent guardrail overlay | Scoped guardrails |
checkpoint |
memory (abt chat: sqlite) |
Default checkpoint backend and options | Checkpointing |
confirmation.defaults |
no timeout; on_approval_timeout deny; on_missing_gate deny |
Defaults for tool approval gates | Tool confirmation |
confluence.space |
"" |
Default Confluence space key | Context methods |
context_mode |
auto |
Context rendering: auto, lazy or full |
Rendering mode |
default_subagent_recursion_limit |
max(25, min(main - 10, 120)) |
Recursion limit for delegated subagents (init) | Subagents |
doctor.deep_max_concurrency |
4 |
Agents reviewed in parallel by abt doctor --deep |
Doctor |
doctor.disable |
[] |
Rule ids abt doctor drops for every agent and for project-level findings |
Doctor |
footnote |
all fields on | Fields shown in the run footnote | Footnote |
general_purpose_subagent |
enabled | false removes the general-purpose subagent (init) |
Subagents |
handlers |
none | Project-wide lifecycle handler defaults | Handlers |
mcp_get_tools_retries |
3 |
Retries for transient MCP get_tools failures |
— |
mcp_get_tools_retry_base_ms |
200 |
Backoff base between those retries | — |
mcp_get_tools_timeout_seconds |
20 |
Timeout per MCP get_tools request; 0 disables it |
— |
mcp_source_max_concurrency |
2 |
Concurrent MCP manifest fetches per source | — |
mcp_tool_cache_ttl_seconds |
300 |
Reuse time for fetched MCP tool lists; 0 disables caching |
— |
middleware |
framework stack | Middleware for all agents; replaces the defaults (init) | Middleware guide |
min_offload_chars |
4000 |
Tool results larger than this are written to disk | — |
model_kwargs |
none | Extra keyword arguments for the chat model | Model settings |
package_root |
auto | Package root override | Environment variables |
packages |
installed packages on, read-only | Per-package overrides | Package tooling |
recursion_limit |
150 |
LangGraph recursion limit for the main agent (init) | Recursion limit |
routing_timeout_seconds |
120 |
Timeout for LLM calls that route abt run --auto and abt discover |
— |
source_fetch_timeout_seconds |
60 |
Timeout for one source provider fetch() |
Sources |
subagents.defaults.mode, timeout_seconds |
sync, 900 |
Subagent dispatch mode and background run timeout | Subagents |
synthesis_model |
executor model | Model for graceful-exit answers | Synthesis model |
testing.judge_model_id, judge_temperature |
profile default | Judge for says checks in abt test and abt bench |
Testing |
tool_result_cache |
disabled | Per-run cache for identical read-only tool calls. Keys: enabled, max_entries (256), cacheable_tools (default read_file, grep, glob, ls, list_dir, repo_search, search_code; a list replaces it) |
Environment variables |
tools.defaults.execution_timeout |
no cap | Project-wide tool runtime cap in seconds | Tool runtime caps |
watch.retention |
keep 20 runs, 10 failed, 24 h, 512 MB | How abt watch consume prunes target/run_results/. Keys: prune, keep_runs, keep_failed_runs, max_age_hours, max_total_mb, reclaim_repos_cache, sweep_interval_seconds |
abt watch |
workflows.defaults.tags_inherit |
true |
Merge a workflow's tags: into each node |
Workflows |
- Concurrency stays within the
--threadsbudget. See Performance. approvals:is a top-level key next toconfig:. See External approvals.
Model settings
model_kwargs merge in this order, last wins: profile model_kwargs, profile temperature and max_tokens, agent model_kwargs (project, agent, delegation), then profile timeout and max_retries, which always win. An agent can set its own max_tokens in model_kwargs.
config:
model_kwargs:
top_p: 0.9
top_k: 250
Reasoning effort
reasoning_effort is LangChain's standard parameter. Set it in model_kwargs at any layer, and the provider integration translates it.
# agents/triage.md
model_id: anthropic:<anthropic-model-id>
model_kwargs:
reasoning_effort: low
| Provider | Result |
|---|---|
anthropic |
output_config.effort; adaptive thinking on supported models. effort is an alias. |
bedrock_converse |
Converse fields for the model family. A level outside the model's declared levels fails when the agent is built. |
openai, azure_openai |
reasoning_effort on the request |
google_genai |
thinking_level (also accepts reasoning_effort) |
Valid levels come from each model's LangChain profile. abt doctor warns when a level falls outside it (reasoning_effort_outside_model_profile).
- Set it per agent and measure on your own benchmarks.
- Helper models inherit
model_kwargsonly when they use the same model. - Thinking tokens count against
max_tokens(profile default10000). Raise it at higher effort. - Some reasoning models reject a non-default
temperature. Leave it unset and tune effort instead.
Synthesis model
synthesis_model names a model that writes the final answer when a graceful exit triggers, instead of the executor:
- Graceful timeout (
run_timeout.graceful_timeout_seconds). Without it, the executor gets one more turn. - Token budget exceeded. Without it, the run returns a canned wrap-up.
- Loop detection with
synthesize. Without it, the executor gets one more turn.
Keys: model (required), max_tokens (default 4096), temperature, max_context_messages (default 30) and system_prompt. Agent frontmatter overrides it, and each mechanism can set its own block.
config:
synthesis_model:
model: bedrock_converse:<bedrock-model-id> # a faster, cheaper model
max_tokens: 2048
Prompt caching
Automatic, with no configuration. It applies to the anthropic provider (direct API) and to bedrock_converse, with the provider's 5-minute TTL.
Middleware and run guardrails
middleware: in an agent's frontmatter sets that agent's stack. A list under config.middleware in abt.yaml applies to every agent, and each lower layer deep-merges over it. Each entry is a single-key mapping, - name: {config}, such as - token_budget: {max_total_tokens: 2500000}. Guardrails are middleware entries: run_timeout, model_call_limit, token_budget and loop_detection. The Middleware guide lists every entry and its ordering rules.
- A fired guardrail sets
run_warningon the result:timeout,paused_for_approval,budget_exhausted,loop_detected,output_truncated(the model stopped at itsmax_tokensbudget, so the text may end mid-sentence), or empty. Telemetry is underguardrailsinrun_results.json(Run artifacts). token_budgetscope isrun(default) orthread. It resolves as agentscope:, workflowtoken_budget_scope:,abt.yaml,ABT_TOKEN_BUDGET_SCOPE, thenrun.- A subagent's
token_budget.max_total_tokenscannot exceed its parent's. The compile raisesBudgetConfigError. Subagent spend rolls up into the parent budget. tool_retryandmodel_retryretry twice by default (max_retries: 2) once declared; see Retries. Network and timeout errors are retried;RecursionError, including LangGraph'sGraphRecursionError, is not.rubricgrades the transcript against criteria. Keys and defaults are in Rubric middleware.
LangGraph recursion_limit
Precedence (highest wins): agent frontmatter recursion_limit → agents.<name>.config.recursion_limit → config.recursion_limit → 150. A subagents: dependency can set its own limit; see Subagents. Delegated subagents use default_subagent_recursion_limit, and the heuristic above applies when it is unset. Hitting the limit raises LangGraph's GraphRecursionError.
Each model call costs several graph steps. abt compile rejects a limit below max_model_calls × steps per call + 10 (E_RECURSION_LIMIT_TOO_LOW) and prints the minimum. For run_timeout with model_call_limit: 80 and no tools, the minimum is 410. Adding token_budget makes it 490. An agent with tools needs 570.
Loop detection
Loop detection is a middleware: entry that breaks stuck tool-call loops before they use up the token budget. Project defaults apply to all agents, and agent frontmatter can tighten them. Detectors and the on_warning and on_critical modes are in the Loop detection guide.
Collapse (experimental)
Trims repetitive tool-call traces on every turn, with no LLM call. Declare a collapse: entry after installing the collapse extra. The Message collapse guide covers keys and install steps. The registry runs collapse before compaction.
Choosing collapse vs compaction
Use collapse alone for tool-heavy agents whose sessions fit the context window, and compaction alone for long sessions. Declare both for long, tool-heavy runs: collapse trims first, then compaction summarizes. Compaction can call an LLM; collapse cannot. See Message collapse.
Compaction (experimental)
Manages a full context window through argument truncation, clearing of stale tool results and summarization, on any agent. It is bundled. Defaults: trigger at 170,000 accumulated tokens, keep 20 messages. Keys and defaults are in Declarative middleware. Examples and per-agent overrides are in the Context compaction guide.
trigger (and truncate_args.trigger) is an absolute token count, checked against the run's accumulated tokens. Lookups of a model's window size lag new model IDs and are often empty, so abt uses absolute counts. If the agent's model reports a smaller max_input_tokens, abt lowers trigger to fit, and abt doctor reports compaction_trigger_exceeds_model_window.
Code interpreter (experimental)
Runs JavaScript in a QuickJS sandbox, declared as a code_interpreter: entry. Its keys set heap and time limits, REPL persistence (mode: thread, turn or call) and snapshot signing. The Code interpreter guide has the full reference.
snapshot_signing_key signs mode: thread snapshots with HMAC-SHA256. Signing is off unless you set a key. Generate one with openssl rand -hex 32 and keep it in your secret store, not in committed YAML.
Strict tools (constrained decoding)
flags:
strict_tools: false # default
true binds every tool with strict: true, so the provider compiles a grammar from each tool's schema. output_schema compliance is guaranteed only on models with native structured output. Set it under flags: in abt.yaml; the default is false. On Bedrock, a few tools plus output_schema can exceed the 300 MB grammar limit and fail with ValidationException. See Structured outputs.
MCP tool schema sanitization
flags:
sanitize_mcp_schemas: true # default
Sets additionalProperties: false on every object schema in MCP tools at load time, so providers such as Bedrock accept them. Set false only when an MCP server needs additionalProperties: true, which is rare.
Binary content offload
flags:
offload_binary_content: false # default
With true, images and PDFs read with read_file are written to blobs/ in the run's results directory, and the checkpoint keeps a reference instead of the bytes. Each model call still receives the full content. The setting applies to supervisors, their general-purpose subagent and leaf agents with the filesystem middleware.
- Scope. Only
read_fileresults. Images from other tools, such as MCP, stay in the checkpoint. - Disk. Blobs are removed with their run.
--artifact-direxports leave them out. - Lifetime. Media lasts for the run. A later run on the same thread, or an approval resume after retention pruned the run, sees a notice that the content is unavailable. abt warns at build time for agents with approval-gated tools. Use the flag to keep checkpoints small.
- Rollout. Safe on existing threads, in either direction.
- Failed writes. The payload stays inline, which may exceed the backend's item limit.
Footnote (config.footnote)
The footnote lists agents called, skills, tools and tokens after agent output. All fields are on by default. Each field accepts enabled and max_items (an integer, or null for no cap). tokens: false turns a field off. ABT_SLACK_FOOTNOTE=0 removes footnotes from Slack messages.
config:
footnote:
agents:
max_items: 3
tokens: false
Package tooling (config.packages)
Overrides for installed packages, keyed by package name (for example abt-databricks-tools). Packages declared in abt_packages.yml and installed with abt deps are enabled by default, with read-only tools. Add this block only to override those defaults.
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
false makes shorthand specs from the package fail at compile |
allow_writes |
false |
Package-wide gate for write tools |
disabled_components |
none | Components whose tools do not resolve |
components.<name>.enabled, allow_writes |
inherit | Per-component switches |
limits.request_timeout_seconds |
30 |
Timeout for package tools that call external APIs |
Precedence: agent tool spec, then components.<name>.*, then package keys, then allow_writes: false. See Packages and Config precedence.
Handlers (config.handlers)
Project-wide defaults for lifecycle handlers. agent_defaults.on_success and on_failure run before each agent's own handlers. fail_fast: true escalates the first failure, as --fail-on-handler-error and ABT_HANDLERS_FAIL_FAST do. run_lifecycle runs handlers at run start and end. Unknown keys under config.handlers (at any of these levels) fail compilation.
Compile scope
With -s and a bare agent name, abt compile, test and doctor resolve only that agent's subagents: closure, and manifest.json still lists every agent; only the closure is compiled. See the CLI reference for run and dispatch.
--lazy and ABT_LAZY_CONTEXT keep an existing target/context/, whose files can be stale. abt doctor --tag only narrows which agents it checks. See Context methods.
Workspace path
The agent's /workspace/ tree is backed by <workspace>/target/run_results/. <workspace> defaults to the project root and can be set with abt run --workspace <path> or AGENT_WORKSPACE_DIR. Stateless runs ignore both.
logs/abt.log: Python logging for every invocation in this workspace, with secrets masked. Each command appends, so a command run beside awatchservice never truncates its log and a restart keeps the previous one. The file rotates at 10 MB and keeps 5 older copies (abt.log.1toabt.log.5), so it uses at most about 60 MB. Iflogs/disappears while a service runs (for example a git-sync checkout that replaces the project root), the next record recreates it (0700) and logging continues in the new directory; the earlier log stays where it was and does not follow the swap.target/run_results/<run_id>/run.log: streamed agent output for one run.target/run_results/<run_id>/run_results.json,dag_summary.json: structured results (Run artifacts).target/run_results/<run_id>/mcp_outputs/: large MCP responses written to disk.target/conversations/<run_id>/<agent>.json: prompt, output and token usage. Skip them withABT_WRITE_CONVERSATION_ARTIFACTS=0.
What abt writes to disk
Every run writes its inputs and outputs under the workspace (the project unless you set --workspace or AGENT_WORKSPACE_DIR, in which case the run artifacts go there), with the default file permissions of your user (typically readable by other local accounts). Secret-shaped strings are masked (redaction), except in mcp_outputs/, which holds MCP responses exactly as the server sent them; prompts, answers and personal data are not masked either.
| Path | Holds |
|---|---|
target/conversations/<run_id>/<agent>.json |
The full prompt, the output and token usage. Skip with ABT_WRITE_CONVERSATION_ARTIFACTS=0. |
target/run_results/<run_id>/run_results.json, dag_summary.json |
The final answer of every node, tools used, token counts and handler records. |
target/run_results/<run_id>/model_request.json |
The full system prompt and tool schemas the model received. |
target/run_results/<run_id>/run.log |
The streamed agent output. |
target/run_results/<run_id>/mcp_outputs/ |
Large MCP tool responses. |
logs/abt.log |
Log lines for each invocation. |
ABT_WRITE_CONVERSATION_ARTIFACTS=0 turns off only target/conversations/; the other files are written whatever it says. For sensitive data, run with --stateless, point --workspace at a private directory, or delete target/ with abt clean after the run. Do not commit target/ or logs/, and do not publish them without reviewing them first.
abt clean removes target/. --no-show-llm-output hides LLM output in abt run, --final-response (-fr) prints only the final response, and --debug adds debug logs.
profiles.yaml
Top-level keys are profile names. Each profile sets target (the active output) and outputs (named environments such as dev and prod). Output fields:
| Field | Description |
|---|---|
model_id |
Primary model with its provider prefix, such as bedrock_converse:<bedrock-model-id>. Agents can override it. Some exact model strings also change the system prompt Deep Agents builds; see model_id and the prompt suffix. |
region |
Cloud region |
temperature, max_tokens |
Optional. Omit temperature for models that reject it. max_tokens caps one response (default 10000). |
timeout |
Per-request timeout in seconds |
max_retries |
LLM retries for throttling and 5xx errors. Separate from tool retries. |
model_kwargs |
Extra chat-model keyword arguments. Lowest priority in the merge order. |
credentials |
Namespaced dictionaries for tools and integrations |
env |
Key/value pairs copied into os.environ at startup |
my_team:
target: dev
outputs:
dev:
model_id: bedrock_converse:<bedrock-model-id>
region: eu-central-1
env:
AWS_PROFILE: my-sso-profile
{{ env_var('VAR') }} resolves from the environment after loading. A variable with no default that is unset fails at load time. The env: keys are listed in Environment variables.
Where profiles.yaml is looked up
The loader uses the first location that holds a profiles.yaml:
--profiles-dir(orprofiles_dir=in Python). This is exclusive: a directory withoutprofiles.yamlfails withE_PROFILES_DIR_MISSINGand exit code 2.ABT_PROFILES_DIR. A missing directory falls through to the next location.- The project root.
~/.abt/profiles.yaml.
From Python, pass a dict as profile= for an inline profile that stays in memory. See Inline profiles.
Multiple targets
Define several outputs: (for example dev, staging and prod). The profile's target is the default, and --target overrides it per run.
Env-var-only targets
With no profiles.yaml, define a target from ABT_TARGET__<TARGET>__* variables, for example in a Kubernetes Secret or CI job. profiles.yaml wins when it already has the target. It is a fallback for a missing target, applied as a whole rather than field by field. __ is the only nesting delimiter.
| Variable | Sets |
|---|---|
ABT_TARGET__<T>__MODEL_ID, REGION, TEMPERATURE, MAX_TOKENS, TIMEOUT, MAX_RETRIES |
The same-named scalar field |
ABT_TARGET__<T>__CREDENTIALS__<ns>__<field> |
credentials[ns][field] |
ABT_TARGET__<T>__ENV__<key> |
env[key] |
ABT_TARGET__<T>__MODEL_KWARGS__<key> |
model_kwargs[key] |
ABT_TARGET__<T>__PROVIDERS__<name>__<field> |
type, model_id or region |
export ABT_TARGET=dev
export ABT_TARGET__DEV__MODEL_ID=bedrock_converse:<bedrock-model-id>
export ABT_TARGET__DEV__REGION=eu-central-1
abt run -s my_agent -p "Hello"
If profiles.yaml has the target, the file wins and abt logs a warning. An unrecognized segment, such as CREDENTIAL, raises E_PROFILE_ENV_MALFORMED.
Runtime config and profile
The CLI and AgentBuildTool call activate_project() at startup, which loads both files. Tool code reads them with get_profile() and get_project_config(). Calling either before activation raises an error.
The SDK can keep profile env: out of os.environ with publish_profile_env=False, and AbtRunner does the same for its own calls. The interactive abt CLI keeps the default.
profiles.yaml.example
An optional template with placeholder values, for teammates who create their own profiles.yaml. Never commit real tokens. abt init writes a gitignored profiles.yaml directly, so a template is only needed for version control.