Demos › A2A Protocol

A2A Protocol Support

Every service on the Sertone network is automatically discoverable by any AI agent using Google's Agent-to-Agent protocol. No extra configuration, no separate registry — it just works.

What is A2A?

Google's Agent-to-Agent (A2A) protocol is an open standard that lets AI agents call each other over plain HTTPS using a JSON-RPC 2.0 wire format. An agent publishes an agent card — a JSON file at a well-known URL — describing its capabilities, endpoints, and authentication requirements. Other agents read the card, discover what the agent can do, and call it.

A2A solves the call format problem elegantly. But it leaves two critical gaps open:

🔍
Gap 1: Discovery

A2A has no registry. An agent card is only useful if you already know where it lives. There is no "search for agents that can do X".

💵
Gap 2: Payment

A2A has no payment layer. If your agent calls a commercial service, you need a separate billing arrangement — API keys, invoices, credit limits, chargebacks.

Sertone fills both gaps. Every service registered on the Sertone network automatically gets a standards-compliant agent card. Your Sertone control center is the discovery registry — search by capability, category, or keyword. Payment settles automatically in USDC on every call, with no setup beyond funding your wallet.

The Call Path

Consumer Premises
AI Agent
(Your App)
Your Sertone
Control Center
On your premises
▼ A2A JSON-RPC Request ▲ Agent Response
Sertone Global Network
🔒 Encrypted 🔗 Automatic Payment 🤖 A2A Agent Cards
900+ services — all A2A-compatible, all discoverable, all paid in USDC
▼ A2A JSON-RPC Request ▲ Agent Response
Owner Premises
Their Sertone
Control Center
Service
Provider
On their premises

What is the Sertone control center? A single Docker container you run on your own machine — a laptop, a Raspberry Pi, a cloud server. It connects you to the Sertone Global Network. Through its built-in web console, you browse services, register your own, manage your wallet, and monitor your earnings. Installation takes minutes. It is completely free, forever.

docker run -d --name my-sertone -p 3000:3000 -p 3002:3002 sertone/wrapper:latest

Every service registered on the Sertone network automatically generates a standards-compliant A2A agent card. No extra steps for the service owner. No extra integration for the AI agent developer.

Build Your First A2A Agent in 5 Minutes

Here is a complete Python agent that discovers and calls an earthquake monitoring service through the Sertone network using the A2A protocol. Copy, paste, run.

Python

#!/usr/bin/env python3
"""
My First A2A Agent — discovers and calls services on the Sertone network.
No SDK needed. Just HTTP requests.
"""
import requests

SERTONE = "https://localhost:3000"  # Your Sertone control center
SECRET  = "YOUR_CONSUMER_SECRET"    # From Settings > Security in your web console

# Step 1: Discover services
print("Discovering earthquake services...")
agents = requests.get(f"{SERTONE}/a2a/discover",
    params={"capability": "earthquake", "limit": 3},
    verify=False  # remove in production with proper TLS
).json()

for agent in agents["agents"]:
    print(f"  Found: {agent['name']} — ${agent['x_sertone']['price_per_call']}/call")

# Step 2: Read the agent card
uuid = agents["agents"][0]["x_sertone"]["uuid"]
card = requests.get(f"{SERTONE}/agent/{uuid}/card.json", verify=False).json()
print(f"\nAgent: {card['name']}")
print(f"Skills: {[s['name'] for s in card['skills']]}")

# Step 3: Call the service via A2A JSON-RPC
print(f"\nCalling {card['name']}...")
response = requests.post(f"{SERTONE}/a2a/message",
    headers={"X-Consumer-Secret": SECRET, "Content-Type": "application/json"},
    json={
        "jsonrpc": "2.0",
        "method": "message/send",
        "params": {
            "api_uuid": uuid,
            "content": '{"path":"/v1/earthquakes/recent","method":"GET","params":{"min_magnitude":5,"limit":5}}'
        },
        "id": 1
    },
    verify=False
).json()

