{"uid":"cap_xHH8h7fw2K63wwsaesj2u","slug":"brainiac-agent-contracts-error-recovery-audit-6d7ecc1f","name":"BRAINIAC Agent Contracts Error Recovery Audit","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/error-recovery-audit?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":65,"issues":[{"type":"opaque_error","evidence":"Bad request.","location":"operations[0].responses[0]","severity":"high","description":"The error text is a generic label and the schema has no code, message, or field. The agent is not told how to correct the request.","agent_impact":"An agent cannot tell which parameter to change, so it may repeat the same request.","suggested_fix":"Name the rejected field and add a code or message property."},{"type":"no_error_contract","evidence":"capture_payment","location":"operations[1]","severity":"high","description":"No 4xx or 5xx response is documented. The failure shape is missing from the contract, which does not prove the server never fails.","agent_impact":"An agent that receives an error has no documented way to correct the next call.","suggested_fix":"Document the error statuses and a machine-readable code or field."}],"success":true,"analysis":"Checked error responses on 2 operations.","warnings":[],"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 useful error schema has one of code, message, error, errors, field, details, type, title, parameter, path, or reason.","A description that names a supplied parameter, or the word field or parameter, counts as a correction target.","A missing error contract subtracts 20. A generic error subtracts 15. An error with no correction target subtracts 10."],"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_bjpXhTC86ef41KHPv37-Z","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":"Audits an API specification's error responses for agent-readability, scoring how well documented errors enable an AI agent to self-correct after failures","exampleAgentPrompt":"Can you audit this OpenAPI spec and my two workflows for error recovery quality? I want to know which operations have opaque or missing error contracts that would prevent an AI agent from self-correcting, and get a score along with specific fixes for each issue.","exampleUseCases":[{"title":"Pre-launch agent API error audit","prompt":"Before I publish this API for agents to use, can you audit the OpenAPI spec and all 5 workflows to see if the error responses are good enough for an agent to self-correct — give me a score and flag every operation with missing or generic error contracts?"},{"title":"Fixing payment flow error contracts","prompt":"I have a payment capture operation and an order workflow — can you check whether the error responses are machine-readable enough for an AI agent to know exactly what to fix when a request fails, and suggest specific improvements?"},{"title":"Compliance review for agent-facing API","prompt":"Our API is about to be used by autonomous agents and I need to know if the documented error responses meet the bar for agent self-correction — please analyze all the operations and workflows and tell me which ones have opaque errors, missing 4xx/5xx contracts, and no correction targets?"}],"resultDescription":"Returns a numeric score (0–100) reflecting overall error contract quality, an array of issues each with type, evidence, location, severity, description, agent impact, and suggested fix, plus an analysis summary, warnings, limitations, and recommendations. Higher scores indicate error responses that give agents enough context to self-correct failed calls.","failureModes":["Incomplete input schema causes limited analysis coverage","Truncated operation lists may miss some undocumented error paths","No live server fetching — only analyzes the supplied text, not actual runtime behavior","Very large OpenAPI documents may be truncated by input limits","Fixed-phrase matching may miss semantically equivalent error descriptions","Cannot detect runtime error behavior that contradicts the documentation"],"whenToPreferThis":"Choose this endpoint when you need a structured, scored audit specifically focused on how well an API's error responses enable AI agent self-correction — particularly before publishing an API for autonomous agent consumption. It is distinct from general OpenAPI linting tools because it evaluates agent-specific concerns: whether errors name the offending field, include machine-readable codes, and provide enough context for an agent to modify and retry a request without human intervention.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T18:39:38.545Z","isFirstParty":false,"canonicalSlug":"brainiac-agent-contracts-error-recovery-audit-6d7ecc1f"}