{"uid":"cap_P2zPZYqVg-90SAyOa-pZA","slug":"brainiac-agent-contracts-partial-failure-check-c9cd9680","name":"BRAINIAC Agent Contracts Partial Failure Check","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/partial-failure-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":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 one after a later timeout.","suggested_fix":"Say which step may be retried and which earlier result must be reused."}],"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.","A multi-step definition is two or more workflow or operation steps, or the words batch, bulk, multi-step, or each item.","Partial phrases include partial success, per-item, and item status. Rollback phrases include rollback, compensate, undo, atomic, and all-or-nothing.","A contradiction subtracts 25. A missing partial result subtracts 20. A missing rollback sentence subtracts 12. A missing step retry is a warning.","The score is omitted when the document does not describe more than one step."],"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_Dm2RYmgJoJyjXFoGx3dS4","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":"Analyzes multi-step API workflow definitions for undocumented partial failure, missing rollback, contradictory atomicity, and retry ambiguity issues that could confuse AI agents","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Audit checkout workflow for rollback gaps","prompt":"I have a 3-step checkout workflow — reserve inventory, charge payment, send confirmation — and I need to know if my API contract tells agents what happens when the charge step fails after inventory is already reserved. Can you scan it for missing rollback or partial failure documentation?"},{"title":"Detect atomicity contradictions in refund spec","prompt":"My refund API spec says operations are atomic but also mentions partial success responses. Can you check whether those two claims contradict each other and tell me what an AI agent would misunderstand about retry behavior?"},{"title":"Validate agent retry safety of booking workflow","prompt":"I'm building an agent-driven hotel booking workflow with separate steps for room hold, payment, and notification. Before I ship it, can you score the workflow definition for missing step retry guidance so agents don't accidentally double-book by restarting from step one after a timeout?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T18:39:50.964Z","isFirstParty":false,"canonicalSlug":"brainiac-agent-contracts-partial-failure-check-c9cd9680"}