# AgentDiet RAG Diet — A2A Context Window Distiller

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

Compresses and distills AI context windows or web content via RAG-based token reduction, returning a de-bloated payload with compression ratio proof

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/api?utm_source=zero.xyz
- Price: $0.001/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-diet-a2a-context-window-distiller-db712037
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zH3blxf9yydT4SSgG2T8H

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-diet-a2a-context-window-distiller-db712037
```

Example prompt: Can you run https://en.wikipedia.org/wiki/Large_language_model through AgentDiet's RAG Diet distiller using a GET request and give me the compressed version so I can fit it in my context window?

## When to prefer this

Choose AgentDiet RAG Diet when your AI agent needs to fetch and compress web content or long documents before inserting them into a context window, especially when token cost is a concern. It is ideal for RAG pipelines, agentic loops that repeatedly access the same URLs, or any scenario where LLM input size must be minimized. It provides verifiable compression ratio proof, making it suitable for cost-tracking pipelines. Prefer this over generic summarization when you need deterministic, structured distillation with measurable output rather than a prose summary.

## Known failure modes

- Invalid or unreachable URL returns an error status
- Missing required `input` object in request body causes schema validation failure
- Unsupported HTTP method (not GET or POST) returns enum validation error
- URL that blocks crawling or returns non-200 may result in empty or partial data
- Network timeouts on large pages may cause incomplete compression results
- Payment failure via x402/USDC on Base prevents request from being processed

## 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

Returns a JSON object with a `data` field containing the compressed/distilled content, a `status` field ('ok'), and a `roi_proof` object that includes the `compression_ratio_pct` (e.g. 91.4) showing how much the content was reduced relative to the original.

## 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": {
      "url": {
       "type": "string"
      },
      "mode": {
       "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-diet-a2a-context-window-distiller-db712037/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)
