# AgentDiet RAG Diet Tool Broker — A2A Context Window Distiller

> AgentDiet RAG Diet Tool Broker — A2A 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 agent context windows by up to 91% using a retrieval-augmented distillation pipeline, returning semantically dense, token-efficient results via a paid API settled in USDC on Base.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/tool-broker?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-diet-tool-broker-a2a-context-window-distiller-4e267e50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RZ3vvLytn4svYi_fUhY9t

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-tool-broker-a2a-context-window-distiller-4e267e50
```

Example prompt: Compress this retrieved context using AgentDiet's RAG Diet distiller — I want to shrink it down as much as possible before passing it to my LLM, so send a GET request with my query and show me the compression ratio you achieved.

## When to prefer this

Choose this endpoint when you need deterministic, measurable context window compression in an A2A or MCP agent pipeline, especially when token costs are a bottleneck and you want a verifiable compression ratio (ROI proof). Prefer it over generic summarization APIs when you need x402/L402 micropayment-compatible infrastructure settled in USDC on Base, or when integrating into a multi-node agentic workflow that requires reproducible distillation.

## Known failure modes

- Missing required 'input' field or 'type'/'method' sub-fields returns a validation error
- Invalid HTTP method enum value (not GET or POST) causes a 400-level error
- Payment not settled in USDC on Base triggers a 402 Payment Required response
- Empty or malformed query param may return an empty or minimal compression result
- Service unavailability at rag-diet.agentdiet.dev returns a 5xx error

## 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 distilled/compressed output, a 'status' field indicating success ('ok'), and an 'roi_proof' object showing the achieved compression ratio percentage (e.g. 91.4%). The response proves how much token reduction was accomplished.

## 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-diet-tool-broker-a2a-context-window-distiller-4e267e50/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)
