# runStep()

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

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

Corre un passo da sola, con il contesto che scelse. Nessuna run è creata e nessuna run è cambiata — è la via per tentar un passo prima di implementar una catena.

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 | obrigatório | - Quale passo. |
| `fromRun` | string |  | Prende le sortit a monte da esta run existente. |
| `input` | object |  | L'input di run. Overrides `fromRun`'s. |
| `steps` | object |  | Produttori fornese a mano. **Questo vince `fromRun`.** |

## Tres modi per dar il context {#context}

| Tu hai | Us |
| --- | --- |
| Un vero run che ha arrivât a tal lunt | `fromRun` |
| Una run, ma tu vuoi input differente | `fromRun` e `input` |
| Nada — tu costruis il step | `steps`, con le forme che si aspetta |

## Retorno {#returns}

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

## Corre davvero {#real}

> **Un pas cun efìcit hat esefècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècècèeèe**
>
> Un scriva di stoccatura scrie, un deploys deploys, un pas de mail envia. Solo il record di run è intoccat. Testa i pasi che calcule, non quelli che agis — o li indica a algo desechente.

## Un passo umano non s'impossìa zarpar {#human}

Risponde `step_not_executable` — non c'è nulla da executare, solo qualcosa da approvare. Un identificator sconosciut risponde `step_not_found`.

## Sessixi minuti {#timeout}

Un agente step o un HTTP Il passo può durar molto tempo, quindi questo appello eleva il tecto usual del cliente ben al di sopra di esso, invece di abbandonare il lavoro che ancora sta in funzione.

- [Etapas do fluxo de trabalho](/pt/sdk/workflows/steps): Os 23 tipos.
- [run()](/pt/sdk/ref/workflow/run): L'intera catena.

```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": [],
}
```
