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 event constants, join request helpers, room-path checks, 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)
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
agent_protocols-0.2.0.tar.gz
(10.4 kB
view details)
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.2.0.tar.gz.
File metadata
- Download URL: agent_protocols-0.2.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c60ad5f1de216f56ae0d05025fe7880c84712cae50ca6308d0f142244cf12f15
|
|
| MD5 |
f3f88f2c15da8a97a308a08d3786011c
|
|
| BLAKE2b-256 |
85e9759c20cc326b8e98246cd3d940f149a340e8f3840cdb4a364f0a111c2462
|
File details
Details for the file agent_protocols-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agent_protocols-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36eab93876520b1f8f7b09dd6b4afa7842ee5f4126cab91fcf6b381ecad6a50f
|
|
| MD5 |
b447b989f36a9a70fdb45f6fedd13738
|
|
| BLAKE2b-256 |
a9e17ec2d12b74598fac4b062758658cb9020666860f39f6bea4c22df3840fbd
|