A small, transport-neutral envelope for the output of a decision tool — a tool that returns a verdict, score, or verified mandate rather than reference data. Each artifact carries a reproducible execution hash, may cite the hashes of the artifacts it consumed (a verifiable provenance DAG), and is exposed to AI agents over standard protocols (MCP, A2A). One common receipt format, so decision tools from different vendors can be chained, audited, and independently verified by any agent.
Non-goals. ChainGraph does not define payment rails, mandate semantics, credential formats, or model behavior. It carries artifacts about those domains, and is deliberately compatible with AP2, ACP, x402, A2A, KYA-OS, and MCP without replacing any of them.
chain.parent_hashes edges across artifacts.The key words MUST, MUST NOT, SHOULD, SHOULD NOT, MAY are to be interpreted as in RFC 2119.
A tool, suite, or vendor MAY conform at increasing levels. Each level includes all lower levels.
| Level | Name | Requirement |
|---|---|---|
| L1 | Artifact-emitting | Emits a valid envelope (§5) with a reproducible execution hash (§6). |
| L2 | Provenance-anchored | Implements the chain block (§7); cites a consumed artifact's execution hash; its own hash is independently re-verifiable. |
| L3 | Agent-callable | Exposes the tool over a transport binding (§8) — an MCP tools/call endpoint and/or an A2A skill — returning the artifact as machine-parseable structured content. |
| L4 | Discoverable | Publishes a graph index (§8.3) enumerating tools, mandate types, and chain edges, linked from a discovery surface (llms.txt, agent card, or JSON-LD). |
A vendor claiming "ChainGraph L4" asserts all four levels. Conformant tools SHOULD also pass the Five Tests (§4), which operationalize the levels.
A decision tool is ChainGraph-conformant if and only if it passes all five:
chaingraph_version, mandate_type, tool_id, execution_hash, chain block, policy_parameters, output_payload, compliance_flags, audit_signature.Heavy compute (GPU, Monte Carlo) is not part of conformance — the category is defined by the export, not the backend. Pure string/array transforms and 10⁶-path simulations are equally conformant if they pass the five tests.
{ "chaingraph_version": "0.1.0", "ap2_version": "1.0.0", // optional compat alias "mandate_type": "compliance_mandate", "tool_id": "art-01-ap2-mandate-chain-validator", "tool_version": "1.1.0", "generated_at": "2026-06-14T14:30:00Z", "execution_hash": "sha256:abc123…", "chain": { "parent_hashes": [], "parent_tool_ids": [], "chain_depth": 0 }, "policy_parameters": { // part of the hash preimage "execution_backend": "webgpu | cpu-fallback | js | server", "input_parameters": { … } }, "output_payload": { …the decision… (part of the hash preimage) }, "compliance_flags": [], "audit_signature": { // self-asserted claims, not proofs "client_side_executed": true, "zero_pii_verified": true, "deterministic_run": true }, "session_receipt_root": null // optional, set by an aggregator (§7.4) }
Key rules: execution_hash, policy_parameters, and output_payload are REQUIRED; the chain block is REQUIRED at L2. New implementations SHOULD emit chaingraph_version and MAY keep ap2_version as a compatibility alias. Implementations MUST ignore unknown top-level fields (forward compatibility), and MUST NOT place values that vary between identical runs (timestamps, nonces, request IDs) inside policy_parameters or output_payload, or the hash will not reproduce. The audit_signature block holds claims — verification comes from re-execution (§6), not from this block.
The normative field-by-field rules and a JSON Schema are in the artifact schema and the repository README.
The execution hash lets any party confirm an artifact by recomputation, with no shared secret. The preimage is a single JSON object with exactly two keys, in order:
preimage = { "policy_parameters": <…>, "output_payload": <…> }
: or ,; no trailing newline).policy_parameters) to avoid floating-point equality issues.Then: execution_hash = "sha256:" + lowercase_hex( SHA-256( utf8( canonical_json ) ) ).
async function executionHash(policy_parameters, output_payload) { const canon = (v) => Array.isArray(v) ? v.map(canon) : (v && typeof v === 'object') ? Object.keys(v).sort().reduce((o,k)=>(o[k]=canon(v[k]),o),{}) : v; const preimage = JSON.stringify(canon({ policy_parameters, output_payload })); const buf = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(preimage)); return 'sha256:' + [...new Uint8Array(buf)].map(b=>b.toString(16).padStart(2,'0')).join(''); }
A conformant tool MUST be deterministic: identical policy_parameters MUST yield identical output_payload (and identical hash). Stochastic tools (Monte Carlo) MUST seed their RNG from policy_parameters so runs reproduce. A non-reproducing hash is a failed verification, not a warning.
"chain": { "parent_hashes": ["sha256:…"], "parent_tool_ids": ["art-01-ap2-mandate-chain-validator"], "chain_depth": 1 }
A tool that consumes another artifact MUST copy each consumed artifact's execution_hash into parent_hashes and the matching tool_id into parent_tool_ids (same order). Roots use empty arrays and chain_depth: 0; otherwise chain_depth = max(parent depths) + 1. The graph MUST be acyclic — reject a chain that would cite an ancestor.
Re-verifiability. Because each parent is named by its execution hash, an auditor can re-run any parent with the recorded inputs, recompute the hash, and confirm the child's citation. The whole DAG is independently checkable without trusting the vendor — the property that distinguishes a ChainGraph chain from a documentation claim that two tools "work together."
Core types (unprefixed, reserved by the Standard): prompt_template, payment_mandate, payment_policy, settlement_mandate, compliance_mandate, risk_control, liquidity_mandate, capital_assessment, credit_assessment, model_governance, attestation_mandate, cryptographic_mandate, infrastructure_mandate, treasury_mandate, account_mandate.
Namespaced extension types. A vendor MUST namespace any non-core type as <reverse-dns-or-registry-id>/<type> — e.g. co.ainumbers/payment_mandate, org.apexlogics/credential_assessment, me.omegacentauri/imbh_constraint. Unprefixed types not in the core registry are invalid; consumers MUST treat an unrecognized namespaced type as opaque (carry it, do not reject the chain).
Note on AP2. AP2 (Agent Payments Protocol, FIDO-governed) defines Intent/Cart/Payment mandates. ChainGraph
mandate_typeis an independent classification vocabulary, not an AP2 field. A ChainGraph tool MAY validate real AP2 structures, but emitting a ChainGraph artifact does not assert AP2 conformance — keep the two distinct in user-facing copy.
An aggregator tool MAY consume N artifacts from a session and emit an artifact whose output_payload contains a SHA-256 Merkle root over their execution hashes, plus per-artifact inclusion proofs, setting session_receipt_root. This yields a single tamper-evident receipt for an entire agent session — the audit object suited to record-keeping regimes (e.g. EU AI Act Art. 12, DORA). The aggregator is itself a conformant tool.
A conformant tool exposed over the Model Context Protocol registers a tools/call endpoint with a typed input schema, declares readOnlyHint: true when it mutates nothing, and returns the artifact envelope as structuredContent. It SHOULD additionally provide three graph-level tools:
emit_<vendor>_artifact — given tool_id + policy_parameters, return the signed artifact.verify_execution_hash — given an artifact, recompute and compare (§6).build_chaingraph — given a chain name or goal, return the ordered node list with explicit parent_hashes wiring from the graph index.It MAY use MCP async Tasks for long-running computations and Sampling-with-Tools to run a chain as a server-side agent loop (MCP 2025-11-25 / 2026-07-28). Compute that must remain local MUST NOT be moved server-side merely to satisfy a binding — return a Task handle or deep-link instead.
A conformant vendor MAY publish an A2A agent card (/.well-known/agent-card.json, Agent2Agent v1.0) listing its decision-tool families as skills, pointing to its MCP endpoint and graph index, and declaring the ChainGraph capability extension x-chaingraph:
"capabilities": { "extensions": [{ "uri": "https://postoaklabs.github.io/chaingraph/ext/x-chaingraph/v0.1", "description": "Emits ChainGraph verifiable decision artifacts (hash-anchored, chainable).", "params": { "conformance_level": "L4", "graph_index": "https://ainumbers.co/chaingraph/chaingraph.json", "verify_endpoint": "verify_execution_hash", "hash_alg": "sha256", "mandate_namespace": "co.ainumbers" } }] }
The x-chaingraph extension lets one agent discover, over A2A, that another agent's outputs are verifiable ChainGraph artifacts — and lets artifacts chain across vendors, each link verified through the producing vendor's verify_execution_hash.
A published JSON document enumerating the vendor's tools and chain edges. Minimum per-node fields: tool_id, display_name, mcp_name, mandate_type, input_schema_ref, consumes, feeds, status. Document-level: chaingraph_version, mandate_namespace, verify_endpoint, five_tests, chain_block_spec. It MUST be linked from at least one discovery surface. The AINumbers chaingraph.json is the reference shape.
audit_signature flags are self-asserted; consumers needing assurance SHOULD re-execute (§6) in a trusted environment.policy_parameters and output_payload are hashed and may be shared as a receipt, implementers MUST keep real personal data out of them.ap2_version → chaingraph_version consolidation).chaingraph_version.mandate_namespace with the editor (open an issue) to avoid collisions.mandate_namespace (e.g. org.apexlogics, me.omegacentauri).chain block. Wherever a tool already consumes another tool's output, copy the parent's execution hash into parent_hashes. You now have a verifiable DAG.tools/call + verify_execution_hash. If you already run an MCP server (ApexLogics and OCS both expose build_workflow_links-style tools), add emit_<vendor>_artifact, verify_execution_hash, and build_chaingraph. Return the envelope as structuredContent.x-chaingraph. Link both from your llms.txt.Once two suites are L4 with x-chaingraph, an orchestrating agent can chain artifacts across them — an OCS constraint solution can cite an ApexLogics assessment as a parent, an AINumbers compliance verdict can cite either — and verify every link through each vendor's published verify_execution_hash. That cross-suite provenance graph is the reason to publish the standard rather than keep it internal.