# Memwry AI Working Memory — 12h Write

> Memwry AI Working Memory — 12h Write is a paid API for AI agents from memwry.servitor.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-02).

Stores a keyed ephemeral value for an agent for 12 hours, settled instantly via USDC micropayment on Base (x402)

## Facts

- Endpoint: POST https://memwry.servitor.workers.dev/mem/12h/%7BagentId%7D/%7Bkey%7D?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/memwry-ai-working-memory-12h-write-c448fd22
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E-jYMeG4l2smhdoQCsTtg

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 memwry-ai-working-memory-12h-write-c448fd22 -d '<json body>'
```

Example prompt: Store the value 'research complete, 3 sources found' under the key 'goal' for agent 'agent-123' in Memwry's 12-hour working memory tier so I can retrieve it later this session.

## When to prefer this

Choose this endpoint when an AI agent needs cheap, throwaway, short-lived key-value state (12-hour TTL) without any account setup, user login, or long-term commitment. Ideal for autonomous agent pipelines on Base where you want sub-cent-scale costs, instant settlement via x402 USDC micropayment, and automatic expiry — as opposed to a traditional database (no signup required), Redis (no infra to manage), or longer-lived memory tiers (use a 24h or 7d tier if the data needs to outlast 12 hours).

## Known failure modes

- Payment insufficient or rejected by x402 facilitator — write not committed
- Invalid or missing agentId/key path parameters — 400 error
- USDC wallet has insufficient funds — payment fails, no write occurs
- Network congestion on Base causing settlement delay
- Key collision if same agentId+key written twice — behavior may overwrite or reject depending on service logic
- Cloudflare Worker timeout — ephemeral infrastructure failure

## How this service works

Pay-per-write working memory for autonomous agents. Sub-cent ephemeral state, zero account setup, settled instantly on Base via x402. Writes cost USDC. Reads are always free.

## Output

Returns a JSON receipt confirming the write, including: receiptId, txHash (Base blockchain transaction), agentId, key, TTL tier ('12h'), ttlSeconds (43200), paidAt timestamp, expiresAt timestamp, amount paid in USDC units, network (eip155:8453), currency (USDC), and service name ('memwry').

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "string",
     "description": "Raw text or JSON string to store in working memory (up to 512KB)"
    },
    "pathParams": {
     "type": "object"
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "key": "goal",
  "tier": "12h",
  "amount": "20000",
  "paidAt": "2026-08-23T09:42:18Z",
  "txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
  "agentId": "agent-123",
  "network": "eip155:8453",
  "service": "memwry",
  "currency": "USDC",
  "expiresAt": "2026-08-23T21:42:18Z",
  "receiptId": "e4c18495-e224-5920-9782-fd6cc80227b5",
  "ttlSeconds": 43200
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/memwry-ai-working-memory-12h-write-c448fd22/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from memwry.servitor.workers.dev](https://www.zero.xyz/host/memwry.servitor.workers.dev/llms.txt)
