# BRAINIAC Agent Contracts Partial Failure Check

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

Analyzes multi-step API workflow definitions for undocumented partial failure, missing rollback, contradictory atomicity, and retry ambiguity issues that could confuse AI agents

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/agent-contracts/partial-failure-check?utm_source=zero.xyz
- Price: $0.04/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-contracts-partial-failure-check-c9cd9680
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P2zPZYqVg-90SAyOa-pZA

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-contracts-partial-failure-check-c9cd9680 -d '<json body>'
```

Example prompt: Check this OpenAPI spec and workflow definition for partial failure issues — specifically look for steps where a mid-sequence failure leaves earlier steps completed without documenting rollback, any contradictory atomicity claims, and missing retry guidance, then give me a score and a list of issues with suggested fixes.

## When to prefer this

Choose this endpoint when you need automated, structured detection of partial-failure and rollback ambiguities in multi-step AI agent workflow contracts — especially before deploying agentic systems where a mid-sequence failure could leave external state partially modified. It is specifically designed for AI agent contract auditing (not general API linting), provides agent-impact-aware severity ratings, and operates pay-per-call with no account setup required via x402 on Base.

## Known failure modes

- Malformed or missing workflow/operations input returns a validation error
- Truncated or unparseable OpenAPI object may yield incomplete analysis
- Very large workflow sets exceeding maxItems limits are rejected
- Payment not completed via x402 results in HTTP 402 and no analysis
- Ambiguous workflow descriptions with insufficient text may yield low-confidence findings

## 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 numeric score (0–100) indicating overall partial-failure clarity, a list of categorized issues (each with type, severity, location, evidence, description of agent impact, and suggested fix), a list of warnings for lower-severity gaps, and a plain-language analysis summary describing how many multi-step definitions were checked and what categories were evaluated.

## 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": 43,
  "issues": [
   {
    "type": "missing_partial_result",
    "evidence": "reserve, charge, notify",
    "location": "workflows[0]",
    "severity": "high",
    "description": "More than one step is declared, and the text does not say whether a later failure leaves earlier steps completed. That behavior is undocumented.",
    "agent_impact": "An agent may retry the whole workflow after the first step has already completed, or it may ignore a step that failed.",
    "suggested_fix": "State whether a response lists a per-step status, or state that partial success cannot occur."
   },
   {
    "type": "missing_rollback",
    "evidence": "checkout",
    "location": "workflows[0]",
    "severity": "medium",
    "description": "The multi-step contract does not say whether completed steps are rolled back, compensated, or left in place.",
    "agent_impact": "An agent does not know whether it must undo an earlier step after a later step fails.",
    "suggested_fix": "Say the steps are atomic, or name the compensation step."
   },
   {
    "type": "contradictory_failure_mode",
    "evidence": "The refund is atomic and also reports partial success. credit Credits the payment. restock Restocks the sku.",
    "location": "workflows[1]",
    "severity": "high",
    "description": "The contract says the steps are atomic or all-or-nothing and also says a partial success is possible.",
    "agent_impact": "An agent cannot tell whether a failed step left earlier steps in place.",
    "suggested_fix": "Choose one mode and name the response field that shows which steps completed."
   }
  ],
  "success": true,
  "analysis": "Checked 2 multi-step definitions for a partial result, rollback, and step retry.",
  "warnings": [
   {
    "type": "missing_step_retry",
    "evidence": "checkout",
    "location": "workflows[0]",
    "severity": "medium",
    "description": "The contract does not say whether a failed step can be retried without repeating the earlier steps.",
    "agent_impact": "An agent may restart at step one after a later timeout.",
    "suggested_fix": "Say which step may be retried and which earlier result must be reused."
   },
   {
    "type": "missing_step_retry",
    "evidence": "refund",
    "location": "workflows[1]",
    "severity": "medium",
    "description": "The contract does not say whether a failed step can be retried without repeating the earlier steps.",
    "agent_impact": "An agent may restart at step 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-agent-contracts-partial-failure-check-c9cd9680/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)
