pact-auth
Sovereign Agent Authentication Protocol — Python SDK
Cryptographic identity, delegation chains, and capability-based authorization for AI agents. Zero trust, zero registry — the public key IS the identity.
Install
pip install pact-auth
Quick Start
import pact
from datetime import timedelta
# Create identities (Ed25519 keypairs)
human = pact.new_identity("human", "alice")
agent = pact.new_identity("agent", "my-agent")
# Delegate capabilities with expiry
delegation = pact.new_delegation(
from_identity=human,
to_identity=agent,
capabilities=["storage:read", "storage:write"],
ttl=timedelta(hours=24),
)
# Sign HTTP requests
req = pact.HttpRequest("GET", "https://api.example.com/data")
pact.sign_request(req, agent, [delegation])
# Verify (provider side)
result = pact.verify_request(req)
assert result.valid
Features
- Self-sovereign identity — Ed25519 keypairs,
sha256:hexIDs, no registry - Delegation chains — Signed capability transfers with narrowing-only constraint
- Capability URIs —
resource:action,constraint=valueformat with wildcard support - HTTP signing — Content digest + signature headers compatible with RFC 9421
- Session management — Ephemeral session keys delegated from persistent root
- Revocation — Instant revocation with cryptographic proof
- Zero dependencies beyond
cryptography>=41.0
Protocol Spec
See SPEC.md for the full 968-line protocol specification.
License
Apache 2.0
Release files for pact-auth 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pact_auth-0.1.1.tar.gz | 23.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pact_auth-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.7 kB
Release files / pact_auth-0.1.1.tar.gz
| Download URL | pact_auth-0.1.1.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e21b472022ac011322e0158ab07133ea9875a783fdce8d3b3813be624ef4927
|
|
BLAKE2b-256 checksum How to use checksums |
d0fc71ea47f1977ebd943495a8d5580039330396149fc1f9bb0d2ca36527ceec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.
Transparency logRelease files / pact_auth-0.1.1-py3-none-any.whl
| Download URL | pact_auth-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93121fd61443f60df386c61b0368ee46682a5c0db6c9249e2b4aac933ea9f814
|
|
BLAKE2b-256 checksum How to use checksums |
f62a4af9259ca4ece3267caa7a6c2dfb8f9d83dc11eee3a42744fb51622926a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.
Transparency log