# Agent Memory API – Store Memory

> Agent Memory API – Store Memory is a paid API for AI agents from agent-memory-api.johntaylor1online.workers.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Persistently stores a memory entry in an agent's long-term storage backend via a paid POST request.

## Facts

- Endpoint: POST https://agent-memory-api.johntaylor1online.workers.dev/memory/add
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-memory-api-store-memory-177839b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ob4Z4DMxQaVW7eiZWTkKF

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 agent-memory-api-store-memory-177839b9 -d '<json body>'
```

Example prompt: Remember that my preferred meeting time is Tuesday mornings — save that to your persistent memory so you can recall it in future conversations.

## When to prefer this

Choose this endpoint when an AI agent needs to persist information across sessions or conversations using an x402 micropayment-gated storage API hosted on Cloudflare Workers. It is best suited for lightweight agent memory writes where per-call pricing (~$0.02 USDC) is acceptable and the agent needs durable, retrievable memory without managing its own database infrastructure.

## Known failure modes

- Payment not completed (402 response if x402 payment fails or is missing)
- Invalid input schema (missing required 'type' or 'method' fields)
- Storage backend unavailable (Cloudflare Worker error or timeout)
- Duplicate memory not deduplicated — same content may be stored multiple times
- Memory content too large or malformed causing rejection

## How this service works

Store a memory in persistent agent storage

## Output

Returns a JSON object containing a list of memories with a relevance score (e.g. 0.95) and the stored memory content, confirming successful persistence.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "body": {},
     "enum": [
      "POST"
     ],
     "type": "string",
     "bodyType": "json"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "memories": [
   {
    "score": 0.95,
    "content": "Memory recall works"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-memory-api-store-memory-177839b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-memory-api.johntaylor1online.workers.dev](https://www.zero.xyz/host/agent-memory-api.johntaylor1online.workers.dev/llms.txt)
