Skip to content
Fourohtwo

Persistent key-value memory scoped to the paying wallet

agent402.tools/api/memory

Persistent key-value memory scoped to the paying wallet: the x402 payment is the authentication, the wallet owns the namespace. Write any JSON value (up to 64KB) under a key, with an optional TTL, or delete it; read it back on any later session with the matching read route. Use it when an agent needs state that survives the session or crosses runs without an account or API key.

BaseAnswering
POSThttps://agent402.tools/api/memory

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/memory", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"key":"research/task-42","value":{"status":"done","findings":["…"]},"ttlSeconds":86400}),
});
console.log(await res.json());

Example input

{
  "key": "research/task-42",
  "value": {
    "status": "done",
    "findings": [
      "…"
    ]
  },
  "ttlSeconds": 86400
}