# AgentDiet Context Trimmer

> AgentDiet Context Trimmer is a paid API for AI agents from status.agentdiet.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-22).

Compresses and distills AI context windows by up to 91% to reduce token usage in agent pipelines

## Facts

- Endpoint: GET https://status.agentdiet.dev/v1/context-trimmer?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-context-trimmer-a5545a5c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tnZ2NXhOXG-8IeXo08sdQ

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-trimmer-a5545a5c
```

Example prompt: Can you run this URL through AgentDiet's context trimmer to compress and distill it before passing it to the next agent step? Use GET mode and trim it as aggressively as possible.

## When to prefer this

Choose this endpoint when an AI agent pipeline is approaching token limits, inference costs are high due to bloated context windows, or you need to pass context through a constrained MCP/A2A node. It is especially useful for deterministic, pay-per-call pipelines using x402/L402 micropayments settled in USDC on Base, where cost predictability matters.

## Known failure modes

- Missing or invalid URL query parameter returns error
- Unreachable or malformed target URL results in fetch failure
- Payment not settled in USDC on Base causes 402 rejection
- Invalid mode parameter returns validation error
- Context already minimal may return low compression ratio

## 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', the compressed/distilled data in the 'data' field, and an 'roi_proof' object containing the compression_ratio_pct (e.g. 91.4%) achieved by the trimming process.

## 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-context-trimmer-a5545a5c/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)
