Skip to main content

Export Schema Reference

This page documents the stable machine contract produced by agentxchain export and checked by agentxchain verify export.

This is not protocol v7 conformance. Export artifacts are an operator-facing audit and automation surface. They matter, but they are not part of the current protocol-v7 proof set. For the constitutional boundary, see Protocol Reference v7.

Choose The Right Surface

Do not treat the export artifact as self-explanatory transport data. AgentXchain has four adjacent operator surfaces here, and they are not interchangeable:

  • agentxchain export writes the raw portable artifact documented on this page.
  • agentxchain audit reads the live current repo/workspace, builds a fresh artifact, verifies it, and renders the derived governance summary.
  • agentxchain report --input <file> reads an existing export artifact and renders that derived summary without touching live repo state.
  • agentxchain replay export <file> reads an existing export artifact into a temporary read-only dashboard workspace for interactive inspection.

That distinction matters even more for coordinator artifacts. Partial coordinator exports where repos.<repo_id>.ok === false are still valid report/replay inputs: report keeps repo_ok_count / repo_error_count plus the failed repo row and error, while replay export restores a minimal placeholder governed repo instead of inventing a missing child export. audit only applies to a live workspace you are standing in, not a saved artifact.

Version And Kinds

Current export artifact schema:

FieldValue
schema_version0.3
Run artifact export_kindagentxchain_run_export
Coordinator artifact export_kindagentxchain_coordinator_export

File Entry Contract

Every entry under files is keyed by its repo-relative path and carries the same shape:

FieldMeaning
formatParsed view type: json, jsonl, or text
bytesOriginal file byte length
sha256SHA-256 digest of the original file bytes
content_base64Original raw bytes, base64-encoded
dataParsed JSON/JSONL value or raw UTF-8 text

content_base64 is the important part. verify export decodes it, re-derives bytes, re-derives sha256, and then proves that data still matches the decoded JSON, JSONL, or text payload. Without content_base64, the digest fields would just be self-reported metadata.

Run Export Shape

agentxchain export produces this top-level shape when run from a governed project:

KeyMeaning
schema_versionExport artifact schema version
export_kindAlways agentxchain_run_export for this shape
exported_atISO timestamp for artifact creation
project_rootRelative path from the current working directory to the governed project root
projectProject identity and normalized governed metadata
summaryDerived run summary for quick inspection
filesRepo-native audit files keyed by relative path
configRaw agentxchain.json content
stateParsed .agentxchain/state.json content
workspaceSource checkout metadata used for cross-machine continuity restore decisions

project

FieldMeaning
idconfig.project.id
nameconfig.project.name
goalOptional config.project.goal, or null when unset
templateConfigured template or implicit generic
protocol_modeExported run protocol mode
schema_versionGoverned config schema version

summary

FieldMeaning
run_idCurrent governed run id or null
statusCurrent run status or null
phaseCurrent phase or null
workflow_phase_orderOrdered array of unique phase names from the project's routing config, or null when no routing is defined. When present it must be non-empty and include summary.phase. Used by diff --export for phase-aware regression detection and phase-order drift warnings
project_goalOptional project goal copied from project.goal, or null when unset
active_turn_idsSorted keys from state.active_turns
retained_turn_idsSorted keys from state.retained_turns
history_entriesCount of .agentxchain/history.jsonl records
decision_entriesCount of .agentxchain/decision-ledger.jsonl records
hook_audit_entriesCount of .agentxchain/hook-audit.jsonl records
notification_audit_entriesCount of .agentxchain/notification-audit.jsonl records
dispatch_artifact_filesNumber of files under .agentxchain/dispatch/
staging_artifact_filesNumber of files under .agentxchain/staging/
intake_presentWhether any .agentxchain/intake/ file exists
coordinator_presentWhether any .agentxchain/multirepo/ file exists inside the governed repo
provenanceRun provenance metadata (trigger, parent_run_id, created_by) — null when absent
inherited_contextRead-only summary inherited from a parent run via --inherit-contextnull when absent
dashboard_sessionSnapshot of local dashboard-daemon status at export time
delegation_summaryDelegation chain summary derived from accepted history — null when history is unavailable
repo_decisionsCross-run repo-level decisions — null when no repo decisions exist
export_files_truncatedtrue when maxExportFiles cap was applied and some collected files were omitted from the export
total_collected_filesTotal number of files found before any maxExportFiles cap
included_filesNumber of files actually included in the export files object

summary.repo_decisions

When present (non-null), provides a structured view of repo-level decisions that persist across runs:

FieldMeaning
totalTotal number of repo decisions (active + overridden)
active_countNumber of currently active repo decisions
overridden_countNumber of overridden repo decisions
activeArray of active decisions (id, category, statement, role, run_id, overrides, durability, authority_level, authority_source)
overriddenArray of overridden decisions (id, overridden_by, statement, overrides, durability, role, authority_level, authority_source)
operator_summaryCompact first-glance significance block for operator surfaces

