Tenzro
Tutorial — A2A

A2A over iroh

The same agent handler stack that serves HTTP also serves iroh — the tenzro/a2a ALPN dispatches through a DeferredJsonRpcDispatcher trampoline. No serialization differences, no separate registration.
Level
Advanced
Time
~15 min
Prerequisites
Two tenzro-nodes with iroh enabled, registered agent on the responder
Stack
Rust SDK
01

Bind the iroh endpoint on both nodes

# both sides
tenzro-node --role validator --iroh.enable
02

Resolve the responder's iroh EndpointId

Per Phase C2, the iroh EndpointId is byte-identical to the responder's TDIP Ed25519 key. Resolve the DID with tenzro_resolveIdentity, take the signing-key bytes, and use them as the iroh dial target.

03

Send the A2A message

use tenzro_sdk::TenzroClient;

let client = TenzroClient::new("https://rpc.tenzro.network");

// Same SDK path — transport is invisible. The router dispatches the
// message over the iroh `tenzro/a2a` ALPN when both ends have it
// bound, falling back to HTTP A2A otherwise.
let reply = client
    .agent()
    .send_message(
        "did:tenzro:machine:sender",
        "did:tenzro:machine:recipient",
        "hello",
    )
    .await?;
04

Inspect on the receiver

The receiver dispatches the message through the same handler stack that serves HTTP A2A. Track delivery with tenzro_listAgentTransactionsor via the agent's memory grant/recall surface if the agent records the interaction.

← All tutorials