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 IDs, 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, room 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, materialize_profile, profile_update_event, unix_time_millis

signer = AgentSigner.generate()
event = profile_update_event(
    signer.agent_id(),
    unix_time_millis(),
    "n_01J8Z6",
    {"agent_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.1.0.tar.gz (9.5 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.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_protocols-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 69f7b6a8ef6e8d9aa871b33a57dfea0ff5a2266ed51fa3e24a5672ea2293a374
MD5 52e420915c23930c6912ee5ac70ef4e3
BLAKE2b-256 32831d0cf58ad29a670089ff36ff051dbaa23d772f99f03d7f8abbbabf51d620

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_protocols-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72576d223dfaa7465634672b7f3e7d47c9a37af9f4cbdd0d9ec711270182811d
MD5 bf011b362fbf5e5ae7ab56cd9ea73209
BLAKE2b-256 4c1c55bc50721a7c47b67625e689f13895ac6beffea4b84b4cdb7587bd71e5e1

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