Agent402 / tools / memory-read

Memory read

$0.001 per call · GET /api/memory · USDC via x402

Read from your wallet-scoped memory. ?key=… returns the stored value; omit key to list your keys. Only the wallet that paid for the writes can read them.

Input

FieldTypeDescription
keystringKey to read; omit to list all your keys

Example output

{
  "key": "research/task-42",
  "value": {
    "status": "done"
  },
  "updated": 1760000000000
}

Try it — see the 402 challenge (free)

curl -i "https://agent402.tools/api/memory?key=research%2Ftask-42"

The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/memory?key=research%2Ftask-42");

Related tools

Memory write

$0.002 · POST /api/memory

Persistent key-value memory for agents, scoped to the paying wallet. Your x402 payment IS your authentication:…