Advanced: manifest and compile
abt compile produces target/manifest.json: a single JSON snapshot of the project (agents, workflows, skills, MCP sources, context, sources, exposures, retrievers, transformers, triggers) that every other command reads instead of re-parsing source files. This page documents that manifest, how it is built, and how to consume it from outside abt.
The design follows dbt-core's manifest.json: compile once, then let run, dispatch, and docs generate all read the same artifact instead of re-parsing sources.
What compile_manifest() Does
compile_manifest() (in abt.artifacts) runs these steps:
- Creates
ProjectContextfromabt.yamlto resolve paths - Calls
apply_env()to set env vars (needed for settings-based path resolution) - Loads
ProjectConfigforpackage_rootconfiguration - Configures MCP sources from
mcps/*.json(orpaths.mcps) - Calls
AgentDiscovery.discover()to parse allagents/**/*.mdfiles - Calls
AgentDiscovery.validate_dag()-- validates all dependency refs (fromsubagents:frontmatter) exist and graph is acyclic - Converts each
AgentNode(runtime, withPathobjects) toAgentResource(serialisable) - Reads
few_shotsfile contents and embeds them inAgentResource.few_shots(list of strings) - Computes bidirectional
parent_map/child_mapfrom the dependency graph - Scans skill directories for SKILL.md files
- Lists registered MCP sources from the registry
- Resolves
context/**/*.mdand external{{ context.*() }}references intocontexts(compile-time snapshot). By default this walks every agent; withcompile_manifest(..., compile_selector=...)(same asabt compile -s), only the selected agent's upstream delegation closure is expanded (unrelated Confluence/S3/local context is skipped) and only that closure's prompts are rendered (AgentResource.compiled: true) —manifest.jsonitself always contains every agent, matching dbt's manifest invariant; agents outside the selector keep their raw source but carry an emptysystem_prompt. Whenabt runpasses-p/--promptthat matches aprompts/stem,compile_manifestalso includes that prompt template in the context scan so named prompts still resolve{{ context.*() }}. - Discovers
prompts/,sources/,exposures/,retrievers/,transformers/, andtriggers/; compiles prompt templates toprompts[].compiled_content(with compile-timevar()/context.*()resolved;{{ source(...) }}/{{ upstream(...) }}freeze back to their own literal call syntax — the real substitution happens at dispatch time, against whichever predecessor workflow node actually ran, seeabt.core.compose.render_upstream_refs), type-preserving Jinja render ofconfig:on sources and exposures (template strings only; ints/bools unchanged), and validates exposure reachability (every exposure not markedadhoc_onlymust appear as an exposure-kind node in some workflow's own edges). There is nosources:/exposures:key on an agent — both are workflow nodes (see Workflows). - Optionally enriches
metadata.default_modelfrom the active profile (if already loaded) - Returns a
WritableManifest
The function does not require a profiles.yaml. When one is present it is loaded, so an env_var(...) in its env: block that is not set fails the compile (E_ENV_VAR_MISSING) — export it (a placeholder is enough) or drop the profiles.yaml in credential-free CI. Unset values under credentials: do not fail a whole-project compile; a scoped compile (-s) still fails when a selected agent's namespace is missing.
WritableManifest Schema (v2)
{
"metadata": {
"abt_version": "0.0.1",
"schema_version": "v2",
"generated_at": "2026-03-26T12:00:00.000000+00:00",
"invocation_id": "550e8400-e29b-41d4-a716-446655440000",
"project_name": "my-project",
"default_model": "openai:gpt-4.1-mini"
},
"agents": {
"montecarlo-investigator": {
"unique_id": "agent.my-project.montecarlo-investigator",
"name": "montecarlo-investigator",
"description": "Investigate Monte Carlo data quality alerts...",
"source_path": "agents/montecarlo-investigator.md",
"model_id": null,
"temperature": 0.2,
"tools": ["montecarlo__search", "montecarlo__getTable"],
"skills": ["/.agents/skills/investigate-mc-alerts/"],
"activates": [],
"few_shots": [],
"raw_system_prompt": "",
"runtime_system_prompt": "You are the Monte Carlo investigation specialist...",
"runtime_system_prompt_no_file_tools": "You are the Monte Carlo investigation specialist...",
"system_prompt": "You are the Monte Carlo investigation specialist..."
},
"mock-incident": {
"unique_id": "agent.my-project.mock-incident",
"name": "mock-incident",
"description": "Coordinates incident response...",
"source_path": "agents/mock-incident/mock-incident.md",
"model_id": null,
"temperature": 0.2,
"tools": [],
"skills": [],
"activates": [
{"name": "montecarlo-investigator", "model_id_override": null, "temperature_override": null}
],
"few_shots": [],
"raw_system_prompt": "",
"runtime_system_prompt": "...",
"runtime_system_prompt_no_file_tools": "...",
"system_prompt": "..."
}
},
"workflows": {
"support_ticket": {
"unique_id": "workflow.my-project.support_ticket",
"name": "support_ticket",
"description": "Triage an inbound ticket, resolve it, close it out",
"trigger": "support_event",
"max_iterations": null,
"edges": [
{"source": "START", "target": "triage"},
{
"source": "triage",
"conditions": [
{"field": "route", "op": "eq", "value": "refund", "target": {"agent": "refund", "response": null}},
{"field": "route", "op": "eq", "value": "escalate", "target": {"agent": "escalate", "response": null}}
],
"default": {"agent": "escalate", "response": null}
}
],
"source_path": "workflows/support_ticket.yaml"
}
},
"parent_map": {
"mock-incident": ["montecarlo-investigator"],
"montecarlo-investigator": []
},
"child_map": {
"montecarlo-investigator": ["mock-incident"],
"mock-incident": []
},
"skills": [
{
"name": "Investigate MC Alerts",
"path": "/.agents/skills/investigate-mc-alerts/",
"source": "local",
"description": "...",
"keywords": ["montecarlo", "alerts"],
"content": "Full SKILL.md content..."
}
],
"mcps": [
{"name": "montecarlo", "transport": "http", "url": "https://api.montecarlo.io"}
],
"contexts": [
{
"name": "platform-overview",
"provider": "local",
"source": "context/platform-overview.md",
"content": "# Platform\\n\\n…",
"used_by": ["agent:mock-incident"]
}
],
"test_suites": [],
"sources": {
"ticket": {
"unique_id": "source.my-project.ticket",
"name": "ticket",
"type": "jira_issue",
"description": "",
"credentials_ns": "jira",
"config": {"issue_key": "{{ var('ticket_id') }}"},
"deferred_config": [],
"io_required_var_names": ["ticket_id"],
"freshness": {},
"source_path": "sources/ticket.yaml",
"used_by": ["triage"],
"tags": []
}
},
"exposures": {
"ticket_writeback": {
"unique_id": "exposure.my-project.ticket_writeback",
"name": "ticket_writeback",
"type": "jira_comment",
"description": "",
"credentials_ns": "jira",
"config": {},
"deferred_config": [],
"io_required_var_names": [],
"freshness": {},
"source_path": "exposures/ticket_writeback.yaml",
"tags": [],
"adhoc_only": false
}
},
"prompts": {
"close_out": {
"unique_id": "prompt.my-project.close_out",
"name": "close_out",
"source_path": "prompts/close_out.md",
"content": "Write the closing note summarizing the resolution.",
"compiled_content": "Write the closing note summarizing the resolution.",
"description": "",
"tags": []
}
},
"retrievers": {},
"transformers": {
"pii_redact": {
"unique_id": "transformer.my-project.pii_redact",
"name": "pii_redact",
"type": "pii_redact",
"description": "",
"credentials_ns": "pii_redact",
"config": {},
"prompt_ref": null,
"model_id": null,
"temperature": null,
"source_path": "transformers/pii_redact.yaml",
"tags": []
}
},
"triggers": {
"every_morning": {
"unique_id": "trigger.my-project.every_morning",
"name": "every_morning",
"type": "cron",
"description": "",
"credentials_ns": "cron",
"config": {"schedule": "0 8 * * *"},
"filter": {},
"enabled": true,
"source_path": "triggers/every_morning.yaml",
"tags": []
}
},
"handlers": {},
"tools": {},
"tool_import_errors": [],
"project_config": {"recursion_limit": null, "checkpoint": null, "approvals": null, "handlers": {}, "...": "..."},
"benchmarks": {}
}
Key Fields
| Field | Description |
|---|---|
metadata.schema_version |
Current value is "v2". It changes when the schema changes in a breaking way. |
workflows |
Topology from one file per workflow under workflows/, keyed by workflow name — WorkflowResource: trigger, max_iterations, and edges (PlainEdge: source/target; ConditionalEdge: source/conditions/default, desugared uniformly whether authored as steps:, when:/cases:, or conditions:). The single source of truth for order and branching — see Workflows. |
sources |
Standalone sources/*.yaml, keyed by name — same grain as agents. Referenced by name from a workflow's own edges: (a source node, wired ahead of the agent that reads it). deferred_config lists the paths in config that are rendered when the source runs (strings that use env_var(), and strings inside nested maps or lists); every other string is final text. |
exposures |
Standalone exposures/*.yaml, keyed by name. Referenced by name from a workflow's own edges: (an exposure sink node, wired after the agent whose result it delivers). deferred_config works as on sources. |
retrievers |
Standalone retrievers/*.yaml (StandaloneRetrieverResource), keyed by name. Referenced from an agent's own retrievers: list. |
transformers |
Standalone transformers/*.yaml (StandaloneTransformerResource), keyed by name. Referenced from an agent's own transformers: list. |
triggers |
Standalone triggers/*.yaml (StandaloneTriggerResource), keyed by name. enabled: false unless the YAML sets it explicitly; dormant triggers are skipped by abt watch. Referenced by bare name from a workflow's own trigger: field. |
prompts |
Named user-message templates from prompts/**/*.md, keyed by path (minus .md). Referenced by name from a workflow's own edges: (a prompt node), or passed via -p/--prompt on abt run/abt dispatch. |
handlers |
Discovered Handler subclasses under paths.handlers, keyed by class name. |
tools |
Python tools from paths.tools and installed packages, keyed by tool name: description, args_schema (JSON Schema), origin (project, or package:<directory> for an installed package) and file (the name of the module that exposes it). Compile checks agents' tools: against it; the runtime imports a tool's module from here on first use. |
tool_import_errors |
Tool modules that failed to import at compile, each with its error message and the tool_names it declares. Their tools are absent from tools. |
project_config |
The compiled abt.yaml config: (+ top-level approvals: and agents.<name>.config overlays as agent_overrides), var()-rendered and validated. handlers is resolved against the handler registry. The runtime's only view of project settings. |
benchmarks |
benchmarks/*.yaml, keyed by file name, checked against the compiled workflows — see Benchmarks. Empty for a selective compile (-s). |
metadata.invocation_id |
UUID4, unique per compile run. Useful for tracing. |
metadata.default_model |
The active profile's model ID, for display fallback in docs. Empty if no profile was loaded. |
metadata.env_vars |
Names (never values) of env vars env_var() resolved during compile; the partial-parse cache re-checks their values. |
agents |
Dictionary keyed by agent name. Each entry is an AgentResource. |
agents[].unique_id |
"agent.<project_name>.<name>" -- globally unique identifier. |
agents[].raw_system_prompt |
Markdown body before template expansion. Empty for .py agents. Needed to re-extract context.*() refs (selective/lazy compile); not runnable as-is. |
agents[].runtime_system_prompt |
Rendered prompt actually sent to the LLM when file tools are available: large context.*() content becomes a /workspace/context/... file pointer instead of being inlined. |
agents[].runtime_system_prompt_no_file_tools |
Rendered prompt actually sent to the LLM when file tools are unavailable: context content is inlined, and subject to each context.*(max_chars=...) truncation (must fit in the prompt with no file-tool fallback). |
agents[].system_prompt |
Manifest/docs-facing snapshot: context content always inlined in full, never truncated. Empty string for Python-defined agents (dynamic prompts cannot be statically compiled). Byte-identical to runtime_system_prompt_no_file_tools in the common case (no context.*() refs, or none with max_chars set) — but not interchangeable with it. |
agents[].few_shots |
List of file contents (already read from disk). Self-contained. |
agents[].activates |
List of ActivatesRef with optional model_id_override and temperature_override. Populated from the agent's own subagents: frontmatter — activates is the manifest field name. |
parent_map |
Agent → list of agents it activates (upstream). |
child_map |
Agent → list of agents that activate it (downstream). |
CLI Usage
# Validate + write target/manifest.json (default)
abt compile --project-root .
# Validation only -- no file written (CI lint check)
abt compile --project-root . --no-manifest
# Also start MCP servers, and fail on a failed external-context or remote-skill fetch (a default compile only warns)
abt compile --project-root . --live
# Skip the partial_parse.msgpack cache (always recompute)
abt compile --project-root . --no-partial-parse
# Docs: compile manifest internally, write it, then render HTML from it
abt docs generate --project-root .
Partial parse cache (partial_parse.msgpack)
On every successful compile, the workflow writes
target/partial_parse.msgpack alongside manifest.json. On the next compile,
abt recomputes a fingerprint over: the abt version; size + mtime of every
file under each compile-relevant dir resolved from abt.yaml paths:
(agents/, prompts/, sources/, exposures/, retrievers/,
transformers/, triggers/, mcps/, tests/, contracts/, few_shots/,
tools/, providers/, handlers/, macros/, skills/ — all configured
dirs, defaulting to .abt/skills); the top-level
abt.yaml/abt.yml, profiles.yaml/profiles.yml, and
abt_packages.yml/abt_packages.yaml; the active profile identity when one is
set (type, model_id, region, temperature, max_tokens — so switching
--target invalidates the cache); plus CLI template vars, --live,
--lazy, selector, and prompt stem. If the fingerprint matches, the manifest
is loaded directly from msgpack (≈1 order of magnitude faster than a full
compile); if not, abt falls back to a full compile and rewrites the cache.
Disable the cache with --no-partial-parse on the CLI, or globally with
ABT_PARTIAL_PARSE=0. abt clean removes it.
Live compile
compile_manifest(..., live=True) (CLI: --live) makes compile start the project's MCP servers to list their tools, and fail when
an external-context or remote-skill fetch fails, so you get a true snapshot. By default MCP tool lists are
deferred to runtime and a failed fetch only warns; all other compile steps (template expansion, context
materialization, agent wiring) run as normal, and a local mistake such as an invalid agent file or an unknown tool
still fails immediately. Leave live off for inner-loop work when MCP sources are unavailable or slow; use it in
CI. See Live compile.
Output of abt compile:
Manifest ready (2 agents).
Compiled 2 agent(s).
Manifest written to: target/manifest.json
Compiled 3 file(s) to: target/compiled/<project> (agents: 2, prompts: 1)
abt compile does not require a profiles.yaml. It tries to load one (to populate default_model in metadata) and continues if none is found. If one is found, every env_var(...) in its env: block must resolve, or the compile stops with environment variable '<NAME>' is not set and no default was given. Credentials under credentials: are resolved only when a selected agent needs them, so a compile never fails for an API key that no compiled agent uses.
How abt run and abt dispatch Use the Manifest
abt run --manifest <path> (manifest-only)
abt run and abt dispatch both accept --manifest PATH to skip the
project bootstrap and compile entirely: the file on disk is the single
source of truth. This matches dbt's "the manifest is the project" discipline
and enables:
- CI deploy artifacts — compile once, ship
manifest.json, run against it anywhere without cloning sources. - Reproducible replay — record a compile in one environment, run in another with zero source-file dependencies.
- Fast cold starts — no agent discovery, no YAML scanning, no context resolution.
abt compile --project-root . # once
abt run --manifest target/manifest.json -s assistant -p "hi"
abt dispatch --manifest target/manifest.json -s my_workflow
A valid profiles.yaml is still required for anything that actually calls a
model, but agent definitions are never re-parsed.
abt dispatch -s <workflow> (dispatch a workflow)
abt dispatch only accepts a workflow name from a workflow file under workflows/ — no sigils and no
selector flags. Given a known agent name instead it redirects with a clear
error: 'triage' is an agent, not a workflow. `abt dispatch` only accepts workflow names — use
`abt run -s triage` to run it.
- Compile: bootstrap passes
compile_selectorso the manifest slice matches the workflow's agent set (same idea asabt compile -s). - Select:
resolve_workflow_selection(manifest, name)→WorkflowResource— the workflow-only mirror ofresolve_selection. Raises a redirect-shaped error when name is a known agent instead (pointing atabt run). - Execute: the workflow runner walks
steps:/edges:fromSTART, dispatching each node in turn. Source and prompt nodes compose the turn an agent node sees; each agent node then runs its ownretrievers:, runs the turn, applies its owntransformers:, and any exposure node wired after it dispatches the moment that agent succeeds — independent of whether the rest of the workflow later succeeds or crashes (--exposeoverrides with an ad-hoc route instead of the catalog exposures). Conditional edges (when:/cases:orconditions:) readoutput.<field>from the source node'soutput_schemato pick the next node;default:is required and structurally guarantees a match.
abt run -s <agent> (rehearse an agent)
abt run only accepts an agent name — plus its full subagents: delegation tree,
unbounded. It never runs a workflow neighbor; workflow isolation is structural, not a flag.
Given a known workflow name instead it redirects: 'support_ticket' is a workflow, not an
agent.abt runonly accepts agent names — useabt dispatch -s support_ticketto run it.
- Compile: same selector-scoped compile as
abt dispatch. - Select:
resolve_selection(manifest, name)→SelectedAgent(the agent plus its full upstreamsubagents:closure — no depth argument, no isolation mode). - User message:
-p/--prompt— literal text, or aprompts/stem when it matches. - Exposures:
abt rundoes not fetch sources or dispatch exposures; useabt dispatch -s <workflow>for that.
Agent definitions are parsed exactly once per invocation for manifest build + selector resolution. The manifest eliminates duplicate parsing of Markdown agents, even though Python-defined agents may still be re-imported by resource_to_node() to rebuild AgentNode.system_prompt.
At run time, the manifest's serialised agent entries are converted back to the runtime agent objects, so the same run machinery works for manifest-only runs and for runs that compile first.
How Docs Generation Uses the Manifest
abt docs generate calls compile_manifest(), writes target/manifest.json, then passes the WritableManifest object to abt.docs.generate() with an explicit project root (so tool discovery does not fall back to an arbitrary cwd). The docs renderer calls build_data_from_manifest(manifest, project_root=…) which:
- Converts
AgentResourceobjects to the JSON format the HTML template expects - Resolves skill paths (from
manifest.skills) against each agent'sskillslist - Builds subagent detail cards by looking up manifest
activatesnames inmanifest.agents - Computes MCP
used_byfrom all agents'tools(any"mcp_name:tool"spec) - Discovers
@toolcallables underpaths.tools(same as runtime: modules are imported) and addspython_toolsfor the Integrations tab;ABT_DOCS_SKIP_PYTHON_TOOLSskips that import (see Environment variables) - Labels
few_shotsasTrajectory 1,Trajectory 2, etc. - Builds the entrypoint list (workflows with a
trigger:— the "what can I press?" view) and the per-agent Catalog cards: sources, exposures, retrievers, transformers are each owned by the agent that declares them and are surfaced directly on that agent's row — there is no separate workflow-level catalog. - The Lineage graph shows agent nodes (
subagents:delegation edges), workflow edges (plain and conditional, from workflow files underworkflows/), context nodes (used_by→ agent), and source / prompt / exposure workflow-node cards wired in at their real position in each workflow's own edge graph (not agent-owned — see Workflows), plus trigger nodes wired to their workflow's entry agent. MCP, tool, and skill usage get their own node types and edges too. Clicking a source/exposure node shows itstype/credentials; clicking a prompt node shows its content preview and whether it's static text or templated with{{ var(...) }}/{{ upstream(...) }}/etc.
The HTML renderer receives a plain dict and renders it (no second pass over agent source files).
abt.docs.generate() is manifest-first and passes project root into build_data_from_manifest() so the Integrations tab can list both MCP sources and Python tools.
Using the Manifest from External Tools
The manifest is a standard JSON file. Any tool that can read JSON can consume it.
Example: list all agents with their tools (shell)
cat target/manifest.json | python3 -c "
import json, sys
m = json.load(sys.stdin)
for name, agent in m['agents'].items():
print(f'{name}: {agent[\"tools\"]}')
"
Example: load in Python
import json
from pathlib import Path
from abt.artifacts import WritableManifest
manifest = WritableManifest.model_validate_json(
Path("target/manifest.json").read_text()
)
# Find all agents with upstream dependencies in the manifest
with_upstream = [a for a in manifest.agents.values() if a.activates]
# Traverse upstream dependencies
def upstream(name: str) -> list[str]:
return manifest.parent_map.get(name, [])
# Find agents using a specific MCP
mc_agents = [
name for name, a in manifest.agents.items()
if any(t.startswith("montecarlo__") for t in a.tools)
]
Example: check for system prompt changes in CI
import json
from pathlib import Path
old = json.loads(Path("old/manifest.json").read_text())
new = json.loads(Path("target/manifest.json").read_text())
for name, agent in new["agents"].items():
old_prompt = old["agents"].get(name, {}).get("system_prompt", "")
if agent["system_prompt"] != old_prompt:
print(f"CHANGED: {name}")