{"uid":"cap_ApjXS-YAckGEVK_Um_-s6","slug":"agentdiet-context-trimmer-0614727f","name":"AgentDiet Context Trimmer","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/context-trimmer?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_SXJQsiO9YbJYdGY0BU87o","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":"Compresses and distills AI context windows by stripping bloat from a given URL's content, reducing token count by up to 91% for downstream LLM calls.","exampleAgentPrompt":"Can you trim down the context from https://example.com/long-article using a GET request so it fits in my token budget? I need the compressed version with the compression ratio.","exampleUseCases":[{"title":"RAG pipeline token cost reduction","prompt":"Before I feed this documentation page at https://docs.myproject.com/api-reference into my RAG pipeline, can you run it through the context trimmer using GET mode so I'm not blowing up my token budget?"},{"title":"Agent-to-agent context handoff","prompt":"I need to pass a compressed version of https://news.ycombinator.com/item?id=12345 to my downstream agent — use the context trimmer to strip the bloat out via GET so the handoff context is lean."},{"title":"LLM preprocessing for a long webpage","prompt":"This page at https://en.wikipedia.org/wiki/Transformer_(machine_learning_model) is too long to drop straight into my prompt — can you distill it with AgentDiet's trimmer so I only send the essential content to the LLM?"}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled/compressed content, a 'status' field ('ok' on success), and an 'roi_proof' object that includes 'compression_ratio_pct' showing how much token reduction was achieved (e.g. 91.4% compression).","failureModes":["Invalid or unreachable URL returns an error status","Missing required 'input' object or 'type'/'method' fields yields a validation error","Payment not settled in USDC on Base results in 402 Payment Required","Unsupported HTTP method in the enum causes rejection","Rate limiting or upstream fetch failure may return non-OK status"],"whenToPreferThis":"Choose this endpoint when you need deterministic, cheap ($0.001 USDC) token reduction of a fetched URL's content before passing it to an LLM or RAG system. It is purpose-built for agent-to-agent (A2A) and MCP pipelines where minimizing context size is critical for cost and latency. Prefer it over generic summarization when you want a compression ratio proof (roi_proof) and consistent, reproducible output rather than generative paraphrase.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:42:43.302Z","isFirstParty":false,"canonicalSlug":"agentdiet-context-trimmer-0614727f"}