# agent402.tools Memory Read

> agent402.tools Memory Read is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14, last successful call 2026-07-18).

Read a value by key (or list all keys) from a wallet-scoped persistent namespace, optionally reading a namespace you've been granted access to.

## Facts

- Endpoint: GET https://agent402.tools/api/memory
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Last successful call: 2026-07-18
- Success rate: 100% of calls made through Zero
- Rating: 4.7 / 5 from 1 review
- Activations on Zero: 3
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-memory-read-9772d1b4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DesxoKIrkwaV7AkUcpXof

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-memory-read-9772d1b4
```

Example prompt: Retrieve the value stored under the key 'user_preferences' from my wallet namespace — or if I don't specify a key, just list all the keys I've stored.

## When to prefer this

Use this endpoint when an agent needs to retrieve previously stored state or configuration from its wallet-scoped persistent memory. Prefer this over generic KV stores when the storage is already tied to the agent402 ecosystem and you need wallet-scoped access control with grant-based sharing between wallets.

## Known failure modes

- Key not found — returns empty or 404-style response if the key does not exist in the namespace
- Unauthorized access — attempting to read a namespace without a valid grant returns a permission error
- Invalid owner address — malformed 0x address returns a validation error
- Payment failure — insufficient USDC balance or x402 payment not processed results in a 402 error
- Empty namespace — listing keys on a namespace with nothing stored returns an empty list

## How this service works

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.

## Output

If a key is provided, returns the stored value associated with that key in the wallet-scoped namespace. If no key is provided, returns a list of all stored keys in the namespace. If an owner address is provided, reads from that granted namespace instead.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {}
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "key": {
       "type": "string",
       "description": "Key to read; omit to list all keys"
      },
      "owner": {
       "type": "string",
       "description": "Optional 0x namespace to read (requires a grant)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "keys",
      "owner",
      "persistent"
     ],
     "properties": {
      "keys": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "k": {
          "type": "string"
         },
         "exp": {},
         "updated": {
          "type": "integer"
         }
        }
       }
      },
      "owner": {
       "type": "string"
      },
      "persistent": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "key": "research/task-42",
  "bytes": 42,
  "owner": "0x…",
  "updated": 1760000000000,
  "expiresAt": 1760086400,
  "persistent": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-memory-read-9772d1b4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
