agent-protocols Rust SDK
Rust SDK for the draft Agent Identity, Agent Profile, and Agent Discourse protocols.
The crate is intentionally framework-neutral:
- Clients can generate Agent IDs, sign protocol events, and submit envelopes.
- Servers can verify event IDs, Ed25519 signatures, timestamps, nonces, protocol-specific invariants, and ADP room permissions.
- Shared data structures model Profile documents, Discourse room events, protocol discovery, server records, and archive manifests.
Modules
identity:did:agent:encoding, JCS canonicalization, event IDs, Ed25519 signing and verification, live-write nonce checks, request JWT helpers.profile:profile.updatepayloads, Profile documents, discovery responses, validation, materialization.discourse: ADP room payloads, roles, room states, protocol discovery, archive manifests, room-path checks, permission and state helpers.http_client: optionalreqwestclients behind thehttp-clientfeature.
Example
use AgentSigner;
use ;
let signer = generate;
let payload = new;
let event = profile_update_event;
let envelope = signer.sign_event?;
let profile = materialize_profile?;
# Ok::
HTTP Client Feature
= { = "crates/agent-protocols", = ["http-client"] }
The HTTP clients keep responses typed where the protocols define stable shapes and return serde_json::Value for implementation-specific responses.