{"uid":"cap_1AmH5PNHWZ43M2licHQr7","slug":"agentdiet-context-window-compressor-3982e548","name":"AgentDiet Context Window Compressor","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.","url":"https://rag-diet.agentdiet.dev/v1/context-compress?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}},"responseSchema":{"type":"json","example":{"data":{},"status":"ok","roi_proof":{"compression_ratio_pct":91.4}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HXASrBZvFIXUo2spovsWf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses and distills AI context windows by stripping bloat, reducing token count by up to 85-91% for use in A2A/MCP pipelines","exampleAgentPrompt":"Take the content at this URL and run it through AgentDiet's context compressor — I need the de-bloated, distilled version that fits in a small context window with at least 85% token reduction.","exampleUseCases":[{"title":"Shrink web doc before LLM call","prompt":"I'm about to feed this documentation page into my agent but it's way too long — can you compress it using AgentDiet so I only send the essential content and cut the token count by at least 85%?"},{"title":"Reduce RAG pipeline context cost","prompt":"Before I pass this retrieved document chunk to the model, compress it with AgentDiet's context distiller so I'm not wasting tokens on boilerplate and irrelevant text."},{"title":"Fit long article into tight context","prompt":"This article URL is too long for my context window — use AgentDiet to distill it down to just the meaningful content so I can include it in my prompt without hitting the token limit."}],"resultDescription":"Returns a JSON object with a 'data' field containing the compressed/distilled context content, a 'status' field ('ok' on success), and a 'roi_proof' object showing the compression_ratio_pct achieved (e.g. 91.4%). The agent receives dramatically fewer tokens representing the same essential information.","failureModes":["Invalid or unreachable URL returns an error status","Unsupported HTTP method causes schema validation failure","Payment not settled in USDC on Base results in 402 response","URL content is already minimal — compression ratio may be low","Network timeout if target URL is slow to respond","Missing required 'input' field causes request rejection"],"whenToPreferThis":"Choose this endpoint when you need to reduce token consumption before sending web content or retrieved documents to an LLM, especially in A2A or MCP pipelines where context window limits are a bottleneck. It is ideal for agents that fetch URLs and must summarize or distill content cheaply ($0.001/call) rather than passing raw HTML to an expensive model. Prefer it over general-purpose scrapers when the goal is token reduction rather than structured data extraction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:42:34.443Z","isFirstParty":false,"canonicalSlug":"agentdiet-context-window-compressor-3982e548"}