# BRAINIAC Agent Contract State Transition Checker

> BRAINIAC Agent Contract State Transition Checker 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).

Validates state machine consistency in agent workflow contracts, detecting contradictory transitions, unknown states, and undefined operations.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/agent-contracts/state-transition-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-contract-state-transition-checker-500bc4d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_m6ZMMabJRzFzF_NCkcHsq

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-state-transition-checker-500bc4d9 -d '<json body>'
```

Example prompt: Can you check this agent workflow contract for state machine problems — I want to know if any transitions reference states or operations that aren't defined, and if there are any contradictory transitions where the same trigger leads to two different states?

## When to prefer this

Use this endpoint when you need to statically validate the logical consistency of an agent workflow contract's state machine before deployment or execution — especially when the contract mixes OpenAPI operations with named states and transitions. Prefer this over manual review or generic linting when you need structured issue reports with agent-impact explanations and actionable fix suggestions. Best suited for catching contradictory transitions, dangling state references, and undefined operations in multi-step agentic workflows.

## Known failure modes

- Malformed workflow input returns schema validation error
- Transitions referencing undefined states flagged as unknown_state issues
- Operations referenced in transitions but not in the operations list flagged as unknown_operation
- Contradictory transitions (same state+trigger, different destination) flagged as contradictory_transition high severity
- Payment of 0.04 USDC on Base required via x402 or request is rejected
- Exceeding maxItems limits (12 workflows, 80 transitions, 30 steps) may cause truncation or rejection

## 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 validation score (0-100), a list of issues with type, severity (high/medium/low), location, description, agent impact explanation, and suggested fix, plus warnings for soft problems like states with no incoming or outgoing transitions, and an analysis summary string.

## 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": 48,
  "issues": [
   {
    "type": "unknown_operation",
    "evidence": "missing_op",
    "location": "workflows[0].transitions[1]",
    "severity": "medium",
    "description": "A transition names an operation that is not in the supplied operation list. The operation was not assumed to exist.",
    "agent_impact": "An agent can call an operation the contract bundle does not define.",
    "suggested_fix": "Point the transition at a supplied operation name."
   },
   {
    "type": "contradictory_transition",
    "evidence": "draft on place -> submitted and paid",
    "location": "workflows[0].transitions[1]",
    "severity": "high",
    "description": "The same state and trigger lead to two different states in the supplied workflow.",
    "agent_impact": "An agent cannot choose one next state for the same trigger.",
    "suggested_fix": "Keep one destination for that state and trigger."
   },
   {
    "type": "unknown_state",
    "evidence": "archived",
    "location": "workflows[0].transitions[2]",
    "severity": "high",
    "description": "A transition ends in a state that is not in the supplied state list.",
    "agent_impact": "An agent can record a state the rest of the contract does not mention.",
    "suggested_fix": "Add archived to states or change the transition."
   }
  ],
  "success": true,
  "analysis": "Checked 1 workflows or operation texts that declare a transition.",
  "warnings": [
   {
    "type": "no_incoming",
    "evidence": "draft",
    "location": "workflows[0]",
    "severity": "low",
    "description": "No supplied transition enters this state. The contract does not identify it as the start.",
    "agent_impact": "An agent has no declared way to reach this state.",
    "suggested_fix": "Add the transition that enters it, or mark it as the start in the workflow text."
   },
   {
    "type": "no_outgoing",
    "evidence": "paid",
    "location": "workflows[0]",
    "severity": "low",
    "description": "No supplied transition leaves this state. The contract does not say it is terminal.",
    "agent_impact": "An agent may wait for a later state that is never defined, or it may stop early.",
    "suggested_fix": "Add the next transition, or state that this state is terminal."
   }
  ],
  "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 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-agent-contract-state-transition-checker-500bc4d9/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)
