{"uid":"cap_Lbc-Lh07a3Kir8Y1-QDOD","slug":"agentdiet-rag-context-sanitizer-288f08e3","name":"AgentDiet RAG Context Sanitizer","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://status.agentdiet.dev settling in USDC on Base.","url":"https://status.agentdiet.dev/v1/workflows/rag-context-sanitizer?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":{"text":{"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.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5fn9UaWvbnZ4dpvnPILQs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses and de-bloats RAG context text to reduce token count by up to 85-91% before feeding it into an LLM context window","exampleAgentPrompt":"Can you run this RAG context through AgentDiet's sanitizer to cut down the token bloat before I send it to the model? Here's the text: [paste your retrieved document chunks].","exampleUseCases":[{"title":"Slim RAG chunks before LLM call","prompt":"I've got a bunch of retrieved document chunks that are way too long to fit in my context window — can you compress them using AgentDiet's context sanitizer and show me the compression ratio I achieved?"},{"title":"Cut LLM API costs on long documents","prompt":"Before I send this long article to GPT-4, run it through the context de-bloater to strip out redundant content so I'm not burning through tokens unnecessarily."},{"title":"Optimize agent memory before multi-step reasoning","prompt":"My agent's memory context has grown huge over this conversation — can you distill it down with the RAG context sanitizer so we don't hit the context limit on the next reasoning step?"}],"resultDescription":"Returns a JSON object with status 'ok', a compressed/sanitized version of the input text in the data field, and an roi_proof object containing the compression_ratio_pct (e.g. 91.4%) achieved by the distillation process.","failureModes":["Missing required 'text' query parameter returns an error","Input text that is already minimal may yield low compression ratios","Payment failure (x402 USDC settlement on Base) blocks execution","Empty or malformed input object returns validation error","Very short input text may not benefit meaningfully from compression"],"whenToPreferThis":"Choose this endpoint when you need deterministic, metered token reduction for RAG pipelines or agent context windows — especially when cost per LLM call matters and you want a provable compression ratio. Prefer it over manual summarization prompts when you need consistent, reproducible compression without consuming additional LLM tokens for the compression itself. Best suited for agent-to-agent (A2A) or bot-to-agent (B2A) pipelines that need programmatic, pay-per-use context optimization settled in USDC on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:44:32.343Z","isFirstParty":false,"canonicalSlug":"agentdiet-rag-context-sanitizer-288f08e3"}