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.0-cp313-cp313-win_amd64.whl (132.5 kB view details)

Uploaded CPython 3.13Windows x86-64

algovoi_keystone_compose-0.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (974.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

algovoi_keystone_compose-0.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (969.3 kB view details)

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

algovoi_keystone_compose-0.3.0-cp312-cp312-win_amd64.whl (133.4 kB view details)

Uploaded CPython 3.12Windows x86-64

algovoi_keystone_compose-0.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (981.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

algovoi_keystone_compose-0.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (987.2 kB view details)

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

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

Uploaded CPython 3.11Windows x86-64

algovoi_keystone_compose-0.3.0-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.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (989.0 kB view details)

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

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

Uploaded CPython 3.10Windows x86-64

algovoi_keystone_compose-0.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (963.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

algovoi_keystone_compose-0.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (933.9 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.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2c65879097cdc7e328b8eca0907e9fc7e15634c7867edfc1e5d6925f0995fc2b
MD5 51304bf79eb9ac4a4aae7b2a28f31d45
BLAKE2b-256 47470c53b81f36e3e63c0ca0876ffe3bbf12f627226b1f01a21d6d0041941d0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 8432c25f8b7d65b0e3e7ae056e142380f58748884aa44d5d9f0b323277aca0e4
MD5 dca664bc0a6a37620999223400dbb9c8
BLAKE2b-256 f0c374f6e956c521c5e2207a450c25c2fb340cc2a7c8a36a029628aaca6613d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dd61fd7cf6db2a7473c79d4fe335e724cfb7afda49d9d760811bc03750fa870d
MD5 d3eca99fcd95961150f8c99d666c8ae0
BLAKE2b-256 f5dc348b3fe13a7ae90f9ad4ea6053c1f9b3fb9034f3f160829719175fe70828

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1ba3e58c74b0a75e29f1fb96de7d0e20466d361274cb2991b945852fb6776c26
MD5 2f8ad3b0afbe2fe3048616d60306e33e
BLAKE2b-256 0e83cdc29d23d35dfd59a6791cbd13ae02ce5ae3f356e42a51a8d45c5afd8318

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f6596f6b6c9c62c728b1861503ae1f7d46a41fd8f70df4c1a9a2a33580728f47
MD5 0326d895caf833547f42b03049d89e1e
BLAKE2b-256 070ba82f9eadf576d0ad636e0e3f1c726f3d1dc8df4748561d742080aef27923

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1a8b955b85e08bf6488dbbd97fed0ca38c9c2ca82f19363f7f4c18559a4eaf75
MD5 8c0cb73c5bc5acaae160c2ffda28bee1
BLAKE2b-256 516976abfa601fc467bb1b9e6c22819897b98adb5efd6435b3b684b121ad82da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0cbc26ad66bc638ed49fb599df1e3450e65c434d080ea7bd8c20b1ba8b0e0891
MD5 a54c49d828f3e097a471f023df181760
BLAKE2b-256 0476e2dde2e9f45b0223b5b67387eeef958f783160f0519068a05bdb6cc8d79e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f90be374e37ecc9efdf5072ee07b56dc08da038415a5974fad4dff3dcc77351d
MD5 63f69e1b7ae0c052e752ce2cb7fc9c23
BLAKE2b-256 b19e486a10a32f442d7223bf4fe57f80aea799e2548cb96e23e78546ec3a3fde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 44f7d1ddd466437774c60bea8d4726f5da12da499d1e3f5917eaf62a93a28d55
MD5 39d3e429786d84be77fb15be82f73e43
BLAKE2b-256 1a7708f53686216d5bce89bdb02a1d87bf60d4cfb8df1ce77ce7045eae3e5e44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 89ee4d47ccbfe57629eab85a79ae6c0c2b982bfa75552ff94eb64a07759790ce
MD5 e8af23c6d02ba47a2b942f8d04234a70
BLAKE2b-256 a63e0e940327628057aac5edead2d2b0ed1df1f2b96ba08fb94f4c717f40c40c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f99be075b758ae4266576f2e6e1b2e18e8e6aa216221fc8a1c315bb779d20af9
MD5 f936781f25fb088611d0c2c9624cd6d9
BLAKE2b-256 7f31e4af264087b8ab1af411cce8054232640c6ae9d9f7756451c447ec84ec6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for algovoi_keystone_compose-0.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b9fadbba46b415067fc2cc280a91b5b19c8e83ba0c3d3236684041be251e1210
MD5 2b1abc6eac411e7b51f5f3817a618576
BLAKE2b-256 e84136648d06f6ef8c036dab5feeb649e9586f8fdd361d1bac5388c3f477279d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1

12 files

This release

0.3.0 This release

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