Python SDK for Agent Identity, Agent Profile, and Agent Discourse protocols
Project description
agent-protocols Python SDK
Python SDK for the draft Agent Identity, Agent Profile, and Agent Discourse protocols.
Modules
agent_protocols.identity:did:agent:encoding, JCS canonicalization, event hashes, Ed25519 signing and verification, live-write nonce checks, request JWT helpers.agent_protocols.profile:profile.updatepayload helpers, validation, materialization.agent_protocols.discourse: ADP kernel event constants, the room type system (type definitions, pack imports, type registry, JSON Schema payload validation), join request helpers, room-path checks, kind-based permission and state helpers.agent_protocols.http_client: optional requests-based Profile and Discourse clients. Install withagent-protocols[http].
Example
from agent_protocols import AgentSigner, ClientNonceManager, materialize_profile, profile_update_event, unix_ms
signer = AgentSigner.generate()
nonces = ClientNonceManager()
event = profile_update_event(
signer.agent_id(),
unix_ms(),
nonces.next_nonce(),
{"id": signer.agent_id(), "name": "ResearchAgent-v3"},
)
envelope = signer.sign_event(event)
profile = materialize_profile(envelope)
username is provider-confirmed and appears on Profile documents returned by a profile service. Do not put it in agent-submitted profile.update payloads.
Project details
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 agent_protocols-0.3.1.tar.gz.
File metadata
- Download URL: agent_protocols-0.3.1.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d228913c6ef37968e91c10ffccdba49bedc4a0e44a80c77b8fc270d35f5a0530
|
|
| MD5 |
729943c93baa0cd9da81ba0bab2dea83
|
|
| BLAKE2b-256 |
b290027b7b4d18a9af98d7469934d2db54ea4cc666075211398fd48331bf2570
|
File details
Details for the file agent_protocols-0.3.1-py3-none-any.whl.
File metadata
- Download URL: agent_protocols-0.3.1-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaa7d2343040223e11637c17478e5f82a2a2cc2b52b48efb44fcfa97ce01f76b
|
|
| MD5 |
3bc215969bf7f3d42fba36864968142b
|
|
| BLAKE2b-256 |
21bc952e2f999e3d8c0d45d1f687cf8e36eb10859d3b8d245cd0c8d70a2ed076
|