Skip to main content

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.update payload 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 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)

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

agent_protocols-0.2.3.tar.gz (13.4 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.2.3-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_protocols-0.2.3.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agent_protocols-0.2.3.tar.gz
Algorithm Hash digest
SHA256 c8008863b8606c539352b7a8c1a0b9d37ad36a436fbb0c30cc272d0be692b85b
MD5 d30d84ed8e638915c531287588b6b4f6
BLAKE2b-256 710f34e8d4a1ab41a68e8081da1627544c6f3deb8802d1615f613f48f203f44a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_protocols-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c3df1626843fa5082a73bb29f9e16e788db5b90985e17d7e6a1eb65127cbb0ff
MD5 a88c6e26cc142a6aff32d912a495db15
BLAKE2b-256 0f87b8d446ebfcea88136fcc9740e87850d84ca521b009cdd81aebb0c6e128af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page