btp-guard • BTP v2.2 Universal Agent Trust Guard
Cryptographic Governance for LangGraph, AutoGen, CrewAI & LlamaIndex
btp-guard is the official Python SDK for the Bartholomew Trust Protocol (BTP v2.2). It provides 100% offline, zero-network mathematical verification of autonomous agent trajectories, tool executions, and cross-framework delegations using RFC 8785 JSON Canonicalization (JCS) and FIPS 186-5 Ed25519 signatures.
Installation
pip install btp-guard
Quickstart: 1-Line Tool Guard (LangGraph / LangChain)
from btp_guard import BTPGuard
# 1. Initialize guard with your organization's recognized root authorities
guard = BTPGuard(
trusted_authorities=["<64-hex-char-ed25519-public-key>"],
agent_id="Agent-Production-Cluster"
)
# 2. Decorate critical tools
@guard.wrap_tool
def execute_sql_patch(sql_query: str):
# Automatically blocked if unauthenticated or payload tampered
return db.execute(sql_query)
Quickstart: Microsoft AutoGen Interceptor
from btp_guard import BTPGuard
guard = BTPGuard(trusted_authorities=[ROOT_KEY])
# Drops or alerts on unattested high-privilege tool requests in transit
safe_message = guard.intercept_autogen_message(inbound_packet)
Quickstart: Standalone Offline Verification (Zero-SDK)
from btp_guard import verify_btp_receipt
ok, msg = verify_btp_receipt(
receipt_json_str=inbound_packet,
candidate_payload={"file": "worker.py", "patch": "fix()"},
trusted_root_pubkeys=[ROOT_KEY],
expected_recipient_context="Agent-Production-Cluster"
)
if not ok:
raise PermissionError(f"Attestation rejected: {msg}")
Specification & Challenge Package
- Frozen Protocol Spec: BTP_PROTOCOL_SPECIFICATION.md
- 8-Invariant Red-Team Challenge: CHALLENGE_PACKAGE.md
- Live Interactive Simulator: https://app.bartholomew.info/simulator
Metadata
Release files for btp-guard 6.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| btp_guard-6.6.3.tar.gz | 131.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| btp_guard-6.6.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 295.9 kB
Release files / btp_guard-6.6.3.tar.gz
| Download URL | btp_guard-6.6.3.tar.gz |
|---|---|
| Size | 131.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57bd33f0e5c6825843df14d94d2e182524a295b8cb3d7d283448b02048c64279
|
|
BLAKE2b-256 checksum How to use checksums |
52cff5502a7bb4ee4d9f2d6bf1c29ed2c9e04dbb9b0d3f8e1668500aec13a22a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / btp_guard-6.6.3-py3-none-any.whl
| Download URL | btp_guard-6.6.3-py3-none-any.whl |
|---|---|
| Size | 164.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e76cbd4ee734c46da5b16fcd4caa2e9940d1bd43f2ea413657c6f85eb92c59e
|
|
BLAKE2b-256 checksum How to use checksums |
eda4551141dff9f5bf8a0496d78fb822eec400c5156b27e4fdd9ae0d7e26ec07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for btp-guard 6.6.3
Provenance
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
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.