Jsonaut
JSON repair & validation built for AI agents as the customer. Send possibly-malformed JSON (LLM tool-call output, another agent's message, a flaky upstream), get back parsed, schema-valid JSON.
- Free tier: deterministic repair — trailing commas, single quotes, truncation, markdown code fences, comments, Python literals — plus JSON Schema validation with type coercion (string→number, defaults, stripping hallucinated fields). Rate-limited per IP.
- Paid tier: LLM-fallback repair for inputs the deterministic pass can't fix. $0.01/call, charged only on success, paid autonomously per-call via x402 (USDC on Base) — no accounts, no signup.
Business context, market research, and the full 3-day plan live in IDEA.md and PLAN.md.
Quickstart
Try it:
API
Response method values: direct (was already valid), deterministic-repair (free fix), llm-repair (paid fix), failed. changes[] lists every modification so callers can audit what was done to their data.
Using it from an agent (MCP)
Or in any MCP client config:
For the paid tier, clients pay via x402 and retry with the X-PAYMENT header (the payment receipt). No accounts or API keys — agents pay per call.
Payment flow (x402)
- Agent calls
/v1/repair with allow_llm_fallback: true; deterministic repair fails.
- Server responds
402 with an x402 accepts array (USDC on Base, amount = PRICE_USD).
- Agent pays and retries with the
X-PAYMENT header; server verifies via the facilitator, runs the LLM repair, and settles only if the repair succeeds.
Configuration
Local dev secrets go in a .dev.vars file (git-ignored) or your shell env.
Deployment (Cloudflare Workers)
The same codebase runs on Node for local dev (npm run dev) and on Workers in production — storage falls back to in-memory when no KV binding exists.
Project structure
Known limitations (MVP)
- Schema coercion does not resolve
$ref or oneOf/anyOf branches.
- x402 verification requires an external facilitator (
FACILITATOR_URL); there is no on-chain verification built in.
- Free-tier rate limiting is approximate under high concurrency (KV read-modify-write).