{"uid":"cap_YMXSG62ktH4I3WO8KUQdU","slug":"agentdiet-repair-endpoint-context-window-repair-distillation-4bf57395","name":"AgentDiet Repair Endpoint — Context Window Repair & Distillation","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/repair?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":{"raw_json":{"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.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XtpJdUBRwgWy05qZIYt7o","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Accepts raw JSON context data via GET and returns a repaired, compressed version with up to 91% token reduction, settling payment in USDC on Base via x402.","exampleAgentPrompt":"Run my bloated agent context JSON through AgentDiet's repair endpoint to compress and distill it — I want to see the compression ratio and get back the cleaned-up context so I can cut my token usage.","exampleUseCases":[{"title":"Reducing LLM inference costs in production","prompt":"My agent pipeline is burning through tokens because the context keeps growing — can you send the current context JSON through AgentDiet repair to distill it down and show me what compression ratio we got?"},{"title":"Fixing oversized MCP context payloads","prompt":"Our MCP tool context is too large to fit in the model's window. Pass it through AgentDiet's repair endpoint as a GET request with the raw JSON and return the repaired, de-bloated version."},{"title":"Optimizing A2A message payloads between agents","prompt":"Before the orchestrator agent passes context to the sub-agent, compress it using AgentDiet repair so we stay under the token limit — I need the distilled context and proof of how much we saved."}],"resultDescription":"Returns a JSON object with a 'data' field containing the repaired and compressed context, a 'status' field confirming success ('ok'), and an 'roi_proof' object showing the compression_ratio_pct achieved (e.g. 91.4%). Payment of $0.002 USDC is settled on Base via x402.","failureModes":["Missing required 'input' field returns validation error","Invalid HTTP method enum value causes schema rejection","Malformed or non-JSON raw_json query parameter causes parse failure","Payment failure via x402 if USDC balance on Base is insufficient","Oversized or unsupported context payload may cause processing failure","Network timeout if context is extremely large"],"whenToPreferThis":"Choose this endpoint when an AI agent's context window is too large, too expensive, or contains redundant/bloated data that needs deterministic compression before passing to an LLM or another agent. Ideal for A2A pipelines, MCP workflows, and any inference loop where token cost or context size is a bottleneck. Prefer this over general-purpose text summarization when you need a measurable compression ratio (ROI proof) and deterministic, structured output suitable for machine consumption rather than human reading.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:19.443Z","isFirstParty":false,"canonicalSlug":"agentdiet-repair-endpoint-context-window-repair-distillation-4bf57395"}