---
name: agentproof-murex.vercel.app
description: agentproof-murex.vercel.app provides four utilities for working with JSON data contracts: schema inference from examples, API response validation against a schema, contract stability scoring across multiple responses, and malformed JSON repair. These tools collectively help agents establish, verify, and maintain reliable JSON interfaces.
host: agentproof-murex.vercel.app
---

# agentproof-murex.vercel.app

AgentProof is a utility host focused on JSON schema and API contract tooling. It serves agents that consume external APIs and need to programmatically derive schemas from sample data, validate responses before processing, assess whether an API's output is stable enough to depend on, or recover from malformed JSON. It does not provide data, execute trades, or interact with any external APIs on the agent's behalf — it only processes JSON structures the agent supplies.

## When to use this host

Use this host when an agent needs to programmatically work with JSON schemas and API contracts: inferring schemas from examples, validating responses, scoring API stability, or repairing broken JSON. It is the right choice for bootstrapping a new API integration or auditing an existing one for reliability. Do not use it for validating blockchain or smart contract security — the stability scorer is strictly for REST/JSON API response contracts. Do not use it for generating synthetic or mock data, for streaming or bulk validation workloads, or for transforming already-valid JSON. For large-scale or real-time validation pipelines, a locally hosted JSON Schema validator library would be more appropriate than this per-call paid endpoint.

## Capabilities

### Schema Derivation

Derives a machine-readable JSON Schema (Draft 2020-12) from one or more example JSON values, handling nested, nullable, and mixed-type fields.

- **`infer-json-schema`** — Accepts one or more JSON example values and returns an inferred JSON Schema (Draft 2020-12) describing their structure, types, required fields, and nested properties.

### JSON Repair

Repairs syntactically malformed JSON strings — such as those with trailing commas, missing brackets, or truncation — and returns the corrected text and parsed value.

- **`repair-malformed-json`** — Accepts a malformed JSON string and returns the repaired text, parsed value, and a flag indicating whether changes were made.

### Schema Validation

Validates a JSON response against a provided schema and returns a structured verdict with per-field error paths and an optional repair suggestion.

- **`validate-api-response-against-schema`** — Validates any JSON value against a provided JSON Schema and returns a structured verdict with per-field errors and an optional repair suggestion.

### Contract Stability Assessment

Scores an API's response contract stability across multiple sample responses, detecting type instability, missing fields, and schema violations to determine agent-readiness.

- **`score-api-contract-stability`** — Analyzes an array of sample API responses and an optional JSON Schema to produce a numeric stability score, verdict, and field-level diagnostics for agent-readiness.

## Workflows

### Bootstrap and Validate a New API Integration

*Use when an agent needs to integrate a previously unknown API endpoint: derive a schema from samples, then immediately validate a live response against it.*

1. **`infer-json-schema`** — Submit one or more sample API responses to derive a JSON Schema describing the expected contract.
2. **`validate-api-response-against-schema`** — Validate a new live response against the inferred schema to confirm it conforms before the agent begins processing it.

### Assess and Certify API Contract Reliability

*Use when an agent needs to determine whether an API is stable enough to rely on, starting from raw samples with no pre-existing schema.*

1. **`infer-json-schema`** — Infer a JSON Schema from a representative set of API response samples.
2. **`score-api-contract-stability`** — Submit the full set of sample responses along with the inferred schema to receive a numeric stability score, verdict, and field-level diagnostics.

### Repair Then Validate Malformed Response

*Use when an agent receives a JSON response that fails to parse and needs to recover a valid value and confirm it matches the expected schema before continuing.*

1. **`repair-malformed-json`** — Attempt to repair the malformed JSON string and obtain a parsed, syntactically valid value.
2. **`validate-api-response-against-schema`** — Validate the repaired JSON value against the known schema to confirm structural correctness before downstream processing.

## Skill reference

### `infer-json-schema`

**AgentProof Schema Infer** — Accepts one or more JSON example values and returns an inferred JSON Schema (Draft 2020-12) describing their structure, types, required fields, and nested properties.

