{"uid":"cap_UjyFODTmFhep40j9Zcs4Z","slug":"agentdiet-injection-firewall-context-window-de-bloater-07668038","name":"AgentDiet Injection Firewall — Context Window De-Bloater","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/injection-firewall?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_MqnUBu6Vz8Iw7_BnC7WOJ","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 distills text input through an injection firewall to remove bloat and reduce token count by up to ~91% before passing context to an AI model","exampleAgentPrompt":"Can you run this text through AgentDiet's injection firewall to strip the bloat and compress it before we send it to the LLM — I want to see the compression ratio we get back: 'The quick brown fox jumped over the lazy dog. Additionally, it should be noted that the aforementioned fox, being of a brown coloration and displaying notable quickness, did in fact execute a jumping motion over the dog, which was described as lazy.'","exampleUseCases":[{"title":"Trim oversized RAG chunks before inference","prompt":"This retrieved document chunk is way too long and will blow my context window — can you run it through AgentDiet's injection firewall to compress it down and tell me what compression ratio we achieved before I send it to the model?"},{"title":"Guard agent pipeline against prompt injection","prompt":"Before I pass this user-submitted text into my agent's context, can you push it through AgentDiet's injection firewall to sanitize it and remove any injected instructions or bloat?"},{"title":"Cut LLM API costs on long conversations","prompt":"My chat history is getting really expensive to process — can you send the conversation transcript through AgentDiet to distill it down and show me how much token reduction we get?"}],"resultDescription":"Returns a JSON object with status 'ok', a compressed/distilled 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 firewall distillation process.","failureModes":["Missing or malformed 'input' field returns a validation error","Unsupported HTTP method (not GET or POST) causes rejection","Empty text query param may return minimal or empty compression output","Payment not settled in USDC on Base may result in 402 Payment Required","Extremely short input text may yield low or zero compression ratio","Service unavailability returns 5xx error with no data"],"whenToPreferThis":"Choose this endpoint when you need to deterministically compress or sanitize text before passing it to an LLM, especially when context window size is a constraint or token costs are a concern. It is particularly suited for agentic pipelines using x402/L402 micropayment rails on Base (USDC), where per-call billing at $0.005 is preferable to subscription models. Prefer this over generic summarization when you need a verifiable compression ratio metric (roi_proof) and deterministic behavior rather than generative paraphrasing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:43.099Z","isFirstParty":false,"canonicalSlug":"agentdiet-injection-firewall-context-window-de-bloater-07668038"}