Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Retry Schedule Planner

network.retry_policy_plan

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You tell us how a request failed and what your retry policy is, and we return the whole schedule: whether a retry is warranted at all, how long to wait before each remaining attempt, and the cumulative wait. Rate limits, timeouts, connection errors and 5xx responses are treated as worth retrying; client errors are not, because retrying a 400 unchanged just repeats it. A Retry-After you pass in raises the first wait, and every wait is capped by your ceiling. Jitter, when you ask for it, is derived from a seed you supply rather than a random number, so the same failure always plans the same waits. We compute the schedule only: no request is sent, nothing sleeps, and no clock is read.

Every HTTP client reimplements backoff slightly differently, so the same outage produces a different retry storm in each service and nobody can say how long a call will keep trying. Computing the schedule in one place makes the policy explicit, comparable across languages, and reviewable before it ships.

Reliability

Fully deterministic: the same policy, failure type and seed always give the same schedule, because there is no clock and no randomness. Jitter, when you ask for it, is SHA-256 over your seed and the attempt number, so two services with different seeds spread out while each stays reproducible. Failures, none of which are worth retrying unchanged: RETRY_POLICY_INVALID means the policy contradicts itself — maxDelayMs below baseDelayMs, jitterPercent without DETERMINISTIC jitter, or a multiplier other than 1 on a non-EXPONENTIAL backoff — so fix the policy and resend. RETRY_SEED_REQUIRED means you asked for DETERMINISTIC jitter without a seed, so supply a stable one such as the request id. RETRY_DELAY_OVERFLOW means an un-capped wait, or the schedule total, is larger than a millisecond count can hold, which takes a large multiplier and base delay together, so lower one of them.

Context footprint

Returns at most 19 small entries plus the resolved policy, so the response stays under a few kilobytes. A successful call costs 1 execution credit.

When to use it

When you know how a call failed and what your policy is, and you want the exact waits — or a straight answer that retrying is pointless.

When you need the retry to actually happen, when you are classifying a whole batch of queued failures, or when retryability depends on parsing the response.

Scope

Note
Compute the retry schedule a backoff policy implies for one failed HTTP call, including whether that failure type is worth retrying.

Non-goals

  • Does not send, resend, or probe any request
  • Does not sleep, enqueue, or schedule anything
  • Does not read a clock — waits are offsets, not wall-clock times
  • Does not inspect the failed response body or headers for you
  • Does not generate random jitter; jitter comes from your seed

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
policyobjectYesClosed retry rules: maxAttempts, backoff, baseDelayMs, maxDelayMs plus optional multiplier, jitter and jitterPercent.
failureTypestringYesHow the call failed.
retryAfterMsintegerNoServer-requested minimum wait in milliseconds from 0 through 604800000; omit it for no floor.
seedstringNoRequired unless jitter is not DETERMINISTIC; up to 256 characters seeding deterministic jitter.

Output schema

FieldTypeRequiredDescription
retryablebooleanYesTrue only when a retry is actually planned.
reasonCodestringYesWhy a schedule was or was not produced.
attemptsarrayYesRemaining attempts in order, each a closed {attempt, delayMs, cumulativeDelayMs} object; empty when nothing is retryable.
totalDelayMsintegerYesTotal wait across the whole schedule, or 0 when no retry is planned.
policyobjectYesPolicy actually applied, with omitted multiplier, jitter and jitterPercent filled in so a stored schedule can be recomputed.
_metaobjectNoAlways present on success, with failureType, delaysCapped and delaysFloored.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"network.retry_policy_plan","input":{"policy":{"maxAttempts":4,"backoff":"EXPONENTIAL","baseDelayMs":1000,"maxDelayMs":60000},"failureType":"SERVER_ERROR"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("network.retry_policy_plan", {"policy":{"maxAttempts":4,"baseDelayMs":1000,"backoff":"EXPONENTIAL","multiplier":2,"maxDelayMs":60000},"failureType":"SERVER_ERROR"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
RETRY_POLICY_INVALID400NoThe request payload failed this skill's input validation.
RETRY_SEED_REQUIRED400NoThe request payload failed this skill's input validation.
RETRY_DELAY_OVERFLOW429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not send, resend, or probe any request
  • Does not sleep, enqueue, or schedule anything
  • Does not read a clock — waits are offsets, not wall-clock times
  • Does not inspect the failed response body or headers for you
  • Does not generate random jitter; jitter comes from your seed
  • Performing the retries themselves
  • Classifying a batch of queued job failures — use workflow.retry_dead_letter_plan
  • Deciding retryability from a response body

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "network.retry_policy_plan",
  "input": {
    "policy": {
      "maxAttempts": 4,
      "baseDelayMs": 1000,
      "backoff": "EXPONENTIAL",
      "multiplier": 2,
      "maxDelayMs": 60000
    },
    "failureType": "SERVER_ERROR"
  }
}

Examples

Exponential backoff after a 503, capped at one minute

Inputjson
{
  "policy": {
    "maxAttempts": 4,
    "baseDelayMs": 1000,
    "backoff": "EXPONENTIAL",
    "multiplier": 2,
    "maxDelayMs": 60000
  },
  "failureType": "SERVER_ERROR"
}
Expected outputjson
{
  "_meta": {
    "delaysFloored": 0,
    "failureType": "SERVER_ERROR",
    "delaysCapped": 0
  },
  "totalDelayMs": 7000,
  "retryable": true,
  "policy": {
    "maxAttempts": 4,
    "backoff": "EXPONENTIAL",
    "baseDelayMs": 1000,
    "maxDelayMs": 60000,
    "multiplier": 2,
    "jitter": "NONE",
    "jitterPercent": 0
  },
  "reasonCode": "RETRY_SCHEDULED",
  "attempts": [
    {
      "attempt": 2,
      "delayMs": 1000,
      "cumulativeDelayMs": 1000
    },
    {
      "attempt": 3,
      "delayMs": 2000,
      "cumulativeDelayMs": 3000
    },
    {
      "attempt": 4,
      "delayMs": 4000,
      "cumulativeDelayMs": 7000
    }
  ]
}

Rate limited, with the server's Retry-After raising the first wait

Inputjson
{
  "policy": {
    "maxDelayMs": 60000,
    "backoff": "FIXED",
    "baseDelayMs": 5000,
    "maxAttempts": 3
  },
  "failureType": "RATE_LIMIT",
  "retryAfterMs": 30000
}
Expected outputjson
{
  "_meta": {
    "delaysFloored": 1,
    "failureType": "RATE_LIMIT",
    "delaysCapped": 0
  },
  "totalDelayMs": 35000,
  "retryable": true,
  "policy": {
    "maxAttempts": 3,
    "backoff": "FIXED",
    "baseDelayMs": 5000,
    "maxDelayMs": 60000,
    "multiplier": 1,
    "jitter": "NONE",
    "jitterPercent": 0
  },
  "reasonCode": "RETRY_SCHEDULED",
  "attempts": [
    {
      "attempt": 2,
      "delayMs": 30000,
      "cumulativeDelayMs": 30000
    },
    {
      "attempt": 3,
      "delayMs": 5000,
      "cumulativeDelayMs": 35000
    }
  ]
}
  • Show a caller the full wait schedule before their client starts retrying
  • Apply one shared retry policy across several HTTP clients and languages
  • Turn a Retry-After header into a policy-capped first wait

Avoid for

  • Performing the retries themselves
  • Classifying a batch of queued job failures — use workflow.retry_dead_letter_plan
  • Deciding retryability from a response body

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

networkretryresiliencehttp