CHOKR protocol for AI agent governance: JSON Schemas, registries and conformance vectors, with a reference checker.
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), 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 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/ and vectors/. 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 registry/ names CHOKR defines: kinds, signal codes, reason codes, evidence types, obligation types, error codes vectors/ core/ and connect/ conformance vectors, one folder per area src/ the reference checker and the `chokr-spec` command tools/ gen_vectors.py rewrites the vectors that need only a hash function; 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), tamper (a changed chain), schema (a document against a schema), version (version compatibility) and verdict (signature verification). The levels are core and connect; a trust level is reserved and has no vectors yet.
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.
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 18, 2026.




