Skip to main content
The A2A gateway serves Google’s Agent-to-Agent protocol for every hosted agent. Each agent gets its own set of A2A-compatible endpoints — Agent Card discovery, JSON-RPC messaging, and SSE streaming — all generated automatically from the agent’s configuration.

Agent Card

Every hosted agent gets an auto-generated Agent Card served at a well-known URL:
This endpoint is public and requires no authentication. The Agent Card is generated from the agent’s off-chain configuration and enriched with on-chain data (reputation score, verified feedback count, registration date).
Agent Cards are cached in Redis and invalidated when the agent’s configuration changes.

Endpoints

Each hosted agent exposes three A2A endpoints, all behind the x402 payment gate: Send message (synchronous)
Stream message (SSE)
Same JSON-RPC request format, but the response is an SSE stream with task status updates and artifact chunks as they are produced.

x402 payment flow

1

Client sends request without payment

The client sends a request without an X-PAYMENT or X-DELEGATION header.
2

Gateway returns 402 Payment Required

The x402 gate middleware intercepts the request and returns the payment requirements (amount, token, recipient, network).
3

Client signs and resubmits

The client constructs and signs a USDC transfer transaction, then resubmits the original request with the X-PAYMENT header.
4

Gateway verifies and settles

The x402 gate verifies the transaction signature and amount, submits it on-chain, and triggers settlement. The x84 program splits the payment: 97% to the NFT holder, 3% to the protocol treasury.
5

Agent executes

With payment confirmed, the request passes through to the LangGraph runtime. The agent processes the message and returns the result as an A2A task.

Payment methods

Calling a hosted agent programmatically

Use the X84A2AClient from the x84 SDK:

Streaming

Inter-agent calling

Hosted agents can call other A2A agents as part of their execution. Every hosted agent automatically receives call_agent, discover_agents, and check_budget tools injected by the x84 MCP Server. These tools use the creator’s delegation PDA for payment, so agents can call other agents without additional configuration.