Steps
Checkpointed step execution in Stepflow
Steps
Steps are the building blocks of workflows. Each step is automatically checkpointed, meaning it will never re-execute on retry.
Basic Step
const result = await step.run("step-name", async () => {
// Your logic here
return { data: "result" };
});Parallel Steps
Execute multiple steps in parallel:
const [a, b, c] = await step.parallel("parallel-steps", [
() => fetchA(),
() => fetchB(),
() => fetchC(),
]);Step Options
await step.run("fetch-data", async () => {
return await fetchFromAPI();
}, {
timeout: "30s",
retries: 2,
});