summary.repo_decisions.operator_summary

FieldMeaning
active_categoriesSorted unique categories from active repo decisions
highest_active_authority_levelHighest active decision authority level, or null when authority is not configured
highest_active_authority_roleRole holding the highest active authority, or null
highest_active_authority_sourceAuthority source (configured, human_default, unknown_role) or null
superseding_active_countNumber of active repo decisions that explicitly supersede earlier decisions
overridden_with_successor_countNumber of overridden repo decisions with a recorded overridden_by successor

summary.dashboard_session

Every current run export includes a dashboard-session snapshot object:

FieldMeaning
status"running", "pid_only", "stale", or "not_running"
pidLive/stale PID when known, else null
urlDashboard URL when session metadata exists, else null
started_atSession start timestamp when known, else null

This is an export-time operator snapshot, not protocol state. It is derived at export time using the same dashboard-session logic used by doctor and status --json.

This field is intentionally local and machine-specific:

  • it records what the exporting workspace observed at export time
  • verify export validates only the stored object shape and status-consistent invariants
  • verifier-clean artifacts do not prove a live dashboard is still running on some later machine
  • downstream surfaces such as agentxchain report may render this snapshot, but they must treat it as artifact metadata rather than re-probing live daemon state through the export contract

summary.delegation_summary

When present (non-null), provides a structured view of delegation chains:

FieldMeaning
total_delegations_issuedTotal number of delegations across all parent turns
delegation_chainsArray of delegation chain objects

Each delegation chain object:

FieldMeaning
parent_turn_idTurn that issued the delegations
parent_roleRole that delegated
delegationsArray of individual delegation entries
review_turn_idTurn that reviewed the delegation results, or null if pending
outcome"completed", "failed", "mixed", or "pending"

Each delegation entry:

FieldMeaning
delegation_idUnique delegation identifier
to_roleRole the sub-task was delegated to
charterDescription of the delegated work
status"completed", "failed", or "pending"
child_turn_idTurn that executed the delegation, or null if not yet executed

This is a derived export summary, not an independent authority ledger:

  • it is reconstructed from embedded .agentxchain/history.jsonl delegation records
  • verify export fails closed when the summary disagrees with that embedded history
  • operator-facing surfaces may render the summary for convenience, but the underlying history remains the authority inside the artifact

Included governed roots

