PACT — Protocol for Agent Credentials and Trust
Project description
PACT Python SDK
Trust infrastructure for autonomous AI agents. Implements the PACT Protocol (Protocol for Agent Credentials and Trust) -- DIDs, mandates, attestations, pacts, and handshakes for machine-to-machine identity and delegation.
Installation
pip install pact-trust-sdk
Optional extras:
pip install pact-trust-sdk[server] # HTTP server (starlette + uvicorn)
pip install pact-trust-sdk[mcp] # MCP tool integration
Quick Start
from pact import Agent, Mandate, Attestation
# Create an agent identity
agent = Agent.create(name="Wren")
print(agent.did) # did:pact:z6Mk...
# Issue a delegation mandate
mandate = Mandate.issue(
issuer=principal.did,
subject=agent.did,
scope=["trade:read", "trade:execute"],
expires_in_days=90,
)
# Create a trust attestation
attestation = agent.attest(
subject=peer.did,
interaction_type="task_completion",
outcome="success",
metrics={"accuracy": 0.95},
)
Features
The SDK implements all five PACT primitives:
- Agents -- Ed25519 key pairs with
did:pact:decentralized identifiers - Mandates -- Scoped, time-bound delegation from principal to agent
- Attestations -- Signed records of interaction outcomes that build trust
- Pacts -- Bilateral agreements between agents with lifecycle tracking
- Handshakes -- Cryptographic mutual authentication between agents
Plus: DID resolution, delegation chain validation, and trust evaluation.
Links
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 pact_trust_sdk-0.5.0.tar.gz.
File metadata
- Download URL: pact_trust_sdk-0.5.0.tar.gz
- Upload date:
- Size: 50.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb299d5a0db806224d2cecf08cfbd2c832f86c8c0e1793b6496f4cc73743c9ed
|
|
| MD5 |
002fb68b7e6815f0294cb32923a9c4a3
|
|
| BLAKE2b-256 |
78bf56d3cf92bbefb73e724f86c12e27d8f9e3610cf6cd4841168b126c03f0db
|
File details
Details for the file pact_trust_sdk-0.5.0-py3-none-any.whl.
File metadata
- Download URL: pact_trust_sdk-0.5.0-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a9fa9cef97c07d57e20999897b8ca510efb3fb2d6aa904fa467f37ab12128bf
|
|
| MD5 |
a9935231500021fa2c6a66ad6f4f726e
|
|
| BLAKE2b-256 |
7f4efdddcdb6453968b150b755297ca7508840c2fc39169955c685c6c2becd4f
|