Each agent’s identity = its Algorand wallet address.
Pay once per operation — no subscription, no API key.
How it works
- Your agent calls the API (e.g.
POST /write) — no payment header needed on the first call - The server responds with
HTTP 402and full payment instructions in the body @x402-avm/fetchautomatically signs a USDC transaction and retries with thePAYMENT-SIGNATUREheader- The GoPlausible facilitator verifies the signature and broadcasts the transaction on Algorand Mainnet
- The server processes the request and returns
HTTP 200
https://facilitator.goplausible.xyzPayment address:
4OEOVSKSZGG5QGIQ5UUSBAOF3AKR5PP5YZ2K2FKP2SIGEYK3NG4CO6MN4M
Quick Start (Node.js)
npm install @x402-avm/fetch @x402-avm/avm
import { wrapFetchWithPayment, x402Client } from '@x402-avm/fetch'
import { ExactAvmScheme, toClientAvmSigner, ALGORAND_MAINNET_CAIP2 } from '@x402-avm/avm'
const API = 'https://pronodealgo.xyz/Agent-memory/api'
// Init — one time setup
const signer = toClientAvmSigner(process.env.AVM_PRIVATE_KEY) // base64 64-byte key
const scheme = new ExactAvmScheme(signer, { algodUrl: 'https://mainnet-api.algonode.cloud' })
const client = new x402Client()
client.register(ALGORAND_MAINNET_CAIP2, scheme)
const fetch402 = wrapFetchWithPayment(fetch, client)
// The library handles 402 → sign → retry automatically
// No need to broadcast manually or manage transaction IDs
// Write a memory entry (0.01 USDC)
const res = await fetch402(`${API}/write`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ key: 'task-state', value: 'step=3, user=alice' })
})
console.log(await res.json())
// { ok: true, created: true, agentAddress: 'YOUR_ALGO_ADDRESS', key: 'task-state' }
// Read it back (0.005 USDC)
const res2 = await fetch402(`${API}/read`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ key: 'task-state' })
})
console.log(await res2.json())
// { ok: true, key: 'task-state', value: 'step=3, user=alice', ... }
API Reference
/Agent-memory/api/write
0.01 USDC
Store or update a key/value pair in your agent’s memory. Key: alphanumeric + -_. , max 128 chars. Value: max 32 KB.
{ "key": "my-context", "value": "Remember: user prefers dark mode" }
{ "ok": true, "created": true, "agentAddress": "ABCDE...XYZ", "key": "my-context" }
/Agent-memory/api/read
0.005 USDC
Retrieve a key from your agent’s memory.
{ "key": "my-context" }
{
"ok": true,
"agentAddress": "ABCDE...XYZ",
"key": "my-context",
"value": "Remember: user prefers dark mode",
"createdAt": "2026-06-17T14:00:00.000Z",
"updatedAt": "2026-06-17T14:00:00.000Z"
}
/Agent-memory/api/list
0.01 USDC
List all keys stored for your agent address (values not returned).
{}
{
"ok": true,
"agentAddress": "ABCDE...XYZ",
"count": 2,
"keys": [
{ "key": "my-context", "createdAt": "...", "updatedAt": "..." },
{ "key": "task-state", "createdAt": "...", "updatedAt": "..." }
]
}
/Agent-memory/api/append
0.01 USDC
Push a value onto a persistent JSON array. If the key doesn’t exist, creates [value]. If it exists and holds a JSON array, appends. Subject to the 32 KB total limit.
{ "key": "events", "value": "task completed at 14:32" }
{ "ok": true, "agentAddress": "ABCDE...XYZ", "key": "events", "count": 5, "created": false }
/Agent-memory/api/health
Free
Service status, facilitator URL and current prices.
/Agent-memory/api/stats
Free
Global usage stats: total agents, total memory entries.
x402 Payment Protocol
Without a payment header, the server returns HTTP 402 Payment Required
with structured instructions — fully compatible with the
x402 standard v2
and the GoPlausible AVM implementation.
HTTP/1.1 402 Payment Required
{
"x402Version": 2,
"accepts": [{
"scheme": "exact",
"network": "algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=",
"asset": "31566704",
"amount": "10000",
"payTo": "4OEOVSKSZGG5QGIQ5UUSBAOF3AKR5PP5YZ2K2FKP2SIGEYK3NG4CO6MN4M",
"maxTimeoutSeconds": 300
}],
"error": "Payment required"
}
The client signs a USDC axfer transaction and retries with a
PAYMENT-SIGNATURE header containing the signed transaction group (base64 JSON).
The GoPlausible facilitator broadcasts the group atomically —
including a fee-payer transaction so your agent needs no ALGO.