Discovery & A2A

How agents find and pay Finality

No signup, no directory approval. An agent can find Finality on the Hedera ledger, ask for free quotes, compare, pay, and parse compact JSON.

The agent loop

  1. 01

    Discover

    HCS-2 registry on the Mirror Node, or /.well-known/x402

  2. 02

    Choose

    /v1/suggest ranks by fit, price, latency

  3. 03

    Quote

    unpaid request → 402 terms, free

  4. 04

    Pay & read

    signed USDC → ?format=compact JSON + receipt

// Agent-to-agent: find Finality on the ledger, get a free quote, pay, read compact JSON.
const registry = await fetch('https://finality.accuracy.wtf/api/x402/v1/discovery/hedera').then((r) => r.json())
//   or read the HCS-2 topic straight from any Mirror Node: /api/v1/topics/<topic>/messages

const plan = await fetch('https://finality.accuracy.wtf/api/x402/v1/suggest?need=HBAR%20trade%20setup&maxLatencyMs=1500').then((r) => r.json())
const pick = plan.data.recommended                   // { id, path, priceUsd, latencyMs, request }

const res = await paidFetch(`https://finality.accuracy.wtf/api/x402${pick.path}?format=compact`, {
  method: pick.method, headers: { 'content-type': 'application/json' }, body: JSON.stringify(pick.request),
})
res.headers.get('x-finality-latency-ms')             // handler time, for your own latency budget

Live: Finality on the ledger

Read right now from the Hedera Mirror Node.

HCS-2 registry · no website needed

Found on the ledger.

Agents discover Finality through HCS-2, compare quotes and pay over x402.

npm run agent -- --registry <topic> \
  --goal "HBAR network health" --budget 0.10

GET mirror node /topics/…/messages

Reading the registry from the Mirror Node…

x402 Bazaar metadata

Every 402 carries the official bazaar extension: HTTP method, an input example with JSON schema, and an output example. Any Bazaar-capable facilitator or crawler can index Finality from a single unpaid request.

Speed for agents

Paid responses include x-finality-latency-ms (handler time). The catalog publishes rolling p50/p95 per endpoint, and /v1/suggest accepts maxLatencyMs.

Discovery documents

/v1/suggestFreePlain-language need → ranked endpoints/agents with price, latency and a ready input
/v1/discovery/hederaFreeFinality’s HCS-2 registry topic and entries (merchant + agents, HCS-14 UAIDs)
/.well-known/x402FreeEvery paid resource with network, payee, USDC asset and atomic amount
/v1/catalogFreeOperations with price, layer, data sources and measured p50/p95 latency
/v1/openapi.jsonFreeOpenAPI 3.1 with x-finality-layer / x-finality-sources / x-finality-price-usd
/.well-known/agent-card.jsonFreeAgent card: skills, ERC-8004 registration
/llms.txtFreeShort instructions for language-model agents

Production API origin: https://finality.accuracy.wtf/api/x402