# Step 4: Use the result
if "result" in response:
    data = response["result"]["output"]
    print(f"Status: {response['result']['status']}")
    if isinstance(data, dict) and "data" in data:
        for eq in data["data"][:5]:
            print(f"  M{eq.get('magnitude','?')} — {eq.get('place','?')}")
    print(f"\nSettlement: automatic, USDC")
else:
    print(f"Error: {response.get('error',{}).get('message','unknown')}")

Expected output

$ python3 my_agent.py

Discovering earthquake services...
  Found: USGS Earthquake Catalog — $0.001/call

Agent: USGS Earthquake Catalog
Skills: ['Recent Earthquakes', 'Earthquake Search']

Calling USGS Earthquake Catalog...
Status: completed
  M5.2 — 120km SSW of Kodiak, Alaska
  M5.0 — Vanuatu
  M5.1 — South Sandwich Islands

Settlement: automatic, USDC

JavaScript (Node.js)

#!/usr/bin/env node
// My First A2A Agent — Node.js version
const SERTONE = 'https://localhost:3000';
const SECRET = 'YOUR_CONSUMER_SECRET';

async function main() {
  // Discover
  const agents = await fetch(`${SERTONE}/a2a/discover?capability=earthquake&limit=3`)
    .then(r => r.json());
  console.log(`Found ${agents.agents.length} service(s)`);

  // Call via A2A
  const uuid = agents.agents[0].x_sertone.uuid;
  const result = await fetch(`${SERTONE}/a2a/message`, {
    method: 'POST',
    headers: { 'X-Consumer-Secret': SECRET, 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      method: 'message/send',
      params: { api_uuid: uuid, content: '{"path":"/v1/earthquakes/recent","method":"GET"}' },
      id: 1,
    }),
  }).then(r => r.json());

  console.log('Result:', JSON.stringify(result.result?.output, null, 2));
}
main();

curl one-liner

# Discover services
curl -sk "https://localhost:3000/a2a/discover?capability=earthquake&limit=3" | python3 -m json.tool

# Call a service directly
curl -sk -X POST "https://localhost:3000/a2a/message" \
  -H "X-Consumer-Secret: YOUR_CONSUMER_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "message/send",
    "params": {
      "api_uuid": "YOUR_SERVICE_UUID",
      "content": "{\"path\":\"/v1/earthquakes/recent\",\"method\":\"GET\"}"
    },
    "id": 1
  }' | python3 -m json.tool

That is it. No SDK, no framework, no library. Just HTTP requests to your own Sertone control center. The A2A protocol is standard JSON-RPC 2.0 — any language that can make HTTP calls can be an A2A agent. Payment settles automatically in USDC on every call.

How A2A Works on Sertone

Three steps from zero to a running AI agent that calls paid services over A2A.

1

Discover services by capability

Ask your Sertone to find all services with a given capability. Returns a list of agent cards matching your query.

# Discover services by capability keyword # Your Sertone control center runs at localhost:3000 $ curl https://localhost:3000/a2a/discover?capability=earthquake&limit=3
{ "agents": [ { "name": "USGS Earthquake Monitor", "description": "Real-time earthquake data worldwide. Magnitude, depth, location.", "url": "https://localhost:3000/agent/a1b2c3d4-e5f6-7890-abcd-ef1234567890/card.json", "capabilities": ["earthquake", "seismic", "geolocation"], "price_usdc_per_call": 0.0002 }, { "name": "Global Seismic Events API", "description": "Historical and live seismic events. GeoJSON output.", "url": "https://localhost:3000/agent/f9e8d7c6-b5a4-3210-fedc-ba9876543210/card.json", "capabilities": ["earthquake", "geojson", "historical"], "price_usdc_per_call": 0.0005 } ], "total": 2 }
2

Read an agent card

Every registered service on Sertone auto-generates a standards-compliant A2A agent card. Fetch it to see full capabilities, supported methods, and authentication requirements.

