{"uid":"cap_e_D0pdbrioobs2SZhnA9S","slug":"agentdiet-context-diet-ai-context-window-distiller-7018752a","name":"AgentDiet Context Diet — AI Context Window Distiller","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-diet?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_8iT1W5SzLPtmXgvLhh3ui","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 fetching a URL and returning a token-reduced summary with compression ratio proof","exampleAgentPrompt":"Can you run this URL through AgentDiet and compress it down — I want the distilled version with as few tokens as possible before I pass it into my context window: https://example.com/long-article","exampleUseCases":[{"title":"RAG pipeline token cost reduction","prompt":"I'm pulling documents from the web into my RAG pipeline and my token costs are exploding — can you fetch https://docs.example.com/reference and run it through the context distiller so I only get the dense, compressed version to embed?"},{"title":"Fitting long pages into agent context","prompt":"This page at https://news.ycombinator.com is way too long to fit in my agent's context window — compress it down for me using AgentDiet's context diet so I get just the key content with a compression ratio report."},{"title":"Pre-processing content before LLM call","prompt":"Before I send this article at https://techcrunch.com/latest to GPT-4, run it through the context distiller via a GET request so I can see how much I can shrink it and what the compression ratio looks like."}],"resultDescription":"Returns a JSON object containing the distilled/compressed content data, an 'ok' status, and an roi_proof object showing the compression_ratio_pct achieved (e.g. 91.4%), demonstrating token savings.","failureModes":["URL is unreachable or returns non-200 — distillation cannot proceed","URL content is already minimal — low or zero compression ratio returned","Payment not settled in USDC on Base — x402 payment failure blocks request","Invalid or missing 'input' object with required 'type' and 'method' fields — schema validation error","Mode parameter not recognized — fallback to default mode behavior"],"whenToPreferThis":"Choose this endpoint when you need to aggressively reduce token count of fetched web content before passing it into an LLM context window or RAG pipeline. It is purpose-built for A2A and agent-to-browser workflows where token cost and context limits are a bottleneck. Prefer it over generic summarization when you want a deterministic compression ratio proof and micropayment-compatible (x402/L402) integration settled in USDC on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:01.740Z","isFirstParty":false,"canonicalSlug":"agentdiet-context-diet-ai-context-window-distiller-7018752a"}