# AgentDiet Context Window Guard — Token Compression Endpoint

> AgentDiet Context Window Guard — Token Compression Endpoint is a paid API for AI agents from status.agentdiet.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Compresses and distills AI context windows by removing bloat, reducing token count by up to 91% while preserving essential information

## Facts

- Endpoint: GET https://status.agentdiet.dev/v1/guard?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-context-window-guard-token-compression-endpoint-fdf67ad1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rzGvcff6QaX55bF0RbxKd

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 agentdiet-context-window-guard-token-compression-endpoint-fdf67ad1
```

Example prompt: Take this long document I've been accumulating in my context window and run it through AgentDiet's guard endpoint to compress it — I want to see the compression ratio and get back the distilled version so I can save tokens on my next LLM call.

## When to prefer this

Choose this endpoint when an AI agent or pipeline needs to reduce token usage before calling an expensive LLM, when a context window is approaching its limit and pruning is needed, or when you want a deterministic compression pass with a measurable ROI proof rather than a lossy summarization. Particularly useful in A2A and MCP pipelines where context accumulates across many steps.

## Known failure modes

- Missing required 'input' or 'method' field returns validation error
- Text input that is already minimal may yield low compression ratio
- Payment not settled in USDC on Base causes 402 payment required response
- Malformed query parameters result in schema validation failure
- Empty text input may return empty data with 0% compression

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://status.agentdiet.dev settling in USDC on Base.

## Output

Returns a JSON object with status 'ok', a compressed/distilled version of the input text in the 'data' field, and an 'roi_proof' object containing the compression_ratio_pct (e.g. 91.4%), demonstrating how much the token footprint was reduced.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-context-window-guard-token-compression-endpoint-fdf67ad1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from status.agentdiet.dev](https://www.zero.xyz/host/status.agentdiet.dev/llms.txt)