$ curl https://localhost:3000/agent/a1b2c3d4-e5f6-7890-abcd-ef1234567890/card.json
{ "schema_version": "1.0", "name": "USGS Earthquake Monitor", "description": "Real-time earthquake data worldwide. Magnitude, depth, location.", "url": "https://localhost:3000/a2a/message", "version": "1.0.0", "capabilities": { "streaming": false, "push_notifications": false }, "skills": [ { "id": "get_recent_earthquakes", "name": "Get Recent Earthquakes", "description": "Fetch earthquakes above a minimum magnitude in a given time range.", "input_modes": ["text"], "output_modes": ["data"], "examples": ["earthquakes above 5.0 in the last 7 days"] } ], "authentication": { "schemes": ["bearer"], "note": "Pass X-Consumer-Secret header. Payment auto-settled in USDC." }, "_sertone": { "api_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "price_usdc_per_call": 0.0002, "settlement": "blockchain" } }
3

Call the agent via JSON-RPC

Send a standard A2A message/send call. Your Sertone routes it through the network, settles the payment automatically, and returns the response.

$ curl -X POST https://localhost:3000/a2a/message \ -H "X-Consumer-Secret: YOUR_SECRET" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "message/send", "params": { "api_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "content": "{\"path\":\"/v1/earthquakes/recent\",\"method\":\"GET\",\"params\":{\"minmagnitude\":\"5.0\",\"limit\":\"5\"}}" }, "id": 1 }'
{ "jsonrpc": "2.0", "result": { "status": "completed", "data": { "type": "FeatureCollection", "features": [ { "properties": { "mag": 5.4, "place": "127km SSE of Kamchatka" } }, { "properties": { "mag": 5.1, "place": "Southern Mid-Atlantic Ridge" } } ] }, "_sertone": { "settled": true, "price_usdc": "0.000200", "latency_ms": 67 } }, "id": 1 }

How to get started

Any developer building AI agents can connect to 900+ Sertone services over A2A in minutes. Here is the complete flow from installation to first A2A call:

1

Install your Sertone control center

One Docker command on any machine — your laptop, a Raspberry Pi, a cloud VM.

$ docker run -d --name my-sertone -p 3000:3000 -p 3002:3002 sertone/wrapper:latest
2

Browse agents in the catalog

Open your web console at https://localhost:3002/panel. Go to the Catalog tab. Every service listed has a built-in A2A agent card. Search by capability, category, or keyword.

3

Preview with demo samples

Click on any service to see its agent card, available skills, and example inputs. Try it in the Swagger sandbox — demo samples are free, no payment needed. See the exact JSON-RPC response format before you spend a cent.

4

Fund your wallet

Go to the Finance tab. Deposit USDC and a small amount of ETH for gas. Your control center shows both balances and alerts you when they are low. Payment is per-call — no subscriptions, no minimums.

5

Integrate A2A in your agent

Copy your consumer secret from Settings. Use the service UUID from the catalog. The A2A endpoint is standard JSON-RPC 2.0 — compatible with LangChain, CrewAI, Google ADK, and any A2A-aware framework:

$ curl -X POST https://localhost:3000/a2a/message \ -H "X-Consumer-Secret: YOUR_SECRET" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"message/send","params":{"api_uuid":"SERVICE_UUID","content":"{\"path\":\"/v1/earthquakes/recent\",\"method\":\"GET\"}"},"id":1}'

The web console also generates ready-to-use agent integration code (Python, TypeScript, Go) with the UUID pre-filled.

6

Your agent is live

Every A2A call settles automatically in USDC. You pay the service owner's price. No invoices, no payment terms, no chargebacks. Your Finance tab shows every transaction in real time.

Why Sertone fills the gaps

🔍

A2A has no discovery registry

Your Sertone control center IS the registry. Search 900+ services by capability, category, or keyword. Every result includes a standards-compliant agent card.

💵

A2A has no payment layer

Sertone settles every A2A call in USDC automatically via smart contract. No API keys to manage, no invoices, no billing agreements with each service provider.

🤖

Every service is auto-enrolled

Service owners do nothing extra. Register a REST API, get an A2A agent card for free. 900+ services are A2A-ready on day one.

🔗

Works with all A2A frameworks

Standard JSON-RPC 2.0 over HTTPS. Compatible with LangChain, CrewAI, Google ADK, AutoGen, and any framework that implements the A2A spec.

🔒

End-to-end encrypted

All A2A traffic through the Sertone Global Network is fully encrypted. No central server sees your agent's queries or your data in transit.

🏠

Runs on a Raspberry Pi

Your A2A-capable Sertone control center is a single Docker container. Run it anywhere — your laptop, a Raspberry Pi, a cloud VM. Free, forever.

Run a Live A2A Query

POST /a2a/message — A2A JSON-RPC call through the Sertone Global Network
Waiting
Select a capability above and click Discover & Call
Simulated A2A discovery + call through the Sertone Global Network. Install your own Sertone to make real calls.

Integrate A2A in Your Agent

Your Sertone control center runs at localhost:3000. The service UUID comes from the catalog or a discovery call. Everything else is standard A2A JSON-RPC 2.0.

# Step 1: Discover agents by capability $ curl "https://localhost:3000/a2a/discover?capability=earthquake&limit=3" # Step 2: Read the agent card $ curl https://localhost:3000/agent/SERVICE_UUID/card.json # Step 3: Send an A2A message/send call $ curl -X POST https://localhost:3000/a2a/message \ -H "X-Consumer-Secret: YOUR_SECRET" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "message/send", "params": { "api_uuid": "SERVICE_UUID", "content": "{\"path\":\"/v1/earthquakes/recent\",\"method\":\"GET\",\"params\":{\"minmagnitude\":\"5.0\",\"limit\":\"5\"}}" }, "id": 1 }' # Response includes your data + settlement confirmation: # { "jsonrpc":"2.0", "result": { "status":"completed", "data": {...}, "_sertone": { "settled":true, "price_usdc":"0.000200" } }, "id":1 }
# Python — standard requests library + A2A pattern # pip install requests # SERVICE_UUID: from /a2a/discover or the catalog. YOUR_SECRET: from Settings tab. import requests, json BASE = 'https://localhost:3000' SECRET = 'YOUR_SECRET' # 1. Discover agents agents = requests.get(f'{BASE}/a2a/discover', params={'capability': 'earthquake', 'limit': '3'}).json() uuid = agents['agents'][0]['url'].split('/')[-2] # extract UUID # 2. Send A2A message/send r = requests.post(f'{BASE}/a2a/message', headers={'X-Consumer-Secret': SECRET}, json={ 'jsonrpc': '2.0', 'method': 'message/send', 'params': { 'api_uuid': uuid, 'content': json.dumps({'path': '/v1/earthquakes/recent', 'method': 'GET'}), }, 'id': 1, }) result = r.json()['result'] print(result['data']) # your earthquake data print(result['_sertone']) # settled: True, price_usdc: '0.000200'
// Node.js or browser — plain fetch(), no SDK needed // SERVICE_UUID: from /a2a/discover or the catalog. // YOUR_SECRET: from Settings tab in your web console. const BASE = 'https://localhost:3000'; const SECRET = 'YOUR_SECRET'; // 1. Discover agents by capability const discovery = await fetch(`${BASE}/a2a/discover?capability=earthquake&limit=3`); const { agents } = await discovery.json(); const uuid = agents[0].url.split('/').at(-2); // extract UUID from card URL // 2. Send A2A message/send const res = await fetch(`${BASE}/a2a/message`, { method: 'POST', headers: { 'X-Consumer-Secret': SECRET, 'Content-Type': 'application/json', }, body: JSON.stringify({ jsonrpc: '2.0', method: 'message/send', params: { api_uuid: uuid, content: JSON.stringify({ path: '/v1/earthquakes/recent', method: 'GET' }), }, id: 1, }), }); const { result } = await res.json(); console.log(result.data); // earthquake features console.log(result._sertone); // { settled: true, price_usdc: '0.000200', latency_ms: 67 } // Your Sertone handles routing, billing, and settlement automatically. // Check your balance in the Finance tab of your web console.