When present, the run export collects:

  • agentxchain.json
  • TALK.md
  • .agentxchain-dashboard.pid
  • .agentxchain-dashboard.json
  • .agentxchain/state.json
  • .agentxchain/session.json
  • .agentxchain/history.jsonl
  • .agentxchain/decision-ledger.jsonl
  • .agentxchain/repo-decisions.jsonl
  • .agentxchain/lock.json
  • .agentxchain/hook-audit.jsonl
  • .agentxchain/hook-annotations.jsonl
  • .agentxchain/run-history.jsonl
  • .agentxchain/events.jsonl
  • .agentxchain/notification-audit.jsonl
  • .agentxchain/schedule-state.json
  • .agentxchain/schedule-daemon.json
  • .agentxchain/continuous-session.json
  • .agentxchain/human-escalations.jsonl
  • .agentxchain/sla-reminders.json
  • .agentxchain/dispatch/**
  • .agentxchain/staging/**
  • .agentxchain/transactions/accept/**
  • .agentxchain/intake/**
  • .agentxchain/missions/**
  • .agentxchain/multirepo/**
  • .agentxchain/reviews/**
  • .agentxchain/proposed/**
  • .agentxchain/reports/**
  • .planning/**

Missing optional roots are skipped. The exporter snapshots repo-native audit evidence; it does not sweep arbitrary source files into the artifact.

workspace.git

Run exports now include a source-checkout portability block:

FieldMeaning
is_repoWhether the source export came from a git-backed checkout
head_shaSource HEAD commit SHA or null
dirty_pathsAll dirty tracked/staged/untracked paths in the source checkout
restore_supportedtrue only when the export is safe to restore into another checkout in this slice
restore_blockersExact reasons restore is unsafe, typically dirty product files outside the governed continuity roots

This metadata is for agentxchain restore, not protocol conformance. A run export can still be a valid audit artifact when restore_supported is false.

Coordinator Export Shape

When run from a coordinator workspace rooted by agentxchain-multi.json, the exporter emits:

KeyMeaning
schema_versionExport artifact schema version
export_kindAlways agentxchain_coordinator_export for this shape
exported_atISO timestamp for artifact creation
workspace_rootRelative path from the current working directory to the coordinator root
coordinatorCoordinator project metadata
summaryDerived coordinator summary
filesCoordinator-level audit files keyed by relative path
configRaw agentxchain-multi.json content
reposPer-repo export status and nested governed exports

coordinator

FieldMeaning
project_idconfig.project.id or null
project_nameconfig.project.name or null
schema_versionCoordinator config schema version
repo_countNumber of entries in config.repos
workstream_countNumber of entries in config.workstreams

summary

FieldMeaning
super_run_idCurrent coordinator run id or null
statusCurrent coordinator status or null
phaseCurrent coordinator phase or null
workflow_phase_orderOrdered array of unique phase names from the coordinator's routing config, or null when no routing is defined. When present it must be non-empty and include summary.phase
repo_run_statusesRaw coordinator repo status snapshot derived from .agentxchain/multirepo/state.json
barrier_countNumber of barrier objects in .agentxchain/multirepo/barriers.json
history_entriesCount of .agentxchain/multirepo/history.jsonl records
decision_entriesCount of .agentxchain/multirepo/decision-ledger.jsonl records
aggregated_eventsMerged child-repo lifecycle events: total_events, repos_with_events, event_type_counts, and time-sorted events array with repo_id on each entry

summary.repo_run_statuses is coordinator-state metadata. It records what the coordinator workspace believed about each child repo at export time, even when those labels are coarse linkage states like linked or initialized.

Operator-facing comparison and reporting surfaces use a stricter boundary. When a nested child export is readable, agentxchain diff --export, agentxchain report, and agentxchain audit derive child repo status from that nested repo authority first. Those commands may still preserve summary.repo_run_statuses as coordinator metadata, but they must not treat it as the primary repo-status truth when child authority exists.

repos

Each repos.<repo_id> entry has this contract:

FieldMeaning
oktrue when the child repo exported successfully, else false
pathChild repo path from agentxchain-multi.json
exportFull nested agentxchain_run_export when ok is true
errorNon-empty failure message when ok is false

The coordinator export does not fail just because one child repo export fails. Instead it records the bad repo as ok: false with an error string and still emits the coordinator artifact. That keeps coordinator-level evidence inspectable even when one repo is broken or missing.

That partial-export shape is intentional. Downstream commands degrade on purpose instead of inventing a nested repo export that is not there:

  • agentxchain verify export recursively verifies only ok: true child exports and rejects summary.aggregated_events claims that depend on a failed child repo with no embedded export proof.
  • agentxchain report and agentxchain audit still render coordinator-level evidence and per-repo export health, but drill-down fields for the failed child repo stay absent because there is no nested run export to summarize.
  • agentxchain replay export still starts by restoring successful child repos and a minimal placeholder governed repo for the failed path so coordinator views stay readable without pretending the missing child export was embedded.

Included coordinator roots

When present, the coordinator export collects:

  • agentxchain-multi.json
  • .agentxchain/multirepo/state.json
  • .agentxchain/multirepo/history.jsonl
  • .agentxchain/multirepo/barriers.json
  • .agentxchain/multirepo/decision-ledger.jsonl
  • .agentxchain/multirepo/barrier-ledger.jsonl

Each successful child repo entry then embeds the full governed run export for that repo under repos.<repo_id>.export.

Verification Contract

agentxchain verify export currently accepts schema_version: "0.2" and "0.3" artifacts and checks:

  • file-entry integrity by recomputing bytes and sha256 from content_base64
  • data truth for json, jsonl, and text
  • run-export summary fields against exported state and files
  • summary.delegation_summary reconstructed from embedded .agentxchain/history.jsonl — verifies total_delegations_issued and delegation_chains match the history entries
  • summary.repo_decisions reconstructed from embedded .agentxchain/repo-decisions.jsonl — verifies total, active_count, overridden_count, and decision arrays match the file
  • summary.dashboard_session schema validation — verifies status enum, PID/URL/started_at types, and status-consistent invariants (e.g., running requires a PID, not_running requires all-null fields), but does not probe live dashboard state
  • coordinator-export summary fields against exported multirepo state and barriers
  • coordinator summary.aggregated_events consistency against embedded child-repo events.jsonl data when that summary is present
  • recursive verification of each nested child export when repos.<repo_id>.ok === true

Verification Report Shape (--format json)

When verification completes (exit code 0 or 1), the JSON report has this shape:

FieldTypeMeaning
overall"pass" or "fail""pass" when errors is empty, "fail" otherwise
schema_versionstring or nullSchema version from the artifact, or null if missing
export_kindstring or nullExport kind from the artifact, or null if missing
file_countnumberCount of keys in the artifact files map
repo_countnumberCount of keys in repos (coordinator exports), or 0 for run exports
errorsstring[]Structured error strings, each formatted as "<path>: <message>"
inputstringResolved file path or "stdin"

Command Error Shape (exit code 2)

When the input cannot be read or is not valid JSON, the report has a different shape:

FieldTypeMeaning
overall"error"Always "error" for command-level failures
inputstringResolved file path or "stdin"
messagestringHuman-readable error description

If you need CLI usage and exit codes, see the verify export command reference. If you need a human-readable summary derived from a verifier-clean artifact, use Governance Report Reference. If you need the constitutional boundary, go back to Protocol Reference v7.