Metadata-Version: 2.4
Name: pact-trust-sdk
Version: 0.5.0
Summary: PACT — Protocol for Agent Credentials and Trust
Project-URL: Homepage, https://github.com/bkauhl3/pact-protocol
Project-URL: Documentation, https://pact-protocol.org
Project-URL: Repository, https://github.com/bkauhl3/pact-protocol
Project-URL: Changelog, https://github.com/bkauhl3/pact-protocol/blob/main/CHANGELOG.md
Author: Brenden Kauhl
License-Expression: Apache-2.0
Keywords: agent,did,identity,trust,verifiable-credentials
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: pynacl>=1.5.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
Provides-Extra: server
Requires-Dist: starlette>=0.36.0; extra == 'server'
Requires-Dist: uvicorn>=0.27.0; extra == 'server'
Description-Content-Type: text/markdown

# PACT Python SDK

Trust infrastructure for autonomous AI agents. Implements the [PACT Protocol](https://pact-protocol.org) (Protocol for Agent Credentials and Trust) -- DIDs, mandates, attestations, pacts, and handshakes for machine-to-machine identity and delegation.

## Installation

```bash
pip install pact-trust-sdk
```

Optional extras:

```bash
pip install pact-trust-sdk[server]   # HTTP server (starlette + uvicorn)
pip install pact-trust-sdk[mcp]      # MCP tool integration
```

## Quick Start

```python
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

- [Documentation](https://pact-protocol.org)
- [Specification](https://github.com/bkauhl3/pact-protocol/blob/main/SPECIFICATION.md)
- [Repository](https://github.com/bkauhl3/pact-protocol)
- [Security & Audit Trail](https://github.com/bkauhl3/pact-protocol/blob/main/SECURITY.md)

## License

Apache 2.0
