Skip to main content

Verify

Your agent says "done". Verify checks the system of record.

AI agents and automations report success from their own logs. Verify ignores the claim, reads the system of record back with a separate read-only credential, and returns one of five verdicts. Anything it can't confirm fails closed.

Verify demo: agent claims 3/3 refunds, Stripe confirms 1/3

Agent says:      3/3 "Refund issued ✅"
Verify (Stripe test mode, independence=full):
  PASS          L2
  FAIL          L2   refund.amount 2500 ≠ 5000
  NOT_OBSERVED  L1   refund never reached Stripe
Verified success rate: 1/3   hash chain intact: True

Real output, Stripe test mode, 2026-11-07. The same run on Zendesk: 1/3.

Verdicts

Verdict Meaning
pass every postcondition observed in the system of record
fail a postcondition observed false, or a forbidden side effect observed
inapplicable preconditions not met; the action should never have run
not_observed the subject record is absent after the observe window
blocked readback impossible (auth, outage, rate limit)

Only pass counts as success.

Quick start

Python 3.10+, no dependencies.

pip install verify-outcomes          # or: pip install git+https://github.com/abhishekshankar/verify
verify --version
verify init stripe                   # writes contracts/ and an example claim
verify selfcheck        # all verdicts, tamper detection, every adapter offline
verify demo local       # SQLite stands in for Stripe + Zendesk
verify ledger demo_out/ledger.db
verify validate contracts/*.json   # reject bad contracts before any action runs
verify ledger export demo_out/ledger.db audit.jsonl && verify ledger verify audit.jsonl

Live adapters (test accounts only; keys come from env vars, never from code):

STRIPE_AGENT_KEY=sk_test_... STRIPE_VERIFY_KEY=rk_test_... verify demo stripe
ZENDESK_SUBDOMAIN=... ZENDESK_AGENT_OAUTH=... ZENDESK_VERIFY_TOKEN=... verify demo zendesk

STRIPE_VERIFY_KEY should be a restricted key with Charges and Refunds set to Read. ZENDESK_VERIFY_TOKEN should be an OAuth token with scope read. HUBSPOT_VERIFY_TOKEN should be a private-app token with only crm.objects.deals.read. INTERCOM_VERIFY_TOKEN should be an Intercom app access token with only the Read conversations permission. SHOPIFY_SHOP (the *.myshopify.com subdomain) and SHOPIFY_VERIFY_TOKEN should come from a custom app with only read_orders. Live Stripe keys are refused.

Check one real action

Write a contract once, then check each claim the agent makes. The exit code is 0 only on pass, so it can gate a pipeline. A claim missing a field the contract needs is rejected (exit 2) before anything is read.

STRIPE_VERIFY_KEY=rk_test_... verify check contracts/refund.full.stripe.json claim.json --ledger verify.db

claim.json holds what the agent says it did, e.g. {"actor": "support-agent", "charge_id": "ch_...", "refund_id": "re_...", "amount": 5000} (see examples/).

Many claims at once (one JSON object per line; exit 0 only if every claim passes):

verify check-batch contracts/refund.full.stripe.json claims.jsonl --ledger verify.db

Hosted ledger (optional)

hosted/ is an append-only, multi-tenant ledger API (SQLite or Postgres). Push a local ledger to it with VERIFY_HOSTED_KEY=... verify push verify.db --to https://ledger.example.com. Deployment to AWS us-east-2 is in hosted/deploy/ (Terraform; not applied).

Use from an agent

python -m verify.mcp_server is an MCP server with verify_check and verify_validate (see docs/MCP.md). Framework examples are in examples/.

How it works

  1. Contract, written before the action: subject, preconditions, postconditions, forbidden effects, windows, scope.
  2. Claim: the actor's "done" is recorded, never used as evidence.
  3. Readback: an adapter reads only the fields in scope, with its own credential.
  4. Verdict: evaluated, then written to an append-only SQLite ledger (synchronous=FULL) where each event hashes the one before it.

Layout

Python API: verify.check(contract, claim, reader); see docs/ADAPTERS.md. Contracts: docs/CONTRACTS.md.

src/verify/core.py holds evaluation, the ledger and the verify loop; contract.py loads and validates contracts (contracts/*.json). The adapters are stripe.py, zendesk.py, hubspot.py (deals), intercom.py (conversations), shopify.py (refunds, Admin GraphQL) (the last three offline-tested, live run pending) and local.py.

Status

v0.4.2 on PyPI, pre-production. Not yet a stable API. MIT licence.

Metadata

Release files for verify-outcomes 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for verify-outcomes 0.4.2
File Size Uploaded Provenance Actions
verify_outcomes-0.4.2.tar.gz 26.7 kB With provenance Details for verify_outcomes-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for verify-outcomes 0.4.2
File Interpreter ABI Platform Actions
verify_outcomes-0.4.2-py3-none-any.whl Python 3 none any Details for verify_outcomes-0.4.2-py3-none-any.whl

Total release size: 56.6 kB

Release files / verify_outcomes-0.4.2.tar.gz

Download URL verify_outcomes-0.4.2.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bbae0820196589223fdd26073da8170ae17554fe9f2014151fdb46c34d8630fa
BLAKE2b-256 checksum
How to use checksums
a1c3fea3b156db6b69e2f94f10ef029a7f507aeb13867eba594f38b3a71a61eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / verify_outcomes-0.4.2-py3-none-any.whl

Download URL verify_outcomes-0.4.2-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e0f0fa12aba8194f6a7a6e1a9874277f6ba6f53611f24478767fad7af6bc7bb
BLAKE2b-256 checksum
How to use checksums
9c6bba3671301df60af2a6f1b1fb49d4f82152b037b79be4ed466d2ef76170bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for verify-outcomes 0.4.2

Provenance

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for verify_outcomes-0.4.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page