Key concepts
Short mental model before you dive into Build.
The five to know first
- Agent: a Markdown file. The YAML at the top configures it, and the text below is its system prompt.
- Workflow: a YAML file that connects agents into a graph with
edges:, fromSTARTtoEND. - Source and exposure: a source fetches data into a run (a Slack thread). An exposure delivers the result (a Slack reply).
- Test: a YAML file that sends a prompt to an agent and checks the reply.
- Compile:
abt compilechecks that every name and reference in the project lines up and writestarget/manifest.json. It makes no model call.
Everything else builds on these. The glossary below lists the rest.
Glossary
- Agent: a Markdown file with frontmatter (the YAML block between the
---lines at the top) and a system prompt in the body. A Python agent keeps its metadata in@agent(...)arguments and its system prompt in the function docstring. - Subagent: an agent another agent can call as a tool, declared under
subagents:. - Delegating agent: an agent that declares
subagents:. It gets theread_file,lsandglobtools unless it setsexpose_fs_tools: false, and thetasktool unless the general-purpose subagent is disabled and it has no synchronous subagents. The advanced template's last agent is namedsupervisorand declares nosubagents:, so it is a plain agent. - Plain agent: an agent with no
subagents:. It has no file tools. - Delegation: a delegating agent calling a subagent as a tool during its own turn. It never sets run order.
- Sequential: running one node after another along a workflow's
edges:. It names an order, not a kind of agent. - Source: a workflow node, defined in
sources/*.yaml, that fetches data before an agent's turn, such as a Slack thread. The server files undermcps/are called MCP sources; they are a different thing. - Exposure: a workflow node, defined in
exposures/*.yaml, that delivers an agent's result afterward, such as a Slack reply. - Workflow: a YAML file under
workflows/that wires sources, prompts, agents and exposures into a graph withedges:. - Prompt: the user message for a run: literal text, or the stem of a file under
prompts/, passed with-p. A prompt can also be a node in a workflow'sedges:: the prompt node composes the next agent's turn and reads earlier nodes with{{ upstream('name') }}. The agent's system prompt is the body of its agent file. - Retriever: a standalone resource that fetches reference material, such as Confluence pages or Jira issues, for an agent's prompt.
- Transformer: a standalone resource that post-processes an agent's output, such as redacting PII or validating JSON.
- Trigger: a standalone resource that starts a workflow automatically, such as on a cron schedule or a Jira event.
- Context: text that Jinja (a templating language:
{{ ... }}placeholders) inserts into prompts at compile time, such as{{ context.local(...) }}.{{ upstream('name') }}is different: it is filled while the workflow runs. - Tool: a Python function decorated with
@toolundertools/, listed undertools:in agent frontmatter, that the model can call. - MCP (Model Context Protocol): a JSON file under
mcps/that connects an external tool server. Its tools are listed assource__tool_name. - Skill: a
SKILL.mdinstruction pack the model reads at run time. An agent opts in withskills:. - Contract: a Pydantic model (a Python class that declares typed fields) under
contracts/that an agent'soutput_schema:points to. It fixes the shape of the agent's own output. - Handler: a Python class under
handlers/that runs on a lifecycle event. An agent references it fromon_success:oron_failure:; project-wide,config.handlers.run_lifecycleruns it onon_startandon_endof a run. - Profile: a named block in
profiles.yamlthat holds model settings and credentials.profile:inabt.yamlselects it. - Target: a named environment inside a profile, such as
devorprod, chosen with--targetorABT_TARGET. Thetarget/folder is separate: it holds compile output. - START / END: the reserved workflow nodes. Every edge path begins at
STARTand must reachEND.
Coming from dbt
The commands look alike, and several names mean something different. Check this table first.
| dbt | abt | The difference that bites |
|---|---|---|
source |
source |
A dbt source declares a raw table that models read. An abt source fetches data (a Slack thread, a Jira ticket) into a run, as a workflow node ahead of an agent. |
exposure |
exposure |
A dbt exposure documents a downstream consumer and does nothing. An abt exposure delivers an agent's result (a Slack reply, a Jira comment, a file) when the workflow runs. abt dispatch --skip-exposures turns delivery off. |
dbt run |
abt run -s <agent> |
dbt run builds every selected model. abt run runs one agent and its subagents:, with no sources and no exposures. The closest match to "run the pipeline" is abt dispatch -s <workflow>. |
dbt test |
abt test |
dbt asserts on built tables with SQL. abt sends each test prompt to the agent and checks the reply with exact matches, schemas or an LLM judge, so it spends tokens. abt test --dry-run lists the cases without a model call. |
dbt compile, manifest.json |
abt compile, target/manifest.json |
Same idea: run, dispatch, test, doctor and docs generate work from the compiled manifest. Compile makes no model call and needs no API key. |
dbt docs generate / serve |
abt docs generate / abt docs serve |
Same two steps, in the same order: serve stops with No docs found. Run abt docs generate first. until generate has run. |
| none | trigger, handler | abt only. A trigger starts a workflow from an event such as a cron schedule, and only fires while abt watch is running. A handler is a Python class that runs on on_success or on_failure of an agent, or on on_start or on_end of a whole abt run or abt dispatch (set under config.handlers.run_lifecycle). |
Compile → run
flowchart LR
A[agents tools sources exposures YAML] --> B["abt compile"]
B --> C[manifest.json]
C --> D["abt run / dispatch / test / doctor"]
D --> E[LLM tools exposures]
- Compile resolves Jinja, context, graph edges, and writes
target/manifest.json(single source of truth for tooling). - Run/dispatch both read the manifest.
abt runexecutes one agent;abt dispatchexecutes a workflow. One execution model, many resource files (sources, exposures, retrievers, transformers, triggers) that an agent or workflow references by name.
Agents
Markdown (or Python @agent) units with frontmatter: tools, optional output_schema, and a prompt body — plus, directly on the agent, retrievers:, transformers:, and subagents: (tool delegation). Sources and exposures are workflow nodes, not agent fields: order, branching, and data-flow edges live only under workflows/ — see Workflows. See Agents.
Running things
abt run -s <agent> runs one agent and its subagents: tree, without sources or exposures. abt dispatch -s <workflow> runs a workflow declared under workflows/, including its sources and exposures. Both take the name after -s; there is no positional form.
| Command | What runs | Who it's for |
|---|---|---|
abt dispatch -s <workflow> |
a workflow under workflows/: its sources, edges and exposures, with side effects |
running a workflow for real |
abt run -s <agent> |
one agent plus its subagents: tree, without sources or exposures; never a workflow's neighbors |
trying one agent |
Naming an agent in abt dispatch fails with 'triage' is an agent, not a workflow. Use abt run -s triage for it instead. Without -s, both commands exit with code 2 and a usage error: abt dispatch prints Missing -s/--select WORKFLOW., and abt run prints its usage line (Usage: abt run -s AGENT -p TEXT …) or Missing -s/--select AGENT (or --auto).
See Workflows and Selectors for the full reference, and CLI for every flag.
Sources, exposures, retrievers, transformers, triggers
Each is a standalone resource file under its own directory. Retrievers and transformers are referenced by name from an agent's frontmatter; sources and exposures are referenced as nodes in a workflow's edges:. The binding syntax is the same everywhere: a bare name, or a single-key mapping that binds runtime vars at the ref site (the mapping form is shown in Agents).
The two blocks below are fragments. To compile them you also need agents/triage.md (the file the first block belongs to), retrievers/web_context.yaml, transformers/pii_redact.yaml, sources/ticket.yaml and exposures/refund_api.yaml. The pages linked under the blocks show each file format.
# agents/triage.md frontmatter (fragment)
retrievers: [web_context]
transformers: [pii_redact]
# workflows/refund.yaml (fragment)
name: refund
edges:
- [START, ticket] # every workflow starts from START
- [ticket, triage] # source node -> agent
- [triage, refund_api] # agent -> exposure node
- [refund_api, END] # every path must reach END
- Sources fetch data before the agent's turn.
- Exposures dispatch the agent's own result afterward — see the exposure-timing rule: they fire on that agent's own completion, not the whole run's.
- Retrievers and Transformers shape context in and result out, respectively.
- Triggers arm a workflow (not an agent) as an
abt watchentrypoint viatrigger:on a workflow underworkflows/; a trigger resource isenabled: falseby default — dormant until you setenabled: true.
Order and branching: workflows/
Workflow files under workflows/ are the only place multi-agent order and branching live —
plain edges ([from, to]) for sequencing, conditional edges (when:/cases: or
conditions:) for branching on an upstream agent's output_schema. No LLM tokens spent
routing; the agent that produces the field is the only one that thinks. See
Workflows.
Context
context/**/*.md plus {{ context.local(...) }} (and other providers) inject compile-time text into prompts. Context.
Tools and MCP
- Tools: Python
@toolundertools/, listed in agent frontmatter. Tools. - MCP: JSON under
mcps/, referenced assource__toolin agent specs. MCP.
Testing
YAML suites under tests/; abt test runs them. Testing.
Next: Build overview.