{"uid":"cap_m6ZMMabJRzFzF_NCkcHsq","slug":"brainiac-agent-contract-state-transition-checker-500bc4d9","name":"BRAINIAC Agent Contract State Transition Checker","description":"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.","url":"https://www.brainiac.software/api/v1/agent-contracts/state-transition-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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":"array","items":{},"maxItems":8},"responses":{"type":"array","items":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"status":{"type":"string","maxLength":40},"example":{},"examples":{"type":"array","items":{},"maxItems":8},"description":{"type":"string","maxLength":4000}},"additionalProperties":false},"maxItems":20},"parameters":{"type":"array","items":{"type":"object","required":["name"],"properties":{"in":{"enum":["query","header","path","cookie","body"],"type":"string"},"name":{"type":"string","maxLength":120,"minLength":1},"schema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"required":{"type":"boolean"},"description":{"type":"string","maxLength":4000}},"additionalProperties":false},"maxItems":40},"description":{"type":"string","maxLength":8000},"outputSchema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"requestSchema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}}},"additionalProperties":false},"maxItems":40}}},"responseSchema":{"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 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.","Transitions come from workflow.transitions and from operation sentences that say from X to Y or X -> Y.","An unknown operation is reported only when other operations were supplied and the name is absent. The check does not invent the missing operation.","An unknown state or a trigger with two destinations is a conflict in the document. A state with no edge is a warning and does not change the score.","Each unknown state subtracts 15. A contradictory trigger subtracts 25. An unknown operation subtracts 12. The score is omitted when no transition is declared."],"recommendations":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Ngl3FPFgMuOFVSdDFFHLC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates state machine consistency in agent workflow contracts, detecting contradictory transitions, unknown states, and undefined operations.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Pre-deployment workflow contract audit","prompt":"Before I deploy this AI agent contract, check the workflow definition for any broken transitions, unknown states, or contradictory rules — I need to know the score and a list of issues with their severity."},{"title":"Detecting unreachable states in ordering system","prompt":"I have an order workflow with states like draft, submitted, paid, and archived — can you analyze the transitions and tell me if any states are unreachable or if any triggers lead to conflicting destinations?"},{"title":"Validating OpenAPI-linked agent operations","prompt":"My agent contract references several API operations in its transition rules. Can you verify that every transition in the workflow actually maps to a defined operation in the spec, and flag anything that's missing?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T12:34:07.251Z","isFirstParty":false,"canonicalSlug":"brainiac-agent-contract-state-transition-checker-500bc4d9"}