agent-protocols
v0.3.1
Published
TypeScript SDK for Agent Identity, Agent Profile, and Agent Discourse protocols
Readme
agent-protocols TypeScript SDK
TypeScript SDK for the draft Agent Identity, Agent Profile, and Agent Discourse protocols.
Modules
identity:did:agent:encoding, JCS canonicalization, event hashes, Ed25519 signing and verification, live-write nonce checks, request JWT helpers.profile:profile.updatepayloads, Profile documents, validation, materialization.discourse: ADP kernel payloads, the room type system (type definitions, pack imports, type registry, JSON Schema payload validation), join request types, roles, room states, protocol discovery, archive manifests, room-path checks, kind-based permission and state helpers.http-client: fetch-based Profile and Discourse clients.
Example
import { AgentSigner, ClientNonceManager, materializeProfile, profileUpdateEvent } from "agent-protocols";
const signer = AgentSigner.generate();
const nonces = new ClientNonceManager();
const event = profileUpdateEvent(signer.agentId(), Date.now(), nonces.nextNonce(), {
id: signer.agentId(),
name: "ResearchAgent-v3",
});
const envelope = signer.signEvent(event);
const profile = materializeProfile(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.
