Skip to main content

algovoi-keystone

One command to prove an agentic-action keystone chain composes end to end.

Everyone has receipts. The keystone is the composition: the proof that identity binds to authority binds to policy binds to the decision binds to the execution binds to one trust verdict, every link a content address, recomputable offline, with no issuer contact. A plain receipt checker recomputes individual digests. This recomputes the whole chain and proves it binds.

keystone verify chain.json
keystone chain: passport_ref  ->  mandate_ref  ->  policy_ref  ->  policy_bound_ref  ->  decision_ref  ->  execution_ref  ->  trust_query_ref
------------------------------------------------------------
  OK  passport_ref
      sha256:b3594e33...
  ...
  OK  trust_query_ref
      sha256:18fb601a...  binds passport_ref, mandate_ref, policy_bound_ref, decision_ref, execution_ref
------------------------------------------------------------
KEYSTONE VALID: 7/7 links compose, recompute byte-for-byte, no issuer contact.
  capped: trust_query_ref is one verdict over [...] in order.

Tamper any link and that link, and every link that binds it, diverge:

  BAD execution_ref
      ^ recomputed sha256:8a71a2a3... != declared sha256:f6e2bfc1...
KEYSTONE BROKEN at execution_ref: ... every link that binds it is therefore not provable from these bytes.

(keystone verify exits 0 if the chain composes, 1 if any link is broken, 2 on a malformed chain.)

Why this exists

As agent governance matures from "here is a signed receipt" to "prove the whole chain composed, that the decision that authorized is the one that executed is the one the verdict covers", a receipt is no longer enough. The keystone is that proof, and it is the one piece of the agentic-governance stack that cannot be reproduced by cloning a single digest construction, because it requires the whole composition. This is the turnkey verifier for it.

The chain format

A keystone chain is an ordered list of links. Each link's reference is "sha256:" + SHA-256(RFC 8785 (JCS)(preimage)). Composition is structural: a preimage refers to an earlier link by @name, so a downstream reference cannot be computed without the exact upstream reference.

{
  "schema": "algovoi-keystone-chain/v1",
  "canon": "jcs-rfc8785-v1",
  "chain": [
    { "name": "passport_ref",  "preimage": { "agent_id": "agent-001", "...": "..." } },
    { "name": "decision_ref",  "preimage": { "agent_ref": "@passport_ref", "mandate_ref": "@mandate_ref", "policy_bound_ref": "@policy_bound_ref", "verdict": "ALLOW" } },
    { "name": "execution_ref", "preimage": { "decision_ref": "@decision_ref", "outcome": "COMMITTED", "...": "..." } },
    { "name": "trust_query_ref", "preimage": { "subject_refs": ["@passport_ref", "@mandate_ref", "@policy_bound_ref", "@decision_ref", "@execution_ref"], "trust_outcome": "TRUSTED" } }
  ]
}

An optional "ref" on a link is the declared output; the verifier recomputes and checks it. See examples/keystone-golden.json for the canonical chain (its values match the published keystone_v1 composition in algovoi-jcs-conformance-vectors).

Agent passports (client half)

An Agent Passport is a Falcon-1024 (FIPS 206) signed credential that binds an agent DID to scopes, a spend bound, and an expiry. The issuer runs inside the AlgoVoi payment rails; this package is the client an agent developer needs, both sides of the wire:

Present your passport on an outbound call (needs nothing beyond the base install):

from algovoi_keystone import load_credential, x402_headers, a2a_message_metadata

cred = load_credential()                 # from $ALGOVOI_AGENT_PASSPORT, or pass a path
headers  = x402_headers(cred)            # {"X-Agent-Passport": "<cred>"} on an x402 request
metadata = a2a_message_metadata(cred)    # A2A message metadata carrying the passport

Verify a received passport fully offline, against the issuer's published key, with a stock trust base (rfc8785 + pqcrypto, no AlgoVoi service in the trust path):

from algovoi_keystone import verify_passport, resolve_keys_from_wellknown, fetch_crl

# resolve the issuer key + revocation list once (or pin them from a local trust store)
keys = resolve_keys_from_wellknown("https://pay.issuer.com")   # {kid: pk_bytes}
crl  = fetch_crl("https://pay.issuer.com", next(iter(keys)))

v = verify_passport(cred, issuer_keys=keys, crl=crl, required_scope="pay:invoice")
if v:                                     # True only when status == "active"
    print("ok:", v.agent_did, v.scopes, v.spend_limit_microusd)
else:
    print("refused:", v.status, v.error_code)   # revoked | expired | invalid | unverifiable

Verification is fail-closed: with no key resolved or no revocation confirmation, the verdict is unverifiable, never a default-trust active. The credential's kid is checked against sha256(pk)[:16] of the resolved key, so a swapped key cannot validate. Install the verifier extra with pip install 'algovoi-keystone[passport]'.

From the CLI:

keystone passport inspect  <credential>                       # decode (does NOT trust)
keystone passport verify   <credential> --issuer-url https://pay.issuer.com --scope pay:invoice
keystone passport verify   <credential> --keys keys.json --crl crl.json    # strictly offline
keystone passport present  <credential> --x402                # emit the header to attach

Install

pip install algovoi-keystone            # Python:  keystone verify chain.json
pip install 'algovoi-keystone[passport]'  # + Falcon-1024 passport verify
npm  install -g @algovoi/keystone       # Node:    keystone verify chain.json

