CHOKR protocol for AI agent governance: JSON Schemas, plugin protocol, registries and conformance vectors, with a reference checker.
pip install chokr-spec==0.0.5 Copy PIP instructions
The CHOKR protocol as data: JSON Schemas for the documents that govern AI agents (envelope, signed verdict, tamper-evident audit ledger, approval, pack, plugin manifest and config; and, for trust, the credential, delegation, evidence, passport, proof of possession, authority epoch, execution grant and trust config), the protocol of out-of-process plugins, registries of standard names, and conformance vectors. The package also holds a reference checker that runs the vectors, so any implementation, in any language, can compare its results with the same inputs.
The policy language has its own repository, chokr-policy-language. Its outcomes, standard reason codes and authoring error codes are defined there and are not repeated here.
pip install chokr-spec Python 3.14 or newer. Import name: chokr_spec.
$ chokr-spec check $ chokr-spec check --level core --report report.json --level is the highest level to run: core, connect or trust. A level includes the ones below it.
The command exits with 0 only when every vector passes. --vectors DIR runs a different folder of vectors, and --json prints the report.
from chokr_spec import data_dir from chokr_spec.runner import run report = run("core") print(report.passed, report.failed, report.ok) print(data_dir() / "schemas") data_dir() is the folder that holds schemas/, registry/, vectors/ and proto/. Another implementation can load the same files and reproduce every vector's expected value.
schemas/ JSON Schemas of the documents: envelope, signal, verdict, ledger record, approval, budget event, pack, plugin manifest, config and action mappings; and manifest (`chokr.lock`), message contract, credential, delegation, evidence, passport, proof of possession, authority epoch, execution grant and trust config proto/ service_plugin.proto: the protocol of out-of-process plugins (`chokr.service_plugin/1.0`) registry/ names CHOKR defines: kinds, signal codes, reason codes, evidence types, obligation types, error codes vectors/ core/, connect/ and trust/ conformance vectors, one folder per area src/ the reference checker and the `chokr-spec` command tools/ gen_vectors.py and gen_trust_vectors.py rewrite the vectors that are computed; check_spec.py checks all the data A vector is a JSON file with an id, a level, an input and an expected result. The id is / and the level is the folder it sits in. The areas are envelope (canonical form and digest), ledger (the hash chain), anchor (the hash of an agent's locked instructions), lockhash (the hashes that pin a tool definition), meshchain (the Chokr-Chain header of a call chain), tamper (a changed chain), schema (a document against a schema), version (version compatibility) and verdict (signature verification). The trust level has the areas crypto (four algorithm families and hybrid proofs), jws, thumbprint, credential, delegation (attenuation), evidence (freshness), passport, pop (proof of possession, replay), keybinding, epoch (rollback), vc (W3C Data Integrity eddsa-jcs-2022 and ecdsa-jcs-2019, with the values the W3C specifications publish) and sdjwt (disclosure digests). A trust vector also has a class: valid, invalid or tamper (a signed document changed after it was signed), and check_spec.py fails when an area has no valid vector or no tamper vector.
The JSON Schemas, the registries and the vectors define the protocol. The Python checker is a reference implementation of the vectors, not a second source of truth. When they disagree, the vectors win and the checker is wrong.
See CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md, not in public issues.
All 2 files in this release have provenance metadata.
agent-governance agent-security agentic-ai ai-agents ai-governance audit-ledger audit-trail canonical-json chokr conformance-tests hash-chain human-in-the-loop json-schema llm-guardrails protocol signed-verdict specification tamper-evident
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
All 2 files in this release have been uploaded with provenance metadata.
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.




