Decide whether a failed HTTP call may be retried, must be reconciled, or must not be repeated

$0.005 USDC per call · Agent infrastructure · POST /api/v1/retry-admissibility · Id retry-admissibility

Given a request's method, how it ended (response status, timeout, reset, refused), idempotency-key evidence and optional caller policy, returns retry / do-not-retry / reconcile / unknown for an agent deciding what to do after a failed tool or API call. Encodes RFC 9110 method idempotency, the proxy and retry-of-a-retry rules and Retry-After parsing; a timeout or reset is never read as success or as safe to repeat for a non-idempotent request. status pass = retry is admissible; fail = do-not-retry or reconcile (see decision); unknown = evidence missing. Does not know any vendor's idempotency-key scope or whether a 429 means unprocessed: those must come from the caller.

What you get

Prevents the double charge, double email and double order that a blind retry of a timed-out POST causes.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/retry-admissibility. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/retry-admissibility \
  -H 'content-type: application/json' \
  -d '{"method":"POST","ended":"timeout","requestSent":"sent","idempotencyKey":{"present":false}}'

Input

FieldTypeRequiredDescription
methodstring; length 1..32yesHTTP method, case-sensitive (GET, POST, ...).
endedstring; one of "response", "timeout", "connection-reset", "connection-refused", "dns-failure", "tls-failure", "aborted-by-client"yesHow the attempt ended.
statusinteger; 100..599noRequired when ended is 'response'.
requestSentstring; one of "unknown", "not-sent", "sent"noWhether request bytes reached the network. connection-refused and dns-failure imply not-sent.
idempotencyKeyobjectnoCaller-asserted evidence: the engine knows no vendor's key semantics.
retryAfterstring; length 0..100noRetry-After header value.
attemptinteger; 1..1000no1-based number of the attempt that just ended. Default 1.
automaticbooleannoTrue when the retry would be issued automatically (library or proxy) rather than by a deliberate decision.
previousAttemptWasAutomaticRetrybooleanno
actorstring; one of "client", "proxy"no
asOfstring; length 0..40noRFC 3339 instant; needed only to turn a Retry-After HTTP-date into seconds.
policyobjectno

Example request body

{
  "method": "POST",
  "ended": "timeout",
  "requestSent": "sent",
  "idempotencyKey": {
    "present": false
  }
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
decisionstring; one of "retry", "do-not-retry", "reconcile", "unknown"no
reasonstringno
methodClassstring; one of "safe", "idempotent", "non-idempotent", "unknown"no
delaySecondsintegernoWait before retrying, when Retry-After was readable.
timeoutIsSuccessbooleannoAlways false.
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.

Machine-readable