Tamper-evident provenance logging for AI agents.
Open-source · Apache 2.0 · Python 3.11+
Install
Base install: pip install rootsign. Framework extras pull in the matching connector.
Quickstart
Wrap your existing tools. Provenance is captured automatically.
from rootsign import wrap_tools, session
from langchain_core.tools import tool
@tool
def send_invoice(customer_id: str, amount: float) -> str:
"""Send an invoice."""
return "sent"
async with session(agent_id=agent.agent_id, client=client) as ctx:
tools = wrap_tools([send_invoice], ctx=ctx)
# your graph runs here — every tool call is capturedVerify the chain
One command proves the record chain is intact — or flags tampering.
$ rootsign verify <session_id>
VALID ✓ — 47 records, chain intactHand it to someone who doesn't read JSONL
verify answers a developer's question. export answers everyone else's — one command turns a session into a self-contained evidence bundle: JSON for machines, an HTML report for people, and a SHA-256 for every file in it.
$ rootsign export --local ~/.rootsign/sessions/<session_id>.jsonl
VALID — 3 records, chain intact
Bundle: ./evidence-<session_id>
manifest.json verification.json timeline.json redaction.json
report.md report.html
manifest.json SHA-256: a1d61338d0f793ea03ac472863fadea5660e1e94846913ce7613d8c117d67cc5
Record that hash outside the bundle — a ticket, an email, a chain-of-custody log.

The recipient runs rootsign export --check to re-hash every file. That proves the bundle is internally consistent — comparing the manifest hash against the value you recorded out of band is what proves it is the bundle you generated.
Refused is not the same as missing
New in v0.3.1A verifier can tell you a record is missing (INCOMPLETE) or altered (TAMPERED). An investigation needs a third fact: a record the store saw and refused. When the endpoint is unreachable, RootSign keeps recording to a local spool, and rootsign-admin sync uploads it later. Every attempt now writes a sync receipt — kept beside the evidence, never written onto it.
$ rootsign-admin sync
1 spooled session(s), 4 record(s) under ~/.rootsign/spool
REJECTED <session_id> 3/4 delivered, rejected at sequence 2: HASH_CHAIN_BROKEN
(self_hash does not match the canonical fields). File left in place.
receipt ~/.rootsign/spool/receipts/<session_id>.sync.json
receipt SHA-256 3ef83c6ed69e5e7be97d05c1f55f3b4c4eec21d32d107141d7d5db72bfd3a500"spool_file_sha256": "ba7c94afbf9dcfe96c9f632a5335b04226b02420f4e9d7e1b7181514378cd5af",
"record_count": 4,
"outcomes": {
"accepted": [[1, 2], [4, 4]],
"duplicate": [],
"rejected": [{"record": 3, "sequence": 2,
"error_code": "HASH_CHAIN_BROKEN", "retryable": false}],
"not_attempted": []
},
"halted_at_sequence": 2,
"disposition": "partial"Every record accounted for
Accepted, duplicate, rejected, not attempted — the four outcomes cover every record in the file exactly once. Anyone can check that by arithmetic, without trusting whoever wrote the receipt.
Bound to the bytes
Each attempt records the SHA-256 of the spool file as it was replayed, so a file changed after the upload no longer matches its receipt.
Append-only
Fix the problem and re-run: attempt 2 is added beside attempt 1, never over it. The history of how the evidence was handled survives.
Carried into the bundle
rootsign export includes the receipt as sync-receipt.json, hashed in manifest.json like every other file in the bundle.
Check a receipt without taking our word for it: since v0.3.1 shipped, the receipt format has published conformance vectors (CC0) and a standalone verifier that needs nothing but Python's standard library — no RootSign install required.
What's in v0.3.1
✓ Shipped- Sync receipts: every upload attempt recorded — accepted, duplicate, rejected, not attempted (ADR-015)
- rootsign-admin sync prints REJECTED, not INCOMPLETE, for a record the store refused
- Numeric PII (SSNs, account numbers sent as JSON numbers) is now redacted before hashing — such payloads hash differently than under v0.3.0
- rootsign export: self-verifying evidence bundles with an HTML report (ADR-014)
- Cloud transport behind rootsign[cloud] — the chain is sealed client-side (ADR-013)
- Offline spool: an unreachable endpoint costs you nothing; rootsign-admin sync replays it
- Three verdicts — VALID / TAMPERED / INCOMPLETE — with exit codes 0/1/2
- Published wire spec: envelope, error registry, idempotency, batch semantics
- JSONL default backend: zero dependencies, no Docker or database (ADR-011)
- LangGraph 0.1.x and 0.2.x · CrewAI 0.28+, 0.40+, 1.x · MCP proxy (ADR-010)
- Human-in-the-loop checkpoints and PII redaction before hashing
- 894 tests · 15 ADRs · Apache 2.0