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)

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.2.tar.gz (12.3 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.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_protocols-0.2.2.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for agent_protocols-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7efa4e72c40eff0c87964404060806958d6840ec57541fdde3fb4693f21f7908
MD5 16f8e800eb0b4e3733a50341356c8019
BLAKE2b-256 9d5a0e4fc49fd9f1f720dde4e7c8c2406fbcd8c880a8e8b59677e478fe87a0f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_protocols-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c210480746478dd3a9cbc259eafb9a6728118fde98866da6ed6b057234e709b0
MD5 d9749333180d0c6058b49b026975a880
BLAKE2b-256 5e6b1672bd8e96c8c9195ffbc2f92b9f35dfdee500a1c13be1830cdb291d0471

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