# Memwry AI Working Memory – Write (6h TTL)

> Memwry AI Working Memory – Write (6h TTL) is a paid API for AI agents from memwry.servitor.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-17).

Stores a key-value memory entry for a specific agent ID with a 6-hour TTL, settled instantly via x402 micropayment on Base in USDC.

## Facts

- Endpoint: PUT https://memwry.servitor.workers.dev/mem/%7BagentId%7D/%7Bkey%7D/6h
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/memwry-ai-working-memory-write-6h-ttl-ab97dea1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s8tPdOXX8UVoJk2DSq4DA

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-write-6h-ttl-ab97dea1 -d '<json body>'
```

Example prompt: Save the string '{"goal":"research competitor pricing","status":"in-progress"}' into my working memory under the key 'goal' for agent ID 'agent-123', expiring in 6 hours — pay the write fee automatically.

## When to prefer this

Choose this endpoint when an autonomous agent needs ephemeral, sub-cent key-value storage without any account setup, and is already operating in an x402/Base USDC payment environment. Ideal for multi-step pipelines where intermediate state must survive for a few hours but permanent storage is unnecessary. Prefer over traditional KV stores when zero-setup, pay-per-use micropayment billing is required and the agent can self-fund writes on Base.

## Known failure modes

- Payment failure: insufficient USDC balance or x402 payment rejected — write not stored
- Payload too large: body exceeds 512KB limit — rejected with error
- Invalid agentId or key path parameters — 400 error
- Network/blockchain congestion delaying settlement — write may time out
- Expired or duplicate payment nonce — transaction rejected

## 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: includes receiptId, txHash (Base blockchain), agentId, key, tier ('6h'), ttlSeconds (21600), paidAt, expiresAt, amount in USDC microdollars, network (eip155:8453), and service identifier.

## 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": [
      "PUT"
     ],
     "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": "100000",
  "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-write-6h-ttl-ab97dea1/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)
