# Agent Memory Key-Value Store

> Agent Memory Key-Value Store is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-18).

Persistent JSON key-value store for AI agents: create a store, then set, get, list, search, append, or atomically increment values across runs or between agents.

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/agent-memory?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-memory-key-value-store-c81e5b6a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y8WiePwbRfyyK4O7XDCuc

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 agent-memory-key-value-store-c81e5b6a -d '<json body>'
```

Example prompt: Remember my research results from this session — store the JSON object under the key 'research/session-42' in my agent memory store mem_abc123, with a TTL of 7 days, and return the new version number so I can do safe updates later.

## When to prefer this

Choose this endpoint when an AI agent needs to persist state between separate execution runs, share structured data with sibling agents, maintain a rolling log or task queue, or implement atomic counters — all without requiring a dedicated database account. It is ideal for lightweight, schema-free JSON storage with built-in TTL, prefix listing, full-text search across keys and values, and optimistic locking via if_version for safe concurrent writes.

## Known failure modes

- Wrong or missing store secret returns an auth error
- if_version mismatch causes a conflict error (safe concurrent update failed)
- Key not found returns null or empty data
- Value exceeds 64 KB size limit
- Too many keys in get_many (>50) or list limit (>100) returns a validation error
- TTL out of range (not 1–365 days) returns a validation error
- append max_items exceeds 1000 returns a validation error
- Payment failure or expired x402 token blocks the call

## How this service works

126 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, checks before installing a package or citing a source, screenshots and PDF, PDF, OCR and document conversion and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

Returns a JSON object with a 'success' boolean and a 'data' field containing the operation result — for get/get_many: the stored value(s) and version numbers; for list: paginated key entries (optionally with values); for search: matching keys/values; for set/append/incr: the updated value and version; for the first write: the new store secret (mem_...).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "by": {
   "type": "number",
   "description": "incr step, default 1"
  },
  "op": {
   "enum": [
    "set",
    "get",
    "get_many",
    "delete",
    "list",
    "search",
    "append",
    "incr"
   ],
   "type": "string",
   "description": "Default: set if value is given, get if key is given, else list"
  },
  "key": {
   "type": "string",
   "maxLength": 200
  },
  "tag": {
   "type": "string"
  },
  "keys": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 50,
   "description": "For get_many and delete"
  },
  "tags": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 10
  },
  "after": {
   "type": "string",
   "description": "list: continue after this key"
  },
  "limit": {
   "type": "integer",
   "maximum": 100
  },
  "query": {
   "type": "string",
   "description": "search: words that must all appear in key or value"
  },
  "store": {
   "type": "string",
   "description": "Store secret from an earlier call (mem_...). Omit on your first write to create a store"
  },
  "value": {
   "type": [
    "object",
    "array",
    "string",
    "number",
    "boolean"
   ],
   "description": "Any JSON value, up to 64 KB (set, append)"
  },
  "prefix": {
   "type": "string"
  },
  "ttl_days": {
   "type": "integer",
   "default": 30,
   "maximum": 365,
   "minimum": 1
  },
  "max_items": {
   "type": "integer",
   "description": "append: keep at most this many items, default 100, max 1000"
  },
  "if_version": {
   "type": "integer",
   "description": "set only if the current version matches (0 = key must not exist)"
  },
  "with_values": {
   "type": "boolean",
   "description": "list: include values"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-memory-key-value-store-c81e5b6a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
