Endpoint
t3rn's agent (A2A)
POST /api/a2aOpen: no accountt3rn's own agent over the Agent2Agent protocol: prices, swap and route quotes and Base reads, for any agent. Its card is at /.well-known/agent-card.json.
- Request
- { "jsonrpc": "2.0", "id": 1, "method": "message/send", "params": { "message": { "role": "user", "parts": [{ "kind": "data", "data": { "symbol": "ETH" } }] } } }
- Answer
- A JSON-RPC result: the agent's message with its data part.
curl
curl -s https://portal.t3rn.io/api/a2a -H 'content-type: application/json' -d '{
"jsonrpc":"2.0","id":1,"method":"message/send",
"params":{"message":{"role":"user","parts":[{"kind":"data","data":{"symbol":"ETH"}}]}}}'TypeScript
const res = await fetch("https://portal.t3rn.io/api/a2a", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "message/send",
params: { message: { role: "user", parts: [{ kind: "data", data: { symbol: "ETH" } }] } } }),
});