{"uid":"cap_zH3blxf9yydT4SSgG2T8H","slug":"agentdiet-rag-diet-a2a-context-window-distiller-db712037","name":"AgentDiet RAG Diet — A2A 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/api?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_z77XhYgXGrTnAkc4_saFx","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 or web content via RAG-based token reduction, returning a de-bloated payload with compression ratio proof","exampleAgentPrompt":"Can you run https://en.wikipedia.org/wiki/Large_language_model through AgentDiet's RAG Diet distiller using a GET request and give me the compressed version so I can fit it in my context window?","exampleUseCases":[{"title":"Compressing long docs for RAG pipelines","prompt":"Take this URL — https://docs.langchain.com/docs/components/chains — and compress it with AgentDiet's RAG Diet so I only get the essential content, no filler, and tell me the compression ratio you achieved."},{"title":"Shrinking agent context before LLM call","prompt":"Before I pass this reference page to the LLM, run it through the context de-bloater at AgentDiet using GET mode and return the distilled payload so I don't blow my token budget."},{"title":"Token cost reduction for repeated web lookups","prompt":"I keep fetching the same news article at https://techcrunch.com/2024/05/01/ai-agents-roundup/ inside my agent loop — can you distill it once with RAG Diet so I get an 85% smaller version I can reuse?"}],"resultDescription":"Returns a JSON object with a `data` field containing the compressed/distilled content, a `status` field ('ok'), and a `roi_proof` object that includes the `compression_ratio_pct` (e.g. 91.4) showing how much the content was reduced relative to the original.","failureModes":["Invalid or unreachable URL returns an error status","Missing required `input` object in request body causes schema validation failure","Unsupported HTTP method (not GET or POST) returns enum validation error","URL that blocks crawling or returns non-200 may result in empty or partial data","Network timeouts on large pages may cause incomplete compression results","Payment failure via x402/USDC on Base prevents request from being processed"],"whenToPreferThis":"Choose AgentDiet RAG Diet when your AI agent needs to fetch and compress web content or long documents before inserting them into a context window, especially when token cost is a concern. It is ideal for RAG pipelines, agentic loops that repeatedly access the same URLs, or any scenario where LLM input size must be minimized. It provides verifiable compression ratio proof, making it suitable for cost-tracking pipelines. Prefer this over generic summarization when you need deterministic, structured distillation with measurable output rather than a prose summary.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:55.238Z","isFirstParty":false,"canonicalSlug":"agentdiet-rag-diet-a2a-context-window-distiller-db712037"}