← All tools

agent-code-change-risk-gate

Static pre-merge risk gate for autonomous code changes: inspect a supplied unified diff for security-sensitive surfaces, destructive operations, architecture/constraint conflicts, test requirements, rollback risk, and bounded breaking-change risk before an agent merges or deploys.

Price
$1.21 USDC equivalent
Endpoint
POST /v1/agent-code-change-risk-gate
Network
Base mainnet · eip155:8453
Asset
USDC
MCP tool
agent-code-change-risk-gate
External payability
PASS · 2026-10-08T19:55:01.298Z

When an agent should use it

Input schema

{
  "type": "object",
  "properties": {
    "diff": {
      "type": "string",
      "minLength": 1,
      "maxLength": 48000
    },
    "constraints": {
      "type": "array",
      "maxItems": 32,
      "items": {
        "type": "string",
        "maxLength": 4000
      }
    },
    "context": {
      "type": "string",
      "maxLength": 4000
    }
  },
  "required": [
    "diff"
  ],
  "additionalProperties": false
}

Example request

{
  "diff": "diff --git a/src/app.ts b/src/app.ts\n--- a/src/app.ts\n+++ b/src/app.ts\n@@ -1 +1 @@\n-old()\n+newer()",
  "constraints": [
    "Do not bypass authorization checks"
  ],
  "context": "Cloudflare Worker API"
}

Example output

{
  "verdict": "WARN",
  "risk_score": 0.44,
  "breaking_change_probability": {
    "value": 0.28,
    "state": "PARTIALLY_SUPPORTED",
    "basis": "Uncalibrated static heuristic; not an empirical probability."
  },
  "security_flags": [],
  "architecture_conflicts": [],
  "test_requirements": [
    "Run API/MCP contract tests."
  ],
  "rollback_risk": "MEDIUM"
}

x402 flow

POST /v1/agent-code-change-risk-gate
→ HTTP 402 + PAYMENT-REQUIRED
→ buyer authorizes locally
→ retry same request with PAYMENT-SIGNATURE
→ one governed execution + machine-readable JSON

Discovery: OpenAPI · x402 · llms.txt

A valid 402/payability probe is operational evidence, not proof of independent demand, future settlement, or semantic correctness.