# Memwry AI Working Memory — 6-Hour Write

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

Writes a key-value state entry for an agent with a 6-hour TTL, settling payment instantly on Base via x402 at $0.01 USDC per write.

## Facts

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

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-6-hour-write-35e3178e -d '<json body>'
```

Example prompt: Store the key 'goal' with my current task state under agent ID 'agent-123' in Memwry's 6-hour ephemeral memory tier — it should expire automatically after 6 hours.

## When to prefer this

Choose this endpoint when an AI agent needs ultra-cheap, ephemeral key-value state that expires automatically in 6 hours with no account setup, billed per write via x402 on Base. Ideal for autonomous agent workflows where state only needs to persist for a single session or task window. Prefer over traditional databases when you want zero infrastructure overhead and instant crypto settlement at sub-cent cost.

## Known failure modes

- Payment insufficient or missing — x402 payment header not attached or USDC balance too low
- Invalid agentId or key format — may return 400 Bad Request
- Write conflict if key already exists and overwrite not supported — may return 409
- Network congestion on Base causing settlement delay — rare but possible
- TTL already elapsed before read — state expires exactly 6 hours after write
- Malformed request body — returns 400 with validation error

## 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 L2 transaction hash), agentId, key, tier ('6h'), ttlSeconds (21600), paidAt and expiresAt timestamps, USDC amount charged (in micro-units), network ('eip155:8453'), currency ('USDC'), and service name ('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": [
      "POST"
     ],
     "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": "6h",
  "amount": "10000",
  "paidAt": "2026-08-23T09:42:18Z",
  "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd",
  "agentId": "agent-123",
  "network": "eip155:8453",
  "service": "memwry",
  "currency": "USDC",
  "expiresAt": "2026-08-23T15:42:18Z",
  "receiptId": "d3b07384-d113-4819-8671-ec5bb79116a4",
  "ttlSeconds": 21600
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/memwry-ai-working-memory-6-hour-write-35e3178e/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)
