{"uid":"cap_LE4Nqj2Tk01XjnIwQx61Y","slug":"brainiac-agent-contracts-idempotency-audit-1e9bb4b4","name":"BRAINIAC Agent Contracts Idempotency 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/idempotency-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":55,"issues":[{"type":"missing_idempotency","evidence":"Creates an order for the sku.","location":"operations[0]","severity":"high","description":"The text says the operation creates or changes something, and it does not name an idempotency key or a replay result. This is missing documentation, not proof of a duplicate write.","agent_impact":"An agent that retries can create a second charge, order, or message because the contract never says what a repeat does.","suggested_fix":"Name an Idempotency-Key and say whether a replay returns the original result."},{"type":"contradictory_idempotency","evidence":"Creates a payment. An Idempotency-Key returns the same payment on replay. Every call creates a new payment.","location":"operations[1]","severity":"high","description":"The contract says a replay returns the same result and also says each call creates a new one. Both sentences are in the supplied text.","agent_impact":"An agent cannot tell whether to reuse an idempotency key or to expect a second resource.","suggested_fix":"Delete one of the two sentences so the replay result is unambiguous."}],"success":true,"analysis":"Checked 3 operations for a stated create or update and a stated replay rule. No operation was marked idempotent unless the text says so.","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 state change is a fixed verb such as create, update, delete, charge, send, submit, transfer, cancel, write, insert, or remove.","Idempotency text is the word idempotent, Idempotency-Key, replay, or same result. A key name without that sentence stays a warning.","Missing idempotency subtracts 20. A contradiction subtracts 25. Warnings do not change the score."],"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_0Is08JcBnGjvL7VqZEcCD","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 agent contract definitions (OpenAPI specs, workflows, operations) for missing or contradictory idempotency documentation, scoring and listing issues that could cause duplicate actions on retry.","exampleAgentPrompt":"Audit my agent contract for idempotency problems — here's my OpenAPI spec and two workflows: a 'create-order' workflow with steps for checking inventory and placing a charge, and a 'send-notification' workflow. Flag any operations missing idempotency key documentation or with contradictory replay rules, and give me a score.","exampleUseCases":[{"title":"Pre-deploy retry safety check","prompt":"Before I let my agent start calling this payment API autonomously, audit the OpenAPI spec and charge workflow I've written to find any operations that could cause a duplicate charge if the agent retries — give me a score and a list of what needs fixing."},{"title":"Contradictory idempotency claim detection","prompt":"My order workflow documentation says 'an Idempotency-Key returns the same order on replay' in one place and 'every call creates a new order' in another — can you run an idempotency audit on these operations and tell me exactly where the contradiction is and how to fix it?"},{"title":"Compliance review for agentic marketplace listing","prompt":"I'm submitting my agent contract to a marketplace and they require all state-changing operations to document their replay behavior. Run an idempotency audit on my full OpenAPI spec and workflows so I can see which operations are missing that documentation before I submit."}],"resultDescription":"Returns a JSON object with a numeric idempotency score (0-100), a success flag, an analysis summary string, a list of issues each containing type, severity (high/medium/low), location within the input, evidence text, description, agent impact, and suggested fix, plus warnings and limitations arrays explaining what the checker can and cannot infer.","failureModes":["Malformed or missing required input fields result in validation errors","Operations with implicit idempotency (not textually stated) are flagged as missing even if the server is safe","Contradictions are reported from text alone and may not reflect actual server behavior","Truncated or very large OpenAPI documents may exceed schema limits (maxItems, maxLength constraints)","Fixed-phrase matching may miss unconventional idempotency language not matching expected vocabulary"],"whenToPreferThis":"Use this endpoint when you need automated, structured detection of idempotency documentation gaps and contradictions in agent-facing API contracts before deployment or marketplace listing. Prefer it over manual review when you have machine-readable OpenAPI specs or workflow definitions and need a scored, actionable report highlighting exactly which operations could cause duplicate side effects on agent retry. It is particularly valuable for payment, order, messaging, or any state-mutating operation where duplicate execution is costly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-11T13:54:47.236Z","isFirstParty":false,"canonicalSlug":"brainiac-agent-contracts-idempotency-audit-1e9bb4b4"}