{"uid":"cap_kWAotI-XGTGx4kuvhBQNC","slug":"agentdiet-markdown-distill-context-window-compressor-2906c4cd","name":"AgentDiet Markdown Distill — 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/markdown-distill?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_R_vmlBBpDmsqe-uue2MYc","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":"Fetches a URL and distills its content into compressed, token-efficient markdown, reducing context window usage by up to 91% for AI agents","exampleAgentPrompt":"Can you fetch https://en.wikipedia.org/wiki/Large_language_model and distill it down to just the essential content in compressed markdown so it fits efficiently in my context window?","exampleUseCases":[{"title":"RAG pipeline content slimming","prompt":"I need to ingest https://docs.python.org/3/library/asyncio.html into my RAG pipeline — can you distill it into compressed markdown and tell me what compression ratio you got?"},{"title":"Agent context window budget management","prompt":"My agent is about to run out of context space — can you distill https://www.bbc.com/news/technology into minimal clean markdown so I can fit it into the prompt without blowing the token limit?"},{"title":"Web research summarization for LLM","prompt":"I'm building an agent that needs to read https://arxiv.org/abs/2307.09288 — strip all the boilerplate and give me just the meaningful content as compressed markdown to feed into the model."}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled markdown content, a 'status' field ('ok' on success), and a 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%), allowing agents to verify how much token reduction was achieved.","failureModes":["Invalid or unreachable URL returns an error status","URL behind authentication or paywalls cannot be fetched","Very large pages may time out or return partial distillation","Malformed input schema (missing 'type' or 'method' fields) returns validation error","Payment not settled in USDC on Base results in 402 response blocking access"],"whenToPreferThis":"Choose this endpoint when your AI agent needs to ingest web content but is constrained by context window size or token costs. It is especially useful in RAG pipelines, multi-step agent workflows, or any scenario where you're fetching external URLs and want to minimize token consumption. Prefer this over raw HTML fetchers or generic markdown converters when you need deterministic compression with a measurable compression ratio.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:41:43.968Z","isFirstParty":false,"canonicalSlug":"agentdiet-markdown-distill-context-window-compressor-2906c4cd"}