Agent JSON Reliability

io.github.toninovo4249-ai由 GitHub 帳號 toninovo4249-ai 發布v0.1.0更新於 Oct 24, 2026

Deterministic inspect, safe repair, and JSON Schema validation for agent JSON. No LLM.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

以確定性方式檢查、安全修復並驗證代理產生的 JSON,不使用 LLM,遇到歧義時拒絕處理。

可以做什麼
檢查文字是否為 JSON,並診斷其中存在哪些格式錯誤。對結構性、無歧義的問題進行安全修復,不憑空補值。以 JSON Schema 驗證修復後的結果。回傳結構化診斷,包括原始是否有效、是否修復、最終是否有效、結構描述是否通過、是否不安全或歧義,以及變更與錯誤清單。對截斷或歧義輸入明確拒絕,而非猜測。
適用情境
當 AI 代理或程式產生的 JSON 常出現 markdown 圍籬、尾逗號、單引號或 True/False/None 等格式錯誤,且需要在送入下游前先檢查、修復並以 JSON Schema 驗證時使用。適合需要可重現、不靠 LLM 猜測的資料清理流程。
執行需求
需在本機以 Python 執行,透過 uvx 啟動 PyPI 套件 agent-json-reliability,或從原始碼以 python 模組方式啟動。無需帳號、API 金鑰或環境變數。僅支援桌面環境。
安裝前請注意
託管的 reliable 端點需以 x402 付款簽章支付 0.003 USDC(Base 網路)才會回應,請勿在無意付款時送出簽章。本機 MCP 與 inspect、validate、repair 為免費。修復會改寫輸入文字,但不會自行補上缺少的語意值。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Agent JSON Reliability,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Agent JSON Reliability

Deterministic JSON repair + JSON Schema validation for AI agents.
No LLM. Safe refusal on ambiguity.

[PyPI version] [Python] [MCP] [License: MIT]

STATUS=BETA 0.1.0 · GitHub · PyPI · Official MCP Registry

Problem: agents emit malformed JSON (fences, trailing commas, single quotes). This tool inspects, safely repairs, and schema-validates that text. No LLM. No invented values.

PathCost
Local MCP (uvx agent-json-reliability)Free
Hosted POST /v1/json/inspect, /validate, /repair, /mcpFree
Hosted POST /v1/json/reliable0.003 USDC on Base via x402

Machine catalog: https://agent-json-reliability.onrender.com/v1/catalog
Skill: https://agent-json-reliability.onrender.com/skill.md

Quick start

bash
uvx agent-json-reliability

MCP client config (stdio, published package):

json
{  "mcpServers": {    "agent-json-reliability": {      "command": "uvx",      "args": ["agent-json-reliability"]    }  }}

AI agents and software frequently emit malformed JSON: markdown fences, trailing commas, single quotes, True/False/None, and extra prose around one object.

Agent JSON Reliability is a deterministic pipeline for that failure mode:

  1. inspect — diagnose whether the text is JSON and which failures are present
  2. safe repair — apply only structural, unambiguous fixes
  3. validate — optional JSON Schema check on the result
  4. structured diagnostics — valid_original, repaired, valid_final, schema_valid, unsafe_or_ambiguous, changes, errors

This is not a generic jsonschema wrapper. Missing semantic values are never invented. Ambiguous input is refused.

Primary HTTP endpoint (local/self-hosted): POST /v1/json/reliable

MCP tools (same core functions): reliable_json, validate_json, repair_json, inspect_json

Before / after (safe repair)

Malformed agent output:

json
{  "text": "```json\n{\"name\":\"alice\",\"age\":30,}\n```"}

Expected result (semantically equivalent valid JSON):

  • valid_original=false
  • repaired=true
  • valid_final=true
  • unsafe_or_ambiguous=false
  • json → {"name":"alice","age":30}

If a schema is supplied and satisfied: schema_valid=true.

Safe refusal (ambiguous)

Truncated input such as {"user": is JSON-intended but not deterministically repairable without inventing keys or values.

Expected:

  • HTTP 200 (documented safe response)
  • valid_final=false
  • unsafe_or_ambiguous=true or repaired=false

Do not treat a correct refusal as a product failure.

Run locally (no Hunter)

bash
python -m pip install -r requirements.txtpython serve.py

Binds 127.0.0.1:8770 by default. Set PUBLIC_BASE_URL to an HTTPS origin only when you expose the process yourself. Do not commit a temporary tunnel hostname as the canonical URL.

Hosted API (x402)

Public origin: https://agent-json-reliability.onrender.com

Inspect / validate / repair / MCP stay free. POST /v1/json/reliable returns HTTP 402 until an x402 PAYMENT-SIGNATURE settles 3000 atomic USDC (0.003) on Base (eip155:8453) via PayAI.

bash
curl -s -D - -o /tmp/ajr.json -X POST https://agent-json-reliability.onrender.com/v1/json/reliable \  -H "content-type: application/json" \  -d '{"text":"{'\''a'\'': 1}"}'# Expect: HTTP/1.1 402  and a PAYMENT-REQUIRED header. Do not send a signature unless you intend to pay.

HTTP examples

See examples/curl.md, examples/python.py, examples/javascript.js.

Remote examples use https://agent-json-reliability.onrender.com. Local default is http://127.0.0.1:8770.

Share URLs (optional, unverified telemetry tags):

  • /?source=github
  • /?source=mcp-registry
  • /?source=api-directory

MCP (stdio — durable)

Package transport does not depend on a temporary public URL. Prefer uvx (above). From a checkout:

json
{  "mcpServers": {    "agent-json-reliability": {      "command": "python",      "args": ["-m", "products.gateway.mcp_stdio"]    }  }}

Remote HTTP MCP (POST /mcp) is for a running instance.

Machine discovery

  • Hosted origin: https://agent-json-reliability.onrender.com
  • GET /.well-known/agent-services.json
  • GET /.well-known/agent.json
  • GET /.well-known/x402
  • GET /openapi.json
  • GET /llms.txt · GET /llms-full.txt · GET /AGENTS.md · GET /sitemap.xml · GET /robots.txt
  • POST /mcp JSON-RPC (tools/list, tools/call)

What this package does not include

No Hunter market database, no private reports, no Windows user paths, no collectors, no wallets in this package. Hosted /v1/json/reliable is x402-paid; local MCP and inspect/validate/repair are free.

來源:README.md,提交 85cb45c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 21, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。