*Use when:* Use when an agent needs a machine-readable JSON Schema derived from one or more sample API response payloads or data objects, including nested, nullable, and mixed-type fields.

*Not for:* Do not use for validating an existing schema against a spec, or for generating synthetic data — this endpoint only infers a schema from provided examples.

**Inputs:**

- `example` (object) — A single JSON value (any type) to infer a schema from. Use this when you have exactly one sample. Mutually exclusive with 'examples'.
- `examples` (array) — An array of JSON values to infer a schema from. Use this when you have multiple samples to improve inference accuracy. Mutually exclusive with 'example'.

**Returns:** Returns a JSON object with service='AgentProof', endpoint='schema.infer', and a schema field containing a Draft 2020-12 JSON Schema with typed properties, anyOf for nullable/mixed fields, required arrays, and nested object definitions.

**Example:** `{"examples":[{"id":"usr_1001","tags":["beta","premium"],"profile":{"name":"Ava","age":29,"email":"ava@example.com"}},{"id":"usr_1002","tags":[],"profile":{"name":"Bob","age":null,"email":"bob@example.com"}}]}`

---

### `score-api-contract-stability`

**Contract Score** — Analyzes an array of sample API responses and an optional JSON Schema to produce a numeric stability score, verdict, and field-level diagnostics for agent-readiness.

*Use when:* Use when an agent needs to evaluate whether an API's response contract is stable and safe to rely on, by submitting sample responses and optionally a JSON Schema to detect type instability, missing fields, or schema violations.

*Not for:* Do not use for scoring smart contract security or onchain risk; this endpoint scores API response contract stability, not blockchain contracts.

**Inputs:**

- `responses` (array, required) — Array of sample API response objects to score for contract stability. Each item can be any JSON value.
- `schema` (object) — Optional JSON Schema to validate the responses against. If omitted, stability is assessed purely from the response samples.

**Returns:** Returns a score of 100, verdict 'agent-proof', responseCount 2, validCount 2, empty schemaErrors/unstableFields/missingFields arrays, and a notes array with a stability summary.

**Example:** `{"responses":[{"plan":"pro","email":"a@test.com","user_id":"123"},{"plan":"free","email":"b@test.com","user_id":"124"}],"schema":{}}`

---

### `repair-malformed-json`

**JSON Repair** — Accepts a malformed JSON string and returns the repaired text, parsed value, and a flag indicating whether changes were made.

*Use when:* Use when an agent receives or generates a JSON string that fails to parse due to syntax errors such as trailing commas, missing brackets, or truncation, and needs a valid structured value to continue processing.

*Not for:* Do not use for validating already-valid JSON structure against a schema; use a JSON Schema validator instead. Not suitable for transforming or reformatting JSON that is already syntactically valid.

**Inputs:**

- `input` (string, required) — Malformed JSON string or JSON-compatible value to repair. Can also be sent as the raw request body string instead of wrapped in an object.

**Returns:** Returns valid=true, changed=true, a formatted repairedText string, a parsed object with the corrected data, and an empty warnings array.

**Example:** `{"input": "{\"user_id\": 123, \"email\": \"a@test.com\","}`

---

### `validate-api-response-against-schema`

**AgentProof Validate** — Validates any JSON value against a provided JSON Schema and returns a structured verdict with per-field errors and an optional repair suggestion.

*Use when:* Use when an agent needs to verify that a JSON response conforms to a known schema before processing it further, or when debugging schema violations with precise error paths and keywords.

*Not for:* Do not use for streaming or real-time validation of large data volumes; this is a single-shot, per-call validation with a fixed USDC payment per request.

**Inputs:**

- `response` (object, required) — Any JSON value to be validated against the provided schema.
- `schema` (object, required) — A valid JSON Schema object used to validate the response field.

**Returns:** Returns valid=false with an errors array containing per-field objects (path, keyword, message, expected, actual, value) for each schema violation, plus an optional repairSuggestion.

**Example:** `{"response":{"id":"abc-123","status":"approved","score":"85"},"schema":{"type":"object","required":["id","status","score"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"score":{"type":"number"}}}}`

---
