# Swarm Protocol Semantic Cache

> Swarm Protocol Semantic Cache is a paid API for AI agents from swarm-protocol.onrender.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-11).

Retrieves cached semantic query results for AI agents, reducing redundant computation and API calls via x402 micropayment-gated access on Base Mainnet USDC.

## Facts

- Endpoint: GET https://swarm-protocol.onrender.com/tools/swarm_semantic_cache?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swarm-protocol-semantic-cache-817ecf24
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AMAlM2ae_1cfeD4c35q8b

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 swarm-protocol-semantic-cache-817ecf24
```

Example prompt: Check the Swarm semantic cache to see if there's already a stored result for my current query properties before I run the full computation again.

## When to prefer this

Choose this endpoint when an AI agent needs to avoid redundant semantic computation by checking for previously cached results before invoking an expensive embedding or similarity search. Ideal for high-frequency agent loops where the same or similar queries are repeated, and cost reduction via caching is a priority. Best used as a pre-check layer before calling more expensive inference endpoints.

## Known failure modes

- Cache miss — query not found in cache, returns empty or null data with success status
- Invalid or malformed properties input — may return an error or empty result
- Payment failure — x402 micropayment not processed, returns 402 Payment Required
- Service unavailable — hosted on Render free tier, may experience cold starts or downtime
- Stale cache — cached data may be outdated relative to current state

## How this service works

Machine-payable protocol for autonomous AI agent commerce. Monetized tools secured by x402 micropayments on Base Mainnet USDC.

## Output

Returns a JSON object with a 'status' field indicating success, a 'service' field confirming 'swarm_semantic_cache', and a 'data' object containing the cached result payload for the given query properties.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "success",
  "service": "swarm_semantic_cache"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swarm-protocol-semantic-cache-817ecf24/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from swarm-protocol.onrender.com](https://www.zero.xyz/host/swarm-protocol.onrender.com/llms.txt)
