Skip to main content Switch to mobile version ai-audit-receipt 0.1.0 Zero-dependency cryptographic audit receipts for AI agents & LLM calls (tamper-evident hash chain, selective disclosure, O(1) fold). Cross-verifiable with the npm package.
pip install ai-audit-receipt==0.1.0 Copy PIP instructions
Zero-dependency cryptographic audit receipts for AI agents & LLM pipelines. Prove what prompt, model, tool call and output happened at time T — tamper-evident, offline, < 1 ms, with no sensitive payload stored. Available on npm and PyPI, and receipts made by one are byte-for-byte verifiable by the other.
npm i ai-receipt # JavaScript / TypeScript (Node >= 14) pip install ai-receipt # Python >= 3.9 Quickstart (JS)
from ai_receipt import create_receipt, verify_chain, fold_receipts prev, log = "", [] for s in agent_steps: r = create_receipt(step=s.i, model="gpt-4o", prompt=s.prompt, response=s.output, tool_calls=s.tools, cost=s.micro_dollars, prev_hash=prev, secret_key=KEY) log.append(r); prev = r["hash"] assert verify_chain(log, secret_key=KEY) summary = fold_receipts(log) What it actually is (honest)
A SHA-256 hash chain — the same tamper-evidence Git commits and blockchains use. Change any past field and every later hash breaks. This is not zero-knowledge; it is a clean, standard, auditable primitive, which is exactly why you can trust it.
Payloads are stored as salted commitments, never in plaintext — so the receipt proves what happened without leaking the prompt/PII. Reveal (value, salt) later to open a commitment (selective disclosure).
foldReceipts collapses an N-step trajectory into one constant-size root.
Optional HMAC-SHA256 signing binds the log to a secret key.
US/EU AI startups get asked by banks, auditors and the EU AI Act: "prove this AI output and its audit log weren't tampered with." ai-receipt is a 2-line answer with zero dependencies and no data leaving the process.
Free (MIT): everything above — receipts, chain/fold verification, selective disclosure, signing.
Pro (commercial license key): exportComplianceReport(..., proKey) emits SOC2 / EU-AI-Act formatted bundles with a signed header. The key check is a documented hook (_pro_key_valid) you wire to your license provider (e.g. LemonSqueezy) before selling — it does not phone home in this repo.
cd npm && node test/test.js # 11 tests incl. a cross-language hash fixture cd pypi && python3 tests/test_receipt.py # 10 tests The JS cross-language test asserts the exact hashes produced by the Python package, so the two implementations are provably interoperable.
ai llm audit receipt tamper-proof compliance soc2 hash-chain agent
Development Status 4 - Beta
License OSI Approved :: MIT License
Programming Language Python :: 3
Topic Security :: Cryptography
Release files for ai-audit-receipt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 13.3 kB
Release files / ai_audit_receipt-0.1.0.tar.gz
Release files / ai_audit_receipt-0.1.0-py3-none-any.whl
Security for ai-audit-receipt 0.1.0
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 27, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




