Skip to main content

Emit ZAP1 verifiable attestation receipts from Inspect AI evals (verify-without-trust eval verdicts).

Project description

inspect-receipts

Emit ZAP1 verifiable attestation receipts from Inspect AI evals. Install the package, run any eval, and a signed-evidence receipt for the run lands next to your logs with no fork and no code change to your tasks.

What this is: the missing signed-evidence layer for agent evals. Inspect (and the broader agentskills.io ecosystem) produce rich results but ship them as trust-on-read JSON. inspect-receipts turns each eval into a hash-commitment: input_hash (what was evaluated), output_hash (the verdict), and locked_harness_hash (the frozen judge), so a third party can recompute without trusting the runner.

What this is NOT: a proof that the eval, the scorer, or the system-under-test is correct. It is a tamper-evident commitment, not a correctness SNARK. No prompts, completions, transcripts, or secrets ever enter a receipt: only canonical SHA-256 hashes, numeric metrics, and coarse identifiers.

Install

pip install inspect-receipts          # plus: pip install inspect_ai

Inspect auto-discovers the hook via its inspect_ai entry-point group. There is nothing to import in your eval.

Use

inspect eval my_task.py --model anthropic/claude-opus
# -> ./zap1-receipts/receipt-<task_id>.json

Each completed task writes a receipt like:

{
  "schema": "zap1.vwc.v0/attestation",
  "receipt_family": "AGENT_EVAL_VERDICT",
  "vwc_profile": "attestation",
  "subject": { "kind": "inspect_eval", "task": "ipi_resistance", "model": "..." },
  "hashes": {
    "input_hash":  "sha256:...",
    "output_hash": "sha256:...",
    "locked_harness_hash": "sha256:..."
  },
  "score": { "kind": "scalar", "direction": "maximize", "name": "match.accuracy", "value": 0.92 },
  "metrics": ["match.accuracy=0.92"],
  "status": "success",
  "public_boundary": "hash-commitment, NOT a proof of correctness"
}

Verify (without trusting the runner)

The whole point is that a third party can recompute the commitments straight from the published eval log — with nothing installed but this package (no inspect_ai needed to verify a JSON-dumped log):

inspect-receipts-verify ./logs/my_run.eval ./zap1-receipts/receipt-<task_id>.json
#   [OK ] input_hash
#   [OK ] output_hash
#   [OK ] locked_harness_hash
#
#   MATCH: receipt commits to this eval log (hash-commitment verified).

Exit code is 0 on a full match, 1 on any mismatch — so it drops straight into CI. If someone edits the verdict after the fact, the output_hash line flips to XX and prints both the claimed and recomputed digest, localizing the tamper. The receipt carries the (non-secret) judge identity in cleartext, so the locked_harness_hash pre-image is reconstructable without the runner's help.

This verifies the commitment — that the receipt is bound to this log — not that the eval's verdict is correct. From Python:

from inspect_receipts import verify_receipt
verify_receipt(eval_log, receipt)["ok"]   # True / False

Configuration (env)

Variable Default Effect
INSPECT_RECEIPTS 1 Set 0 to disable receipt emission.
ZAP1_RECEIPT_DIR ./zap1-receipts Where receipts are written.
ZAP1_RECEIPT_ISSUER inspect-receipts Issuer label in the receipt.
ZAP1_RECEIPTS_ANCHOR 0 (off) Opt-in: POST the receipt to a ZAP1 endpoint.
ZAP1_ENDPOINT / ZAP1_API_KEY unset Required only if anchoring is enabled.

Default is local-only / no network. Anchoring is opt-in and transmits only the bounded receipt (hashes + metrics), never eval content. Verify locally before you anchor.

Receipt format

Receipts use the ZAP1 attestation schema (zap1.vwc.v0/attestation): a locked, hashed judge (the Inspect task, model, and config), a recomputable verdict, and three bound hashes. The same envelope is reused for benchmark and gate receipts, so one verification path covers all of them.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inspect_receipts-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inspect_receipts-0.2.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file inspect_receipts-0.2.0.tar.gz.

File metadata

  • Download URL: inspect_receipts-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for inspect_receipts-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d1ae24d1886fcdc4bb3bde4710c6608753817f7719eb625dcb99aa8e4afe18b2
MD5 f8028b1f7d64ad35379a7e6d08db61e0
BLAKE2b-256 768dd75760514a969e666ce85ba4fd21949d9a869dc03f1b22349d0579c1db21

See more details on using hashes here.

File details

Details for the file inspect_receipts-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for inspect_receipts-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1d0abd5fbb08b1ebf77c4fcb545c845fe1aa7bc92834da75c057c427ca11bf0
MD5 d808692f0b45647f26c339621722c9b8
BLAKE2b-256 ebe39a9ab10d23a6e3a65841a21ff5755bf93156030961545816444308dcfce6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page