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 v6 conformance. Export artifacts are an operator-facing audit and automation surface. They matter, but they are not part of the current protocol-v6 proof set. For the constitutional boundary, see Protocol Reference v6.

Version And Kinds

Current export artifact schema:

FieldValue
schema_version0.2
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

project

FieldMeaning
idconfig.project.id
nameconfig.project.name
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
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

Included governed roots

When present, the run export collects:

  • agentxchain.json
  • .agentxchain/state.json
  • .agentxchain/history.jsonl
  • .agentxchain/decision-ledger.jsonl
  • .agentxchain/hook-audit.jsonl
  • .agentxchain/hook-annotations.jsonl
  • .agentxchain/notification-audit.jsonl
  • .agentxchain/dispatch/**
  • .agentxchain/staging/**
  • .agentxchain/transactions/accept/**
  • .agentxchain/intake/**
  • .agentxchain/multirepo/**

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

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
repo_run_statusesRepo status map 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

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.

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" 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
  • coordinator-export summary fields against exported multirepo state and barriers
  • 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 v6.