model-action-protocol (Python)
Python implementation of the Model Action Protocol. Cryptographic provenance, self-healing, and state rollback for autonomous AI agents.
This package conforms to MAP spec version 0.1.0. Both this implementation and the TypeScript reference implementation produce byte-identical hashes for the same inputs, verified by the shared conformance fixtures in ../spec/fixtures/v0.1/.
Install
pip install model-action-protocol
Optional extras:
pip install "model-action-protocol[anthropic]" # LLM critic via Anthropic SDK
pip install "model-action-protocol[sqlite]" # async SQLite store
pip install "model-action-protocol[postgres]" # async Postgres store
pip install "model-action-protocol[fastapi]" # FastAPI demo deps
pip install "model-action-protocol[all]"
Quickstart
See examples/quickstart.ipynb for the full Jupyter walkthrough and examples/fastapi_app/ for an HTTP service template.
Specification
The wire format, canonicalization rule (RFC 8785), hash inputs, and chain verification algorithm are defined in spec/SPEC.md. Implementation details (Pydantic models, async I/O patterns, anthropic SDK integration) are not part of the spec — they are this implementation's choices.
Metadata
Release files for model-action-protocol 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| model_action_protocol-0.1.2.tar.gz | 63.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| model_action_protocol-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.9 kB
Release files / model_action_protocol-0.1.2.tar.gz
| Download URL | model_action_protocol-0.1.2.tar.gz |
|---|---|
| Size | 63.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f25b43423f3a6c2106917827127c00258431b2d0ae02e208f390e61928bba13
|
|
BLAKE2b-256 checksum How to use checksums |
882faf1ee16b5b85fcf0697ccded24b1dfb868d3c09d52d7cdb5dfb75651886c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / model_action_protocol-0.1.2-py3-none-any.whl
| Download URL | model_action_protocol-0.1.2-py3-none-any.whl |
|---|---|
| Size | 35.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27446d6e881e3141ced08803cb1111ede3cdf27be6a4eccaa36b63550c7e6220
|
|
BLAKE2b-256 checksum How to use checksums |
a6e7866bf77774c606d10666957457a53e2b207efed66145f3dd6a7505af03be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|