Run artifacts: run_results.json and dag_summary.json
Every abt run / abt dispatch invocation that writes artifacts (see
Configuration — Workspace path) produces
two JSON files under <workspace>/target/run_results/<run_id>/:
run_results.json— the fullRunResulttree: text output, token totals, per-handler execution records, and guardrail telemetry.dag_summary.json— a flattened, execution-ordered summary of the nodes in the result'sdep_resultstree (name, tokens, timing), head node last. Forabt dispatchit has a row for every workflow node that ran. Forabt run -s agentit has one row, the head agent: delegation throughsubagents:happens inside that agent's own run and adds no rows.
Both files are written by the run and pass
through one redaction pass (see Performance — secrets redaction) that masks
secret-looking dict keys and in-string tokens (Bearer …, ghp_…, xoxb-…)
before anything lands on disk. Consumers (the UploadArtifacts handler, CI
steps) can rely on the shapes below; see
Handlers for shipping them to S3.
run_results.json
{
"metadata": {
"run_id": "…",
"agent_name": "…",
"generated_at": "2026-07-10T12:00:00+00:00",
"elapsed_seconds": 4.201391
},
"result": { /* RunResult, see below */ }
}
Field (metadata.*) |
Type | Description |
|---|---|---|
run_id |
str |
Same id as the target/run_results/<run_id>/ directory. |
agent_name |
str |
Head agent selected for this invocation. |
generated_at |
str |
ISO-8601 UTC timestamp when the artifact was written. Not stable across re-runs with identical inputs. |
elapsed_seconds |
float |
Wall time for the whole invocation (time.monotonic() delta), rounded to 6 decimals. |
result is the run's result object serialized
recursively — each node's dep_results is the same shape, one level per
upstream dependency actually executed:
| Field | Type | Description |
|---|---|---|
ok |
bool |
Whether this node succeeded. |
text |
str |
Final agent output text. |
footnote |
str |
Optional trailing annotation (e.g. truncation notice). |
error |
str |
Non-empty only when ok is false. |
warning |
str |
Non-fatal middleware warning (e.g. guardrail near-limit). |
stop |
object \| null |
Set when a runtime guard ended the run early: {"kind", "detector", "reason"} (kind is the warning value, e.g. loop_detected, budget_exhausted). text is then only what the model wrote (possibly empty), never the guard's own message. See Stopped runs. |
tools_used |
list[str] |
Tool names invoked by this node, in call order. |
skills_used |
list[str] |
Skill names invoked by this node. |
agents_used |
list[str] |
Subagent names this run delegated to through task or start_subagent_task. Distinct from tools_used. |
input_tokens / output_tokens |
int |
Token usage for this node only (excludes dependencies). |
structured |
any \| null |
Parsed value when the agent declares output_schema and validation succeeded. |
agent_name |
str |
Agent that produced this node. |
elapsed_seconds |
float |
Wall time for this node only, not including calendar latency across parallel upstream layers. |
dep_results |
list[RunResult] |
Successful upstream dependency runs (recursive; same shape as this table). |
total_input_tokens / total_output_tokens |
int |
Chain totals — this node plus every node in dep_results, computed bottom-up. |
handlers |
list[HandlerExecutionRecord] |
Lifecycle handler execution records for this node — see below. Always present (empty list if no handlers fired). |
guardrails |
object \| null |
Present when guardrail telemetry was collected, or as {"middleware_warning": "…"} when only warning was set. See below. |
handlers[] (HandlerExecutionRecord)
| Field | Type | Description |
|---|---|---|
class_name |
str |
Handler class name. |
event |
str |
One of on_success, on_failure, on_start, on_end. |
scope |
str |
One of agent, run. |
ok |
bool |
false means the handler raised or timed out. |
elapsed_ms |
float |
Handler execution time. |
error_code |
str |
Non-empty only when ok is false; stable E_HANDLER_* code. |
error_message |
str |
Human-readable error (redacted). |
source |
str |
config (registered in abt.yaml) or frontmatter (declared on the agent). |
This is the authoritative record of every handler invocation — see Handlers for escalation semantics.
guardrails (FrozenRunGuardrailSummary)
| Field | Type | Description |
|---|---|---|
model_calls |
int |
Number of underlying model calls for this node. |
thread_chars_peak |
int |
Peak thread character count observed. |
middleware_warning |
str |
Non-empty when a guardrail middleware raised a soft warning. |
loop_events |
list[{detector, level, tool}] |
Loop-detection hits, if any. |
tools_used_count |
int |
Total tool invocations observed by guardrail middleware. |
dag_summary.json
{
"run_id": "…",
"head_agent": "…",
"agents": [
{ "name": "researcher", "input_tokens": 812, "output_tokens": 340, "ok": true, "elapsed_s": 1.882103 },
{ "name": "writer", "input_tokens": 1200, "output_tokens": 900, "ok": true, "elapsed_s": 2.104711 }
],
"total_input_tokens": 2012,
"total_output_tokens": 1240
}
| Field | Type | Description |
|---|---|---|
run_id |
str |
Same id as run_results.json's metadata.run_id. |
head_agent |
str |
Head agent for this invocation. |
agents |
list[object] |
One row per node in the dep_results tree, in execution order (post-order: predecessors first, each node's own row last). |
agents[].name |
str |
Agent name, or "(unknown)" for hand-built results with no agent_name. |
agents[].input_tokens / output_tokens |
int |
Per-node token usage (not chain totals). |
agents[].ok |
bool |
Per-node success. |
agents[].elapsed_s |
float |
Per-node wall time. |
total_input_tokens / total_output_tokens |
int |
Chain totals across every row (same values as the head node's total_input_tokens/total_output_tokens in run_results.json). |
Neither file currently carries a schema_version field (unlike the
per-turn conversation artifacts under target/conversations/, which do).
Treat the shapes above as the stable contract. A breaking change to either file is called out
in the GitHub release notes rather than silently reshaping the JSON.
File permissions
Files that can hold credentials or fetched content are created readable by the current user only (0600, in 0700 directories) on POSIX systems: profiles.yaml from abt init, target/manifest.json, target/context/, target/compiled/, the partial-parse cache, logs/abt.log with its rotated copies, and the SQLite files for approvals, checkpoints and chat. target/ and logs/ are 0700, which also covers the run results and conversations inside them. abt closes an existing target/ or logs/ it owns the next time it writes there, and closes the files it owns in them to 0600 as well (shared readers of an existing log or database lose access). A directory owned by another user, such as a mounted volume, and a symlinked directory are used as they are; the files abt creates in them are still 0600. abt refuses to write these files into a file owned by another user (root excepted), and SQLite gives its -wal, -shm and -journal files the mode of the database. Windows has no POSIX modes, so nothing changes there.
model_request.json
Written once per run, on the first model call of an agent: the request that call sent to the provider. It shows the system prompt and tool schemas exactly as the provider received them, and the middleware configured for the agent. Credentials inside the prompt text, the tool descriptions and the schema values are masked; schema property names are kept. The file is not written when the run has no run directory or no model call happens. If several agents share a run, the first recorded call wins; on a supervisor run that is the supervisor's first call.
| Field | Description |
|---|---|
schema_version, agent_name, generated_at |
The schema version (v1), the agent whose call was recorded, and the UTC timestamp of the write. |
system_prompt |
Full text of the system message the model received. |
tools[] |
name, description and args_schema (the JSON schema of the arguments) for each tool in the request, in the provider's wire format. |
middleware[] |
The middleware configured for the agent, outermost first. origin is user for entries declared in the agent's middleware: (including inherited ones), and framework for entries abt adds from the agent's config, such as compaction. |
usage |
input_tokens and output_tokens the provider reported for that first call. input_tokens counts the whole request (messages, tools and provider overhead), so compare it with the sum of sizes, not with one section. Absent when the provider reports none. |
sizes |
chars and approx_tokens per section. The token count is a local tiktoken (cl100k_base) estimate, the same one compaction uses. Treat it as a lower bound: Claude models count more tokens for the same text, and providers add their own tool-use overhead. When the tokenizer cannot load its vocabulary (for example offline on a first run), the count falls back to chars / 4. |