{"uid":"cap_ScWrqMIwA-mbCsKr39P_4","slug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-57c2ce3a","name":"Deterministic A2A Broken-JSON Repair & Schema Validator","description":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://alpha-stream.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://alpha-stream.agentdiet.dev/v1/llm-json-schema-healer?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"raw_json":{"type":"string","minLength":1,"description":"Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.002","displayCostAsset":"USD","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":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZhS3NgBED6QlYi4N3SfoZ","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"alpha-stream.agentdiet.dev","brandSlug":"alpha-stream-agentdiet-dev-mpp","brandBaseUrl":"https://alpha-stream.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"This JSON string came back from my LLM and it has trailing commas and markdown fences — can you repair it so it's valid JSON I can use? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before database write","prompt":"My language model returned this JSON but it has a trailing comma and single quotes instead of double quotes — can you clean it up so I can safely write it to my database? {'user': 'bob', 'score': 42,}"},{"title":"Unblock crashed multi-agent pipeline","prompt":"One of my agents produced truncated JSON that's crashing the next step in my pipeline — can you repair this malformed output so the workflow can continue? Here's the broken string: {\"status\": \"ok\", \"items\": [1, 2, 3"},{"title":"Strip markdown fences from agent JSON response","prompt":"My agent wrapped its JSON response in markdown code fences and now my parser is breaking — can you strip the fences and fix any other issues so I get clean, valid JSON back?"}],"resultDescription":"A repaired, schema-compliant JSON object with all common malformations resolved — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready to be consumed by the next step in an agent pipeline.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable structure","Input is not JSON-like at all (e.g. plain text or binary) — returns validation error","Empty or whitespace-only input — rejected by minLength:1 schema constraint","Ambiguous truncation point where multiple valid completions exist — may return best-effort result with low confidence"],"whenToPreferThis":"Choose this endpoint when LLM-generated or agent-produced JSON is breaking downstream pipeline steps due to common formatting issues like trailing commas, markdown code fences, single quotes, or truncation. Ideal for multi-agent orchestration layers that need deterministic, reliable JSON sanitization without spinning up a second LLM call. Prefer over ad-hoc regex fixes when you need consistent, auditable repair behavior across many pipeline runs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T01:17:11.797Z","isFirstParty":false,"canonicalSlug":"alpha-stream-agentdiet-dev-deterministic-a2a-broken-json-repair-8a0f4dea"}