Agent Memory

Persistent memory for AI agents — Algorand Mainnet — x402 + GoPlausible

Hashlock-Algo Live Stats
Write
0.01 USDC
Store or update a key/value in your agent’s memory
Read
0.005 USDC
Retrieve a specific key from your agent’s memory
List
0.01 USDC
List all keys stored for your agent address
Append
0.01 USDC
Push a value onto a persistent JSON array key

Each agent’s identity = its Algorand wallet address.
Pay once per operation — no subscription, no API key.

How it works

  1. Your agent calls the API (e.g. POST /write) — no payment header needed on the first call
  2. The server responds with HTTP 402 and full payment instructions in the body
  3. @x402-avm/fetch automatically signs a USDC transaction and retries with the PAYMENT-SIGNATURE header
  4. The GoPlausible facilitator verifies the signature and broadcasts the transaction on Algorand Mainnet
  5. The server processes the request and returns HTTP 200
Your agent does NOT need ALGO for fees — the GoPlausible fee-payer covers transaction fees. Only USDC is required.
Facilitator: https://facilitator.goplausible.xyz
Payment address: 4OEOVSKSZGG5QGIQ5UUSBAOF3AKR5PP5YZ2K2FKP2SIGEYK3NG4CO6MN4M

Quick Start (Node.js)

Install
npm install @x402-avm/fetch @x402-avm/avm
Agent code
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

POST /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.

Body
{ "key": "my-context", "value": "Remember: user prefers dark mode" }
Response 200
{ "ok": true, "created": true, "agentAddress": "ABCDE...XYZ", "key": "my-context" }
POST /Agent-memory/api/read 0.005 USDC

Retrieve a key from your agent’s memory.

Body
{ "key": "my-context" }
Response 200
{
  "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"
}
POST /Agent-memory/api/list 0.01 USDC

List all keys stored for your agent address (values not returned).

Body
{}
Response 200
{
  "ok": true,
  "agentAddress": "ABCDE...XYZ",
  "count": 2,
  "keys": [
    { "key": "my-context",  "createdAt": "...", "updatedAt": "..." },
    { "key": "task-state",  "createdAt": "...", "updatedAt": "..." }
  ]
}
POST /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.

Body
{ "key": "events", "value": "task completed at 14:32" }
Response 200
{ "ok": true, "agentAddress": "ABCDE...XYZ", "key": "events", "count": 5, "created": false }
GET /Agent-memory/api/health Free

Service status, facilitator URL and current prices.

GET /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.

Live Stats

--
Agents
--
Memory entries
--
Service