# Memwry AI Working Memory — 12h Ephemeral Write

> Memwry AI Working Memory — 12h Ephemeral 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-09-19).

Stores a keyed value in ephemeral agent working memory for 12 hours, paid per-write with USDC via x402 on Base; reads are always free.

## Facts

- Endpoint: GET https://memwry.servitor.workers.dev/mem/%7BagentId%7D/%7Bkey%7D/12h
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/memwry-ai-working-memory-12h-ephemeral-write-89a400da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iC13_WpoXgjuKTAJEzCUQ

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-ephemeral-write-89a400da
```

Example prompt: Save the current goal state for agent 'agent-123' under the key 'goal' in Memwry working memory for 12 hours — the value is: {"currentTask": "summarize documents", "step": 3}.

## When to prefer this

Choose this endpoint when an autonomous agent needs lightweight, ephemeral key-value storage for 12 hours with no account setup, no persistent infrastructure, and sub-cent cost settled instantly on-chain via USDC. Ideal for agent workflows requiring transient scratchpad state, checkpoint data, or inter-step context passing without a dedicated database. Prefer over full databases or persistent KV stores when data lifetime of exactly 12 hours is acceptable and pay-per-write pricing is desirable.

## Known failure modes

- Payment failure — insufficient USDC balance or x402 payment not accepted; returns payment error
- Body too large — payload exceeds 512KB limit; returns 413 or equivalent error
- Invalid agentId or key path parameters — malformed URL path; returns 400
- Network/blockchain congestion — settlement delay or tx failure on Base; may return 503 or timeout
- Expired or invalid payment token — x402 auth header missing or malformed; returns 402

## 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 (UUID), txHash (Base chain transaction hash), agentId, key, tier ('12h'), ttlSeconds (43200), paidAt timestamp, expiresAt timestamp, amount in USDC microcents (200000 = $0.20), network ('eip155:8453'), currency ('USDC'), and service identifier ('memwry').

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "string",
     "description": "Raw text or JSON string to store in working memory (up to 512KB)"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## 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-ephemeral-write-89a400da/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)
