# Durable SDK > A TypeScript framework: keyed-by-intent sagas, every side effect a step that reads before it writes, can undo or says why not and is refused at the door otherwise, an append-only hash-chained ledger, a limbo a person clears; hosted on durablesdk.com. Every docs page is Markdown at its URL with `.md` appended (and under `Accept: text/markdown`); the plane API's OpenAPI document is at https://durablesdk.com/openapi.json; `durable-sdk explain ` answers every error code and refusal offline; `durable-sdk explain ` prints what a door admits, each step with its undo and its writes, the facts and who listens, `durable-sdk graph walk ` the closure from any node and `durable-sdk graph impact --changed` what a change reaches, offline over the committed graph-index.json the template writes, so ask the graph before an edit; `durable-sdk doctor --host` runs the tree's rules; every hosted app carries an `AGENTS.md`. ## Reference first - [OpenAPI document](https://durablesdk.com/openapi.json): the plane API, every route with its scope, schemas and error codes - [CLI reference](https://durablesdk.com/docs/reference/cli.md): Every durable-sdk verb with its flags, the environment it reads, the credentials file, the exit grammar and what --json prints. - [API reference](https://durablesdk.com/docs/reference/api.md): The platform API under /api/v1: the base, the two credentials, Idempotency-Key, the error shape, paging, every route with its scope and an example, the console proxy, /openapi.json. ## Start - [Durable SDK](https://durablesdk.com/docs/index.md): A TypeScript framework with a ledger, an undo, a doctor and docs an agent can read. Hosted at durablesdk.com. - [Quickstart](https://durablesdk.com/docs/quickstart.md): Sign up, scaffold an app, log in, create it, deploy it, run a workflow and see it in the console. Ten minutes. - [Concepts](https://durablesdk.com/docs/concepts.md): Runs, intent keys, steps and undo, facts and listeners, the ledger, limbo, the dispatcher and the sweeper, the operator API, and a glossary. ## Why Durable - [How it works](https://durablesdk.com/docs/why/how-it-works.md): The model drawn: a run from intent to facts, a step and its undo, the ledger's chain, the lifecycle, the dispatcher, where it all runs, and what is stored against what is derived. - [Design paradigms](https://durablesdk.com/docs/why/paradigms.md): The eleven rules the engine holds at its doors, each with the failure it removes and a six-line example. - [The till: set state and derived state](https://durablesdk.com/docs/why/derived-state.md): A cash register keeps a tape, not a number: why a derived total beats a stored one, and what the ledger is to your data. - [Why Durable](https://durablesdk.com/docs/why/compared.md): Durable beside a workflow cluster, a hosted event-function service, a platform's durable functions, a queue and a hand-rolled job table: what each holds, what only Durable holds, and when to pick another. - [Use cases](https://durablesdk.com/docs/why/use-cases.md): Ten shapes Durable fits on one storefront platform, from a shopper's checkout and the fulfilment service to refunds, transfers, app events, subscriptions, provisioning, imports, a merchant's agent and notifications, each with its key, steps, undo and facts. ## Compare - [Compared](https://durablesdk.com/docs/compare.md): Durable beside eleven products in one table, a column each: the model, what a side effect leaves behind, the undo, idempotency, retries, timers, batching, history, the UI, observability, languages, hosting, pricing shape, self-hosting, testing and what an AI coding agent can ask, every cell the product's own documentation with its page under Sources. - [Durable beside Trigger.dev](https://durablesdk.com/docs/compare/trigger-dev.md): A platform runs your task on its workers. Making the run safe to run again is yours. - [Durable beside Inngest](https://durablesdk.com/docs/compare/inngest.md): A service calls your function and memoizes each step. The idempotency key and the cleanup stay with you. - [Durable beside the Workflow SDK](https://durablesdk.com/docs/compare/workflow-sdk.md): A platform's directives make a function durable. The dedupe, the idempotency and the rollback stay with you. - [Durable beside Upstash Workflow](https://durablesdk.com/docs/compare/upstash-workflow.md): A queue drives each step as its own request to your endpoint. The idempotency, the undo and the record stay with you. - [Durable beside Cloudflare Workflows](https://durablesdk.com/docs/compare/cloudflare-workflows.md): A platform's class persists each step and hibernates through waits. The idempotency and the rollback's coverage stay with you. - [Durable beside Hatchet](https://durablesdk.com/docs/compare/hatchet.md): An engine dispatches tasks to workers you run. The workers, the idempotency and the compensation stay with you. - [Durable beside DBOS](https://durablesdk.com/docs/compare/dbos.md): A library on your Postgres checkpoints each step. The determinism, the retries and the undo stay with you. - [Durable beside SQS](https://durablesdk.com/docs/compare/sqs.md): A standard queue hands you delivery. Everything after the receive is yours. - [Durable beside Temporal Cloud](https://durablesdk.com/docs/compare/temporal-cloud.md): A hosted server keeps the history. The workers, the discipline and the saga stay with you. - [Durable beside Restate](https://durablesdk.com/docs/compare/restate.md): A server in front of your services journals every step. The server, the determinism and the saga stay with you. - [Durable beside Step Functions](https://durablesdk.com/docs/compare/step-functions.md): A managed state machine hands each state's work to a service. The code, the idempotency and the compensation stay with you. - [The queue vocabulary](https://durablesdk.com/docs/compare/queues.md): The sixteen semantics of a queue, and what Durable does for each. ## Build - [Writing a workflow](https://durablesdk.com/docs/guide/writing-a-workflow.md): One file under src/workflows, a name, a field-list key that never reads the clock, a describe and an example, and execute with a requestId. - [Vibe coding with the graph](https://durablesdk.com/docs/guide/vibe-coding-with-the-graph.md): Ask the graph before you edit: durable-sdk explain prints what a door admits, what a step writes and who listens; graph walk the closure from any node; graph path the first chain between two; graph impact --changed what a change reaches. Offline, over the committed index the template writes. Every answer on this page is real. - [The graph, drawn](https://durablesdk.com/docs/guide/the-graph-drawn.md): The three verbs as figures a press can walk: the walk from the checkout door four hops out, the walk around the fact it emits, and the first chain from the door to the payment's capture, each printed under its drawing as the agent reads it. - [Steps and undo](https://durablesdk.com/docs/guide/steps-and-undo.md): Every step carries an undo with its effect or an irreversible reason; a write reads before it writes; an external write runs under a writeKey; the output is its stored form. - [Time and waits](https://durablesdk.com/docs/guide/time-and-waits.md): A schedule in four lines, a wait in one, a poll, a batch, a cap, the one duration grammar, and why a run body never reads the clock. - [Events and listeners](https://durablesdk.com/docs/guide/events-and-listeners.md): Declare a fact in the catalog with a clock-free key, emit it from a run, react with a listener that is itself a keyed run, batch a burst, take an inbound webhook. - [Changing a workflow](https://durablesdk.com/docs/guide/changing-a-workflow.md): Add a step at the end, give a step that may move an id, bump version when old rows no longer mean what the new body expects, put a replaced branch behind ctx.patched, and close a long run with continueAsNew. - [Testing](https://durablesdk.com/docs/guide/testing.md): The kit in the template: testDurable over memory stores with a clock you move, the hello.test.ts the template ships, the three cases over checkout.complete, prove for the crash-and-resume proof, and durable-sdk test. - [The doctor](https://durablesdk.com/docs/guide/the-doctor.md): durable-sdk doctor --host runs every rule over the tree offline and prints a failed rule as one line with its fix; --explain says a rule's law and hazard; durable-sdk explain answers a refusal, an error code or a run id. ## Host - [Hosting](https://durablesdk.com/docs/hosting.md): What the platform runs for an app: a project, a database with a preview branch, the hostnames, a build that migrates, a staged and checked production deployment, promotion, rollback, and what you never see. - [Deploy](https://durablesdk.com/docs/hosting/deploy.md): durable-sdk deploy uploads your tree in parts, the platform builds it, checks a production build and promotes it; previews per branch, the states, --json, CI with a key. - [Secrets](https://durablesdk.com/docs/hosting/secrets.md): durable-sdk secrets set writes a sensitive variable to your app's project through a sealed value in flight; the platform never reads it back; a change applies at the next build. - [Domains](https://durablesdk.com/docs/hosting/domains.md): Add your own hostname to an app on Pro and up, verify it with a TXT record, and keep the platform hostname beside it. - [Database](https://durablesdk.com/docs/hosting/database.md): Every app has its own Postgres; the read string is one read-only role you mint, rotate and revoke; what it can and cannot do; restore is coming. - [Logs](https://durablesdk.com/docs/hosting/logs.md): durable-sdk logs reads the current deployment's runtime stream for an environment, filtered by level and text, followed for up to five minutes; build lines live on the deployment. - [Usage and limits](https://durablesdk.com/docs/hosting/usage-and-limits.md): What each tier allows, how usage is counted per app and day, and what a refusal at a limit says. - [Regions](https://durablesdk.com/docs/hosting/regions.md): An app's region is one product word chosen at creation; the project and the database share it; the seven words and their cities. - [The platform](https://durablesdk.com/docs/hosting/platform.md): What the platform does for an app and what the engine never assumes of it — the compute model, the deadline and the park, the minute tick on production alone, the body cap, the firewall, failover, the durable.* metrics, the kill switches. - [CI/CD](https://durablesdk.com/docs/hosting/ci-cd.md): durable-sdk ci init --deploy writes the pipeline: a preview per pull request, production behind your tests, one secret; --json and the exit grammar in CI; how the platform itself is released. - [GitHub](https://durablesdk.com/docs/hosting/github.md): Connect a repository and every push deploys; previews per branch and pull request, a check and a comment on the commit; when to pick the App over your own workflow. ## Reference - [CLI reference](https://durablesdk.com/docs/reference/cli.md): Every durable-sdk verb with its flags, the environment it reads, the credentials file, the exit grammar and what --json prints. - [API reference](https://durablesdk.com/docs/reference/api.md): The platform API under /api/v1: the base, the two credentials, Idempotency-Key, the error shape, paging, every route with its scope and an example, the console proxy, /openapi.json. - [API errors](https://durablesdk.com/docs/reference/api/errors.md): Every refusal code of the plane API with its sentence and remedy; the human twin of the OpenAPI document's PlaneError. - [Configuration](https://durablesdk.com/docs/reference/configuration.md): durable.config.ts as the template writes it, every option of createDurable the app uses, and where each value comes from. - [Environment variables](https://durablesdk.com/docs/reference/environment-variables.md): Every variable a hosted app runs under, who sets it, what it means; the CLI's own variables; the reserved names. - [Compatibility](https://durablesdk.com/docs/reference/compatibility.md): The five surfaces the version number covers, what moves in a minor and what only in a major, the deprecation policy, the LTS line. - [MCP and agents](https://durablesdk.com/docs/reference/mcp-and-agents.md): What an agent reads and runs today (llms.txt, the .md twins, /openapi.json, explain, the graph's verbs over the index durable-sdk index writes, AGENTS.md and the four skills), how it signs up with a key, and the MCP that is coming. ## Operate - [The dashboard and the console](https://durablesdk.com/docs/operate/console.md): The dashboard's pages, and the Console tab that reads an app's runs, steps, ledger, limbo and facts through the platform. - [Accounts and keys](https://durablesdk.com/docs/operate/accounts-and-keys.md): Organizations as tenants, your first organization, seats and roles, API keys and their scopes, the CLI's login, rotation and revocation. - [Organization](https://durablesdk.com/docs/operate/organization.md): The members and their roles, the seats by tier, invitations, the organization's name and its end; the ten routes, a key never invites. - [Security](https://durablesdk.com/docs/operate/security.md): The tenant boundary, the sealed credentials, the key at rest, the upload's bounds, the cookie note and the disclosure policy, as the platform is built. - [Compliance](https://durablesdk.com/docs/operate/compliance.md): Where SOC 2, HIPAA, the data processor role and the DPA stand today, in status words, with what is planned and what is not. - [Pricing and tiers](https://durablesdk.com/docs/operate/pricing-and-tiers.md): The three tiers, every entitlement as a number, the refusal you see at a limit, and what the prices are today. - [FAQ](https://durablesdk.com/docs/operate/faq.md): Why Postgres only, why no worker, how Durable compares to Temporal, Inngest, DBOS and a managed workflow product, and the hosting questions a first week raises. - [Changelog](https://durablesdk.com/docs/changelog.md): What the platform shipped, newest first, with the record each entry rests on. - [Roadmap](https://durablesdk.com/docs/roadmap.md): What is coming to the platform, each item by its unit id, in plain words and in no promised order. ## SDK reference - [The model](https://durablesdk.com/docs/concepts/model.md): Intent, run, step, ledger, fact, listener, limbo, continue-as-new, state, scope and actor. - [Guarantees](https://durablesdk.com/docs/concepts/guarantees.md): Exactly once, at least once, what the ledger proves, what the engine never does. - [Data in the ledger](https://durablesdk.com/docs/concepts/ledger-and-data.md): Images, redaction by name and by shape, PII, HIPAA. - [Scheduling and time](https://durablesdk.com/docs/concepts/scheduling-and-time.md): Timers, waits, signals, schedules, polls, batches, caps, rate buckets; time inside one invocation. - [Adding a workflow](https://durablesdk.com/docs/workflows.md): The whole authoring guide: the file, the identity, execute, schedules, waits, steps, listeners, changing a workflow, testing it. - [Recipes](https://durablesdk.com/docs/recipes.md): Four products as workflows, compiled and run: an order saga, a campaign send, an intake with approval, a booking with reminders; the generator's templates. - [Testing a Durable app](https://durablesdk.com/docs/testing.md): Four layers: workflow tests on memory stores, the store proof, the tree rules, the platform contract; recording a provider. - [Threat model](https://durablesdk.com/docs/security/threat-model.md): The SDK's doors: the operator API, the relay, the webhooks, the cron and the wake, the ledger, the MCP, stored data, the actions and the undo. - [CLI usage](https://durablesdk.com/docs/reference/cli-usage.md): The SDK's own verbs: migrate, doctor, verify, test, peer, env, replay, explain, platform check, ledger; the environment and the exit codes. - [@durable-sdk/postgres](https://durablesdk.com/docs/reference/postgres.md): The migrator, the doctor, the probe and the plain-SQL store; a host without an ORM. - [@durable-sdk/vercel](https://durablesdk.com/docs/reference/vercel-adapter.md): The platform adapter: binding it, the wake modes, the adoption, the consumer, the route bindings. - [@durable-sdk/testing](https://durablesdk.com/docs/reference/testing-kit.md): The memory stores, testDurable, the fakes, the replay, the conformance suite, the guard pack. - [Refusals](https://durablesdk.com/docs/reference/refusals.md): Every sentence a door throws, with its trap and its remedy; what each primitive costs. - [The doctor's rules](https://durablesdk.com/docs/reference/rules.md): The core guard pack: each rule's law, hazard, drawback, fix and decision. - [Error codes](https://durablesdk.com/docs/reference/errors.md): The engine's error codes with their meaning and remedy; the run codes; what is never a failure.