{"uid":"cap_VwJYthFnWypm3t-5LC5Ym","slug":"agentdiet-b2a-router-context-window-distiller-8c3fb3f3","name":"AgentDiet B2A Router — 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/b2a-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_R1kUNLFyGMDeYudNcenLY","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 context windows via a query-driven B2A/A2A routing node, reducing token usage by up to 91% and returning distilled data with a compression ratio proof.","exampleAgentPrompt":"Run my query through AgentDiet's context distiller to strip out the bloat and compress the context window — I want to see the compression ratio it achieves.","exampleUseCases":[{"title":"Shrink RAG context before LLM call","prompt":"I'm pulling a lot of documents from my vector store and the context window is getting huge — can you run it through AgentDiet to distill it down and tell me the compression ratio before I send it to the model?"},{"title":"Cut token costs in agentic pipeline","prompt":"My AI agent is burning through tokens because the context keeps growing — use AgentDiet's de-bloater to compress it and show me how much we saved."},{"title":"Validate context fits model limit","prompt":"Before I call GPT-4, pass my retrieved context through the AgentDiet router with a GET query to compress it and confirm it fits within my token budget — show me the compression proof."}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled content, a 'status' field ('ok' on success), and a 'roi_proof' object containing 'compression_ratio_pct' (e.g. 91.4) proving how much the context was compressed.","failureModes":["Missing required 'input' field returns validation error","Invalid 'type' (must be 'http') causes rejection","Unsupported HTTP method in enum causes schema failure","Payment not settled in USDC on Base results in 402 response","Empty or malformed query string may return low compression or error","Upstream RAG node unavailable causes timeout or 5xx"],"whenToPreferThis":"Choose this endpoint when an AI agent or pipeline needs to reduce context window size before calling a large language model, especially when token costs or context length limits are a concern. It is particularly useful in RAG pipelines where retrieved documents are verbose and need distillation. Prefer it over manual truncation when you need a provable compression ratio and deterministic reduction via a paid micro-transaction model ($0.01 USDC per call via x402 on Base).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:45.897Z","isFirstParty":false,"canonicalSlug":"agentdiet-b2a-router-context-window-distiller-8c3fb3f3"}