# WritersLogic Result Cache

> WritersLogic Result Cache is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Caches and retrieves JSON computation results keyed by SHA-256 of the canonicalized request, scoped per wallet or tenantId, with a TTL up to one hour.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/result-cache?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-result-cache-2ac7e0ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UzYKb3PuoaXYgvDT8HQT6

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 writerslogic-result-cache-2ac7e0ee -d '<json body>'
```

Example prompt: Before running that expensive analysis again, check the result cache to see if we already have an answer for this exact request under tenant 'acme-fleet', and if not, run it and store the result for 10 minutes.

## When to prefer this

Use this endpoint when you need a fast, tenant-scoped, request-keyed cache for JSON computation results shared across an agent fleet. Prefer it over building your own caching layer when you want SHA-256-based deduplication, JCS canonicalization, and strict tenant isolation (no cross-customer leakage) out of the box. Ideal for reducing redundant calls to expensive AI, pricing, or analytics APIs within a single fleet.

## Known failure modes

- Value exceeds 16384 bytes serialized — rejected with an error
- Invalid tenantId format (must match ^[A-Za-z0-9_.-]{1,64}$) — validation error
- Invalid namespace format — validation error
- ttlSeconds out of range (must be 1–3600) — validation error
- Missing tenantId for API-key callers — authentication/scoping error
- Cache miss on get — returns miss status, no value
- TTL expired — subsequent get returns miss after expiry

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

For a 'get' operation: a JSON object indicating 'hit' (with the cached value and age in seconds) or 'miss' (status unknown). For a 'put' operation: confirmation that the value was stored under the SHA-256 hash of the canonicalized request, scoped to the tenant.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "op": {
   "enum": [
    "get",
    "put"
   ],
   "type": "string"
  },
  "value": {
   "description": "put: the JSON result, at most 16384 bytes serialized."
  },
  "request": {
   "description": "Any JSON identifying the computation; it is canonicalized (RFC 8785) and hashed."
  },
  "tenantId": {
   "type": "string",
   "pattern": "^[A-Za-z0-9_.-]{1,64}$",
   "description": "Required for API-key callers (namespaced as key:<tenantId>; keep it unguessable). Ignored when a wallet paid: the payer address is the tenant."
  },
  "namespace": {
   "type": "string",
   "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
   "description": "Default: default."
  },
  "ttlSeconds": {
   "type": "integer",
   "maximum": 3600,
   "minimum": 1,
   "description": "put: default 300."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-result-cache-2ac7e0ee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
