Workflow

runStep()

workflow.runStep(stepId, { fromRun?, input?, steps? }) → Promise<Step>

Runs one step alone, with context you choose. No run is created and no run is changed — it is the way to try a step before deploying a chain.

changes nothing16 minuteshuman steps are refused
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const step = await workflow.runStep("write", {
  input: { since: "2026-10-01" },
  steps: { read: { output: { result: [{ title: "…" }] } } },
});

console.log(step.status, step.output, step.credits);
step = workflow.run_step(
    "write",
    input={"since": "2026-10-01"},
    steps={"read": {"output": {"result": [{"title": "…"}]}}},
)

print(step["status"], step["output"], step["credits"])
stepIdstringrequired

Which step.

fromRunstring

Take the upstream outputs from this existing run.

inputobject

The run input. Overrides fromRun's.

stepsobject

Outputs supplied by hand. These win over fromRun.

Three ways to give it context

You haveUse
A real run that got this farfromRun
A run, but you want different inputfromRun and input
Nothing — you are building the stepsteps, with the shapes you expect

Returns

{
  id: "write", type: "model.generate", status: "succeeded",
  output: { text: "…", usage: { credits: 4 } },
  credits: 4,
  startedAt: "…", endedAt: "…",
  error: "", warnings: []
}
{
    "id": "write", "type": "model.generate", "status": "succeeded",
    "output": {"text": "…", "usage": {"credits": 4}},
    "credits": 4,
    "startedAt": "…", "endedAt": "…",
    "error": "", "warnings": [],
}

It really runs

A step with an effect has that effect

A storage write writes, a deploy deploys, a mail step sends. Only the run record is untouched. Test the steps that compute, not the ones that act — or point them at something disposable.

A human step cannot be run

It answers step_not_executable — there is nothing to execute, only something to approve. An unknown identifier answers step_not_found.

Sixteen minutes

An agent step or an HTTP step can take a long time, so this call raises the client's usual ceiling well above it rather than abandoning work that is still running.