# runStep()

Canonical URL: https://developers.iagenify.com/sdk/ref/workflow/run-step/
Language: en

`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.

Status: changes nothing · 16 minutes · human steps are refused

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

console.log(step.status, step.output, step.credits);
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `stepId` | string | required | Which step. |
| `fromRun` | string |  | Take the upstream outputs from this existing run. |
| `input` | object |  | The run input. Overrides `fromRun`'s. |
| `steps` | object |  | Outputs supplied by hand. **These win over `fromRun`.** |

## Three ways to give it context {#context}

| You have | Use |
| --- | --- |
| A real run that got this far | `fromRun` |
| A run, but you want different input | `fromRun` and `input` |
| Nothing — you are building the step | `steps`, with the shapes you expect |

## Returns {#returns}

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

## It really runs {#real}

> **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 {#human}

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

## Sixteen minutes {#timeout}

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.

- [Workflow steps](/sdk/workflows/steps): The 23 types.
- [run()](/sdk/ref/workflow/run): The whole chain.

```python
step = workflow.run_step(
    "write",
    input={"since": "2026-10-01"},
    steps={"read": {"output": {"result": [{"title": "…"}]}}},
)

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

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