Sovereign Agent Authentication Protocol — Python SDK
Project description
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
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_auth-0.1.1.tar.gz.
File metadata
- Download URL: pact_auth-0.1.1.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e21b472022ac011322e0158ab07133ea9875a783fdce8d3b3813be624ef4927
|
|
| MD5 |
0f2824e10ee0662490fbde1a2440937c
|
|
| BLAKE2b-256 |
d0fc71ea47f1977ebd943495a8d5580039330396149fc1f9bb0d2ca36527ceec
|
Provenance
The following attestation bundles were made for pact_auth-0.1.1.tar.gz:
Publisher:
publish-python.yml on anzal1/pact
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pact_auth-0.1.1.tar.gz -
Subject digest:
2e21b472022ac011322e0158ab07133ea9875a783fdce8d3b3813be624ef4927 - Sigstore transparency entry: 973489614
- Sigstore integration time:
-
Permalink:
anzal1/pact@001c5ac56df0bf7c475f1bd0b181a54a2d230b6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anzal1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@001c5ac56df0bf7c475f1bd0b181a54a2d230b6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pact_auth-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pact_auth-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93121fd61443f60df386c61b0368ee46682a5c0db6c9249e2b4aac933ea9f814
|
|
| MD5 |
9960cd01ad40b5b6bcb60fb10ea9f791
|
|
| BLAKE2b-256 |
f62a4af9259ca4ece3267caa7a6c2dfb8f9d83dc11eee3a42744fb51622926a6
|
Provenance
The following attestation bundles were made for pact_auth-0.1.1-py3-none-any.whl:
Publisher:
publish-python.yml on anzal1/pact
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pact_auth-0.1.1-py3-none-any.whl -
Subject digest:
93121fd61443f60df386c61b0368ee46682a5c0db6c9249e2b4aac933ea9f814 - Sigstore transparency entry: 973489623
- Sigstore integration time:
-
Permalink:
anzal1/pact@001c5ac56df0bf7c475f1bd0b181a54a2d230b6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/anzal1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@001c5ac56df0bf7c475f1bd0b181a54a2d230b6d -
Trigger Event:
push
-
Statement type: