HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · MONAD · CELO · AVALANCHE · STELLAR · ALGORAND · ROBINHOOD · USDC · USDG
Agent402 / tools / memory-read

Memory read

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

Read from a wallet-scoped namespace. ?key=… returns the stored value; omit key to list keys. Reads your own namespace by default; add ?owner=0x… to read a namespace you've been granted access to.

Input

FieldTypeDescription
keystringKey to read; omit to list all keys
ownerstringOptional 0x namespace to read (requires a grant)

Example output

{
  "keys": [
    {
      "k": "research/task-42",
      "updated": 1760000000000,
      "exp": null
    }
  ],
  "owner": "0x…",
  "persistent": true
}

Try it - see the 402 challenge (free)

curl -i "https://agent402.tools/api/memory"

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");
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

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: the walle…

Memory counter

$0.001 · POST /api/memory/incr

Atomically increment (or decrement) a numeric key and return the new value - a coordination primitive for counters, lock…

Memory compare-and-set

$0.001 · POST /api/memory/cas

Atomically write (or release) a key only if its current value equals `expected` - the coordination primitive for distrib…