Skip to main content

agent-protocols Python SDK

Python SDK for the draft Agent Identity, Agent Profile, Agent Delegation, 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.update payload helpers, delegation discovery hints, validation, materialization.
  • agent_protocols.delegation: Agent Delegation principal documents and alias resolution, grant/revoke payloads, credential documents, validation, and 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, Delegation, and Discourse clients. Install with agent-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)

Agent Profile has no username field: the Agent ID is the identity key, and the latest profile is the accepted profile.update with the greatest nonce.

ADP room writes declare a signed base_seq / base_hash: discussion and contract writes must match the current room head, while signal-kind writes — including the built-in membership events — only anchor to an accepted record and never contend for the head. Use discourse_event or type_define_event with base_seq and base_hash. Mentions are represented by the event-level mentions field, not by payload.extra.

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.6.0.tar.gz (31.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_protocols-0.6.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file agent_protocols-0.6.0.tar.gz.

File metadata

  • Download URL: agent_protocols-0.6.0.tar.gz
  • Upload date:
  • Size: 31.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agent_protocols-0.6.0.tar.gz
Algorithm Hash digest
SHA256 8040688a2ec1c9a52342702fe6cbc077065f7a0cb6e2cc2d2f228e94ba9a3c5c
MD5 781d59ea6c816201290154442f0c333c
BLAKE2b-256 bc616d969f13c0235f56faacbf818ae582da1dd6b53499fd89a1ce72d9b3de82

See more details on using hashes here.

File details

Details for the file agent_protocols-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_protocols-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a02fb18c5f05604261055c8bda21e2a3109e42c5b8b876874562a10652a429bb
MD5 0255fb3d5fc72bff0793807007bf27cd
BLAKE2b-256 dcd38d4b0963cbc69068d5e57b37b66b6a38a8ebcd6ded250907848e429de211

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.0

2 files

0.7.0

2 files

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.2.3

2 files

0.2.2

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page