{"uid":"cap_ekwIbXkeUI60XqlR2mNtn","slug":"agentdiet-rag-diet-context-window-distiller-dccbff9c","name":"AgentDiet RAG-Diet 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/rag-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_Ku63lAiUo2FaVjMKBiud1","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 web page or document content for AI context windows, reducing token usage by up to 91% via retrieval-augmented generation (RAG) preprocessing","exampleAgentPrompt":"Can you use AgentDiet's RAG-Diet to fetch and compress the content at https://example.com/long-article so I can fit it into my context window without burning through tokens?","exampleUseCases":[{"title":"Compress news article for agent ingestion","prompt":"Grab the content from https://techcrunch.com/2024/05/01/ai-funding-roundup and compress it down so it fits in my LLM context without wasting tokens — I want the RAG-Diet distilled version."},{"title":"Slim down documentation for RAG pipeline","prompt":"I need to feed the docs at https://docs.langchain.com/v0.2/docs/concepts into my retrieval pipeline but they're too big. Can you run them through AgentDiet's context distiller and give me the compressed output?"},{"title":"Reduce token cost for multi-step research agent","prompt":"My agent keeps hitting context limits when researching from https://en.wikipedia.org/wiki/Transformer_(machine_learning_model) — can you distill that page using RAG-Diet so I only get the essential content and save on tokens?"}],"resultDescription":"Returns a JSON object with status 'ok', the distilled/compressed data payload, and an roi_proof field showing the compression_ratio_pct achieved (e.g. 91.4%), confirming how much of the original token bloat was removed.","failureModes":["Invalid or unreachable URL returns an error status","Unsupported content type (non-text/HTML) may return empty or partial data","Missing required 'input' object causes schema validation failure","Payment not settled in USDC on Base causes 402 rejection","Rate limiting or network timeouts on the target URL result in failed fetch"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to fetch and compress web content or documents before inserting them into an LLM context window, especially when token cost reduction is a priority. It is well-suited for RAG pipelines, multi-step agents that repeatedly reference large documents, or any workflow where context window limits are a bottleneck. Prefer it over raw web scraping endpoints when you specifically need semantic distillation and compression ratio guarantees rather than just raw HTML extraction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:42:05.011Z","isFirstParty":false,"canonicalSlug":"agentdiet-rag-diet-context-window-distiller-dccbff9c"}