Your application
Enqueue a versioned tool call through the TypeScript or Python SDK.
DURABLE EXECUTION / CUSTOMER-OWNED WORKERS
Make tool calls and background operations durable. Queue the work, run it in your own workers, and control what happens when it fails.
TypeScript & Python · At-least-once execution
enqueue()persist · schedule · inspectclaim · execute · reportPersist the job. Schedule retries. Inspect every attempt.
Accelerated example · at-least-once executionGetRatchet coordinates execution. Your workers make the actual calls, with your credentials and your deployment choices.
Enqueue a versioned tool call through the TypeScript or Python SDK.
Persist the job, schedule attempts and track the execution history.
Claim work, call your provider and report the result with a lease token.
Use Standard, Aggressive or Relaxed backoff. With Basic and Pro, define a Custom policy: attempts, initial delay, multiplier, cap and jitter. Each job keeps its policy snapshot.
Read the worker guideRetryableError with retryAfterMs respects the provider’s minimum wait.
RetryableError schedules another attempt within the policy limit.
NonRetryableError stops automatic attempts. Fix the input before replay.
Unknown handler errors are retryable by default. Classify third-party errors locally with classifyError; do not send raw exception objects.
From first call to recovery
Example path: bounded retries, circuit cooldown, then reviewed replay. External side effects still require destination-side idempotency.
Input accepted and persisted.
A worker claims a time-limited lease.
HTTP 503. Handler marks the failure retryable.
Policy delay: 10s · ±20% jitterAttempts exhausted. Automatic retries stop.
Open circuit holds further work.
A permitted probe succeeds after cooldown.
Operator-approved replay succeeds.
See attempts, worker leases and failure context. Pause an endpoint, let its circuit cool down, or review a replay before it runs.
Repeated failures open the circuit. A controlled probe checks recovery after cooldown.
Review input and handler version, acknowledge duplicate risk, then request another execution.
Inspect run history and export telemetry from your workers. Paid plans add alerts and bulk recovery.
Start a run, enqueue a versioned handler, then finish submitting work. A registered worker executes it asynchronously.
import { createRatchet } from '@getratchet/sdk';
const ratchet = createRatchet({
baseUrl: 'https://getratchet.app',
apiKey: process.env.GETRATCHET_INGEST_KEY!,
});
await ratchet.startRun('Customer onboarding');
await ratchet.enqueue({ customerId: 'cus_2048' }, {
name: 'send_welcome_email', version: '1', endpoint: 'Email service',
idempotencyKey: 'welcome:cus_2048', timeoutMs: 30_000, maxAttempts: 5,
});
await ratchet.finishRun();import os
from getratchet import Ratchet
ratchet = Ratchet('https://getratchet.app', os.environ['GETRATCHET_INGEST_KEY'])
ratchet.start_run('Customer onboarding')
ratchet.enqueue(
'send_welcome_email', '1', {'customerId': 'cus_2048'},
idempotency_key='welcome:cus_2048',
)
ratchet.finish_run()The key identifies this business operation. Pass it to the destination service too; a worker can finish an external action before its success report arrives.
For a short, disposable operation, an in-process retry may be enough. Use durable execution when unfinished work and recovery history matter.
| Concern | Built in your application | With GetRatchet |
|---|---|---|
| Process restart | Persist and recover unfinished work yourself. | Durable queue, leases and attempt history. |
| Provider outage | Coordinate backoff, caps and circuit state. | Policy snapshots and circuit gates. |
| Failed work | Build inspection and replay tooling. | Inspect a run and review its replay. |
| External side effects | Use destination-side idempotency. | Still use destination-side idempotency. |
Scoped API keys. Role-based access. Encrypted durable inputs and replay results. Redacted inspection views. Revocable sessions. These are controls, not a claim of certification.
Optional AI advisory summarizes bounded operational evidence. Deterministic checks and human approval control recovery; advice cannot schedule a replay.
Read data handling and security detailsEvery plan uses your own workers. Choose capacity and recovery controls, not a different execution model.
$0/ month
50,000 attempts / UTC month
$29/ month
500,000 attempts / UTC month
$99/ month
2,000,000 attempts / UTC month
No. You deploy TypeScript or Python workers. GetRatchet stores and coordinates jobs; your workers execute the registered handlers.
No. Execution is at least once. A lost report can cause another attempt after an external action succeeded. Use destination-side idempotency for side effects.
Yes. RetryableError, NonRetryableError and a local error classifier control retry decisions. A retry-after hint sets a minimum delay, up to the 24-hour safety limit.
New work is blocked at the allowance or unfinished-work limit. Already accepted jobs can finish. There are no automatic overage charges.
Create a workspace, register a worker, and inspect your first durable run.