# BRAINIAC Agent Contract Retry Safety Check

> BRAINIAC Agent Contract Retry Safety Check is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-12).

Analyzes agent contract definitions (OpenAPI, workflows, operations) for missing, ambiguous, or contradictory retry policies that could cause AI agents to double-charge, duplicate actions, or stall after timeouts.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/agent-contracts/retry-safety-check?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-agent-contract-retry-safety-check-9e1a6931
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nHpiAsLSqJ6wbdvy1d3Bc

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-agent-contract-retry-safety-check-9e1a6931 -d '<json body>'
```

Example prompt: Can you check my agent contract for retry safety issues? Here are my operations — one charges a saved card on timeout and another reserves stock but I'm not sure if retrying is safe. I want a score and a list of any missing or contradictory retry policies with suggested fixes.

## When to prefer this

Use this endpoint when you need automated, deterministic analysis of agent contract retry semantics before deployment — especially for contracts involving payment operations, state-modifying calls, or multi-step workflows where timeouts could cause double-charges or stuck agents. Prefer this over manual review when you have structured OpenAPI or workflow definitions and want scored, actionable feedback with per-operation impact analysis.

## Known failure modes

- Malformed or missing required fields in operations or workflows cause validation errors
- Truncated or overly large OpenAPI documents may exceed schema limits
- Contradictions can only be detected in supplied text — runtime server behavior is not tested
- Missing retry sentences are flagged as undocumented, not confirmed bugs
- Payment via x402 may fail if USDC balance is insufficient or Base network is congested

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON object with a numeric safety score (0-100), an array of issues (each with type, severity, location, evidence, description, agent impact, and suggested fix), an array of warnings for undocumented retry behaviors, an overall analysis summary string, and a limitations array explaining what the check does and does not cover. Also includes a success boolean.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "openapi": {
   "type": "object",
   "propertyNames": {
    "type": "string",
    "maxLength": 80
   },
   "additionalProperties": {}
  },
  "workflows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1
     },
     "steps": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "name"
       ],
       "properties": {
        "name": {
         "type": "string",
         "maxLength": 160,
         "minLength": 1
        },
        "operation": {
         "type": "string",
         "maxLength": 160
        },
        "description": {
         "type": "string",
         "maxLength": 4000
        }
       },
       "additionalProperties": false
      },
      "maxItems": 30
     },
     "states": {
      "type": "array",
      "items": {
       "type": "string",
       "maxLength": 80,
       "minLength": 1
      },
      "maxItems": 40
     },
     "description": {
      "type": "string",
      "maxLength": 8000
     },
     "transitions": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "from",
        "to"
       ],
       "properties": {
        "on": {
         "type": "string",
         "maxLength": 200
        },
        "to": {
         "type": "string",
         "maxLength": 80,
         "minLength": 1
        },
        "from": {
         "type": "string",
         "maxLength": 80,
         "minLength": 1
        },
        "operation": {
         "type": "string",
         "maxLength": 160
        }
       },
       "additionalProperties": false
      },
      "maxItems": 80
     }
    },
    "additionalProperties": false
   },
   "maxItems": 12
  },
  "operations": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1
     },
     "path": {
      "type": "string",
      "maxLength": 400
     },
     "steps": {
      "type": "array",
      "items": {
       "type": "string",
       "maxLength": 200,
       "minLength": 1
      },
      "maxItems": 20
     },
     "method": {
      "type": "string",
      "maxLength": 16
     },
     "summary": {
      "type": "string",
      "maxLength": 1000
     },
     "examples": {
      "type": 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "score": 55,
  "issues": [
   {
    "type": "missing_retry_policy",
    "evidence": "Charges the saved card. A timeout means the outcome is uncertain. Gateway timeout.",
    "location": "operations[0]",
    "severity": "high",
    "description": "The contract describes a timeout or an uncertain outcome and does not say whether to retry. The HTTP method was not treated as a retry rule.",
    "agent_impact": "After a timeout an agent may charge or create a second time, or it may stop even though the first call succeeded.",
    "suggested_fix": "State whether that timeout is safe to retry, or tell the agent to read a status operation instead."
   },
   {
    "type": "contradictory_retry",
    "evidence": "Reserves stock. Safe to retry. Do not retry after a timeout.",
    "location": "operations[1]",
    "severity": "high",
    "description": "The contract both says a retry is safe and says not to retry. The HTTP method was not used.",
    "agent_impact": "An agent can repeat a call the contract also forbids, or abandon a call the contract says to repeat.",
    "suggested_fix": "Keep one retry rule and name the status or timeout it applies to."
   }
  ],
  "success": true,
  "analysis": "Checked retry sentences on 3 operations. A method name was not read as safe or unsafe.",
  "warnings": [
   {
    "type": "retry_not_documented",
    "evidence": "GET",
    "location": "operations[2]",
    "severity": "medium",
    "description": "The contract does not say whether a retry is safe. Silence is not a retry policy, and the HTTP method is not one either.",
    "agent_impact": "An agent has no contract rule for a dropped response and may invent one from the method.",
    "suggested_fix": "Add a sentence such as safe to retry or do not retry, and the outcome it applies to."
   }
  ],
  "limitations": [
   "Checks read only the supplied operations, workflows, and OpenAPI document. No URL is fetched and no model reads the text.",
   "A missing sentence is an undocumented contract. It is not a confirmed defect in a running implementation.",
   "A contradiction is two statements in the supplied text. It is not proof of how a server behaves.",
   "The HTTP method is not evidence that an operation is safe to retry or that it is idempotent.",
   "Matches are fixed phrases and field names. They do not infer a business rule that the text does not state.",
   "Safe phrases include safe to retry, may be retried, and retries are safe. Unsafe ph
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-agent-contract-retry-safety-check-9e1a6931/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
