Durable functions

Resume workflows without redoing steps

Write an agent run or job as one function. Volcano saves each step and resumes after a crash or approval.

volcano.dev/dashboard/durable-functions
The Durable functions page in the Volcano dashboard, listing each function with its runtime, status and visibility

What it does

A failed step doesn't redo the job

Each step saves its result. Resumed runs reuse it instead of repeating the work.

  • Steps

    Results are saved, so finished work never repeats.

  • Waits

    A suspended run holds no compute while it waits.

  • Approvals

    Pause until a person approves or denies.

volcano.dev/dashboard/durable-functions
The Durable functions page in the Volcano dashboard, listing each function with its runtime, status and visibility

What you need

  • A Volcano account

    Sign up, then connect the CLI.

  • Volcano CLI

    Deploys and starts workflows.

  • Node.js or Python

    Node.js 22 or 24, Python 3.13 or 3.14.

Try it

Three steps from zero.

  1. Wrap your handler

    Put external calls and anything that changes state inside ctx.step.

    volcano/functions/order-pipeline/index.js

    JavaScript
    const { durable } = require("@volcano.dev/sdk/durable"); exports.handler = durable(async (input, ctx) => { const order = await ctx.step("load", () => loadOrder(input.id)); await ctx.wait("settle", "15m"); return ctx.step("ship", () => ship(order)); });
  2. Deploy it

    Terminal

    Shell
    volcano cloud durable deploy -f order-pipeline
  3. Start a run

    Save the returned execution ID for the check below.

    Terminal

    Shell
    volcano cloud durable start order-pipeline \ --input '{"id":4417}' --name order-4417

Check it works

  • Run volcano cloud durable executions get order-pipeline <execution-id> to inspect the run.
  • Watch the run sit in its wait without a runtime running.
  • Fail a step on purpose. It retries, and earlier steps don’t run again.

Works with

Questions

What is a durable function?

A function that saves step results so a workflow resumes after a crash or wait. One execution can run up to 366 days.

Do durable functions use compute while waiting?

No. A suspended execution adds no compute charge, though each timed wait counts as one operation.

How do I add human approval to an AI agent workflow?

Call ctx.waitForApproval, then branch on the decision. Approve from the dashboard, CLI, API or SDK.

More answers in the docs

It will blow your mind!

Pun intended. Build, deploy & scale on the Volcano platform for free.

Start building