Skip to main content

Multi-Protocol Chat Examples

Use the Registry Broker to reach agents across protocol adapters. The SDK demos (standards-sdk/demo/registry-broker) showcase each workflow in detail; this guide summarizes the entry points and links directly to the scripts.

Demo Catalog

DemoLocationPurpose
XMTP chat (direct + relay + encrypted history)pnpm run demo:registry-broker-xmtpRegisters two XMTP agents, relays messages through the broker chat endpoint, and validates encrypted history.
ERC-8004 + XMTP endpointpnpm run demo:registry-broker-erc8004-xmtpRegisters an agent whose communication endpoint is XMTP and publishes it to ERC-8004 networks.
ERC-8004 registration + chatdemo/registry-broker/registry-broker-erc8004-demo.tsRegisters an ERC-8004 agent, captures UAIDs, and sends chat prompts.
Solana devnet ERC-8004 chatdemo/registry-broker/solana-devnet-chat.tsDiscovers Solana devnet agent 114, prefers MCP UAIDs, validates echo + ping, and submits feedback.
Agent feedbackdemo/registry-broker/feedback-demo.tsCreates a chat session, checks feedback eligibility, submits an on-chain score, and reads back the summary/index.
OpenRouter chatdemo/registry-broker/openrouter-chat.tsDiscovers OpenRouter UAIDs and relays prompts via the broker’s credit-backed OpenRouter adapter (no direct provider API key required in the client).
Agentverse multi-agent bridgedemo/registry-broker/registry-broker-agentverse-demo.tsRegisters two Agentverse agents and mirrors a multi-party conversation.
All-in-one orchestratordemo/registry-broker/registry-broker-demo.tsRuns ERC-8004, OpenRouter, Agentverse, and history APIs sequentially.
History + ledger authdemo/registry-broker/registry-broker-history-demo.tsDemonstrates ledger auth, chat history management, and UAID discovery.
HCS-10 ↔ Registry bridgedemo/hcs-10/registry-broker-hcs10-chat.tsPublishes an HCS-10 agent and relays chat via the registry broker.

Each section below highlights how to customize the demos for specific adapters.

Talk to an ERC-8004 Agent

  1. Run demo/registry-broker/registry-broker-erc8004-demo.ts to register an ERC-8004 agent and record its UAID.
  2. Use client.chat.createSession({ uaid }) with the recorded UAID.
  3. Send messages via client.chat.sendMessage(...) as shown in the demo to move intent through the ERC-8004 adapter.

Talk to an OpenRouter Agent

  1. Run demo/registry-broker/openrouter-chat.ts to discover the OpenRouter UAID (same UAID is used in this doc).
  2. Call client.chat.createSession({ uaid }) to open a chat session backed by the broker’s OpenRouter adapter.
  3. Push prompts with client.chat.sendMessage(...) and watch the broker mediate the OpenRouter response using your Registry Broker credits.

Talk to an Agentverse Agent

  1. The multi-agent demo demo/registry-broker/registry-broker-agentverse-demo.ts registers two Agentverse agents via the registry.
  2. Use the UAIDs returned by that demo and create a session per UAID.
  3. The demo already contains the message loop; reuse it to observe multi-agent conversation flow.

Talk to an XMTP Agent

XMTP agents register with communicationProtocol: "xmtp" and an address-like endpoint (xmtp://0x...). Clients still chat via the broker’s chat endpoint—end users do not need an XMTP private key to send messages through the broker.

  • Run pnpm run demo:registry-broker-xmtp to register two XMTP agents and exchange direct + relayed messages.
  • See XMTP Integration for registration payloads and chat snippets.

Agentverse + ERC-8004 in One Shot

demo/registry-broker/registry-broker-demo.ts orchestrates ERC-8004, Agentverse, OpenRouter, and history flows from a single run. Use it as a reference for stitching together multiple adapters.

Resources

Loading supported protocols…