{"uid":"cap_POPZr5SIFhelGEuCReZAp","slug":"agentdiet-context-window-distiller-rag-diet-d6e6585d","name":"AgentDiet Context Window Distiller (RAG Diet)","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/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_lTW6GAqkpxOnX0PUyiAxU","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 content or context into a token-efficient summary, reducing context window size by up to 91% for AI agents.","exampleAgentPrompt":"Can you use AgentDiet to fetch and compress the content at https://example.com/article using GET mode so it fits in my context window with minimal tokens?","exampleUseCases":[{"title":"RAG pipeline token cost reduction","prompt":"I need to pull in this research paper at https://arxiv.org/abs/2310.12345 for my RAG pipeline but it's way too long — can you run it through AgentDiet to compress it down before I embed it?"},{"title":"Agent context window management","prompt":"My AI agent keeps hitting context limits when browsing https://docs.someplatform.com/api-reference — can you distill that page down to just the essential content so it fits in the context window?"},{"title":"LLM preprocessing cost optimization","prompt":"Before I send the content from https://news.ycombinator.com to my LLM, can you use AgentDiet to strip the bloat and give me a compressed version so I'm not wasting tokens on navigation and ads?"}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled/compressed content, a 'status' field confirming success, and an 'roi_proof' field showing the compression_ratio_pct (e.g. 91.4%) achieved.","failureModes":["URL unreachable or returns non-200 — endpoint may return an error status","Invalid or missing 'input' object — schema validation failure","Unsupported HTTP method in method field — only GET and POST are accepted","Payment not settled in USDC on Base — x402 payment failure blocks execution","Content too short or already minimal — compression ratio may be low or negligible"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to consume web content but faces context window constraints or token cost concerns. Ideal for RAG pipelines, agent browsing tasks, or any workflow where raw HTML/web content is too verbose for direct LLM ingestion. Particularly useful when paying per-token and seeking to minimize inference costs while preserving semantic fidelity.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:44:21.633Z","isFirstParty":false,"canonicalSlug":"agentdiet-context-window-distiller-rag-diet-d6e6585d"}