{"uid":"cap_JBuYH6JmIsa6jqc6teepc","slug":"agentdiet-rag-context-window-distiller-agent-router-be53fc98","name":"AgentDiet RAG Context Window Distiller — Agent Router","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/agent-router?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":{"query":{"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.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OMjhKaXdCiwGZG1ISQzch","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","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 agent context windows via a RAG-based de-bloating pipeline, returning compressed data with a measurable compression ratio proof.","exampleAgentPrompt":"Can you run this query through AgentDiet's context distiller to compress the context window and tell me the compression ratio I'm getting — I want to see how much token bloat it removes before I send it to the LLM?","exampleUseCases":[{"title":"LLM cost reduction via context trimming","prompt":"Take this big RAG retrieval chunk and run it through AgentDiet's distiller — I want to see the compression ratio so I can figure out how much I'm saving on token costs before passing it to GPT-4."},{"title":"Token budget enforcement in agent pipeline","prompt":"My agent's context window is getting too large and hitting token limits. Can you use AgentDiet to compress it down and return the distilled version with proof of how much was removed?"},{"title":"Pre-inference context de-bloating for a query","prompt":"Before I send this user query plus retrieved documents to the model, run it through the AgentDiet router to strip the bloat — query is 'what are the key risks in this contract?' — and show me the compression ratio."}],"resultDescription":"Returns a JSON object with a 'status' field ('ok' on success), a 'data' field containing the distilled/compressed output, and an 'roi_proof' object that includes 'compression_ratio_pct' — a numeric value showing what percentage of tokens were compressed (e.g. 91.4 meaning 91.4% compression achieved).","failureModes":["Missing required 'input' field returns a validation error","Invalid 'type' value (must be 'http') causes schema rejection","Empty or malformed query param may return empty distillation with low compression ratio","Payment not settled in USDC on Base will result in 402 Payment Required response","Network timeout if context payload is excessively large"],"whenToPreferThis":"Choose this endpoint when you need deterministic, measurable context window compression for AI agent pipelines — especially when you need a verifiable ROI proof (compression_ratio_pct) to justify token savings. Prefer it over generic summarization when operating in A2A or MCP environments with micropayment support via x402/L402, and when you need a structured JSON response with a compression metric rather than just a shortened text blob.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:41:36.991Z","isFirstParty":false,"canonicalSlug":"agentdiet-rag-context-window-distiller-agent-router-be53fc98"}