Python and Node produce byte-identical references on every link. RFC 8785 JCS + SHA-256 is the whole dependency; the verifier makes no network call.

License

Apache-2.0. (c) AlgoVoi. Keep the NOTICE attribution when you redistribute.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

algovoi_keystone_compose-0.3.1-cp313-cp313-win_amd64.whl (132.5 kB view details)

Uploaded CPython 3.13Windows x86-64

algovoi_keystone_compose-0.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (974.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

algovoi_keystone_compose-0.3.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (968.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

algovoi_keystone_compose-0.3.1-cp312-cp312-win_amd64.whl (133.3 kB view details)

Uploaded CPython 3.12Windows x86-64

algovoi_keystone_compose-0.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (980.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

algovoi_keystone_compose-0.3.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (986.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

algovoi_keystone_compose-0.3.1-cp311-cp311-win_amd64.whl (137.3 kB view details)

Uploaded CPython 3.11Windows x86-64

algovoi_keystone_compose-0.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

algovoi_keystone_compose-0.3.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (988.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

algovoi_keystone_compose-0.3.1-cp310-cp310-win_amd64.whl (137.5 kB view details)

Uploaded CPython 3.10Windows x86-64

algovoi_keystone_compose-0.3.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (963.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

algovoi_keystone_compose-0.3.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (933.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file algovoi_keystone_compose-0.3.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f7a6aa2576e851761e921cd90742ae1ebb48fec2a44475fde9569bcdfe493804
MD5 a47d08a0cd5f830b9921e4363cab03db
BLAKE2b-256 2d1bd94ac9ffe5b7d1d877c1168f4bb666f12c3ff992c8b903c5fdd9d57174d5

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 cb0f60e67a0e70ae725707e3e28e4e72cc9ba2507f637f8bd193a76b5a8528a1
MD5 ac13c3cba900450bc6cf37237a157b01
BLAKE2b-256 99640f93a13e9e1b739b548386b2a086795b393b0a8a2cf36ff5bbc33af7c239

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9232ac42ebb8de3a69132eb08bfe5b196fdc691fd21bf3799659869e6bbb4d0b
MD5 eec51ee3653440efe154207864bd90e7
BLAKE2b-256 0acb1a96cb2862f83b8a4b4e717c6ff88715c68229c7c4d3f722dcc72cbe9bc7

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ac938068ec896b800188b7d7206f3566120768569f1447891f469f78ee33e148
MD5 435971e8dc8b0d8737736790033c415e
BLAKE2b-256 4ea3fb492cb692e26a267750ece229405fa03329d7d0f3bc8ca6d07decfc7292

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a492b55d1e17666712aa619affbb1c275b7f9b2d6f0c91f210e78ae1d1eba227
MD5 c0ea1c3a1f5ddfcf1b7fa830b1c2a4b1
BLAKE2b-256 baddd661f31d11f3121c88fcdbd202f0bf686e7307c263fc6d6ff94926b68dd7

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 402260646992f38ad19bce28366c4f8636bf139c506ac7d530943b2251dcc537
MD5 ba6b3022daf2bcd0727895f4b12827fa
BLAKE2b-256 2b8ac74e6a5c61b7c376b7d07493cc5355e70f1a5cfd7d133e6b4964270d4713

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3babf4b2ff03bbb86b6007f1bc0e1035a2bc8450b28984a168da949ae6d4b82a
MD5 511872875567ef091dfc935d4dab2ca8
BLAKE2b-256 22baee58cfafe879fc445b5eedbd62b13b0f1b8ab53d3ccc4db1d56cc0cd97b4

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d800c76162ee3810c1c01912abde34e8099309126d00baa35ce336558dd1c738
MD5 7ff476007ed2f3ab8ee56ef9c442d0f9
BLAKE2b-256 7a8dc3f04cf9809ab50d774c27ee94b7eb0004231cc8528ffb7e734081cbf35b

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6c4cd586fa864363206e6147da0204110d381124ab3be8986907d1d799455759
MD5 1e13337830455be5d88d57c7226214d8
BLAKE2b-256 681455cb30bba26c2c30fcfe72c87820a77d3ff4c2434600cfe933276c684534

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 852ef3eef80fd8b1abc8ddc5441bdeb819ed921f20daea7ba72a60c92f05c26b
MD5 bf842d211a90bd0de23702ab2b82d9bd
BLAKE2b-256 8034a79ce36dddc26ec5fe37bc24a920df5f78b7e35a7876590b19e134282ce0

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e97b1b008017adfd645670de5bc5cc4af5bb76f163bc21aacaf114e5fb206926
MD5 b070a8faabfc69abcdba6bb7d631463c
BLAKE2b-256 d46f0cb6e4ef2a69214623ebdf03738cbc3ff2084cdaa57ffe9691000dbbb9e3

See more details on using hashes here.

File details

Details for the file algovoi_keystone_compose-0.3.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 637795009d8745437b3772fd0c7c7aca86a177e953e9caaacf4d8b3fa89c681c
MD5 ac9e603c1198d9182fd24cb9e66b462d
BLAKE2b-256 cc288314f48cdfe2334429314358866ca0fd711bd4e4c9853b31684484c84084

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.1 This release

12 files

0.3.0

12 files

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