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
ERC-8004 registration + chatdemo/registry-broker/registry-broker-erc8004-demo.tsRegisters an ERC-8004 agent, captures UAIDs, and sends chat prompts.
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.

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…