Cryptographic receipts for AI agent tool calls
Project description
manifest-sdk
Cryptographic receipts for AI agent tool calls — Python SDK.
Pure Python implementation of the manifest receipt format. Generates receipts that are byte-for-byte verifiable by the Rust CLI.
Install
pip install manifest-sdk
Quick Start
from manifest_sdk import Manifest
m = Manifest(identity="my-agent", db="receipts.db")
receipt = m.record(
tool="send_email",
input={"to": "bob@example.com", "subject": "Hello"},
output={"status": "sent"}
)
print(receipt.id) # urn:uuid:...
print(receipt.proof.signature) # ed25519:...
print(receipt.content_hash()) # sha256:...
Features
- Ed25519 signing — Key generation, signing, verification (32-byte seed files)
- Merkle tree — Append-only tree matching the Rust implementation
- Policy evaluation — Tool allowlists, spending limits, PII detection
- SQLite storage — Same schema as the Rust CLI (cross-readable)
- Receipt chaining — Each receipt links to the previous via content hash
- JSON-LD receipts — Same format as the MCP proxy
Advanced Usage
from manifest_sdk import (
AgentIdentity, IdentitySource, Action, Delta,
ReceiptBuilder, Signer, MerkleTree, Storage, PolicyConfig,
)
# Manual control over each component
signer = Signer.generate()
merkle = MerkleTree()
storage = Storage.open("receipts.db")
identity = AgentIdentity(
name="procurement-bot",
deployer="acme-corp",
environment="production",
source=IdentitySource.CONFIG,
)
receipt = (
ReceiptBuilder()
.agent(identity)
.action(Action(tool="db_query", input={"sql": "SELECT 1"}, output={"rows": 1}))
.delta(Delta(authorized=True))
.build(signer, merkle)
)
storage.insert_receipt(receipt, session_id="session-1")
# Verify the signature
canonical = receipt.canonical_bytes()
assert signer.verify(canonical, receipt.proof.signature)
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
manifest_sdk-0.1.0.tar.gz
(17.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manifest_sdk-0.1.0.tar.gz.
File metadata
- Download URL: manifest_sdk-0.1.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9572536d329016e3c8ffcc36dc080f8a38969f57f2f839190c9a2bacd5df449
|
|
| MD5 |
36c13544c723552c92f6eaceb75b8f50
|
|
| BLAKE2b-256 |
b4fdd38e2cd46c89d6c877d6544970147767b339bf51066e4f267d1e1fa0fa99
|
File details
Details for the file manifest_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: manifest_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
724d0efbed8cf01e1015ba124383b4625339179f50bc81de27df7799862ef289
|
|
| MD5 |
d7b2f586bbd1385fa7af2aaeb761060f
|
|
| BLAKE2b-256 |
935b0266e78bf2153a0ab54639c412caa7eb4a925441f2100dc3f26eb15381d9
|