# AgentDiet RAG Context Window Distiller

> AgentDiet RAG Context Window Distiller is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Compresses and distills AI context windows by up to 85-91% token reduction via a RAG-based de-bloating execution node, paid per-call in USDC on Base.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/execute?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-rag-context-window-distiller-2ccdff0f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WvDPHyX4e14hrXjQQo3Xz

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-rag-context-window-distiller-2ccdff0f
```

Example prompt: Compress this context window for me using AgentDiet's RAG distiller — run a GET query with my input text and tell me how much token reduction I get back.

## When to prefer this

Choose this endpoint when an AI agent or pipeline needs to reduce token count before calling an expensive LLM, when RAG retrieval results are too large for a model's context window, or when you want deterministic per-call compression billed at $0.01 USDC on Base via x402. Prefer it over generic summarization APIs when you need a measurable compression ratio proof and A2A/MCP-compatible execution.

## Known failure modes

- Missing or malformed 'input' object returns a validation error
- Invalid 'type' value (must be 'http') causes rejection
- Payment failure via x402/USDC on Base results in 402 response and no processing
- Empty or null query param produces empty distillation result
- Network timeout if the compression node is temporarily unavailable

## How this service works

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

## Output

A JSON response containing a 'data' object with the distilled context output, a 'status' field ('ok' on success), and an 'roi_proof' object showing the compression_ratio_pct achieved (e.g. 91.4%).

## 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": {
      "query": {
       "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-rag-context-window-distiller-2ccdff0f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag-diet.agentdiet.dev](https://www.zero.xyz/host/rag-diet.agentdiet.dev/llms.txt)
