# How a call runs

> The rules the engine follows: where it starts, what runs next, what runs side by side, and how it waits for the caller.

Source: https://voxio.in/docs/workflows-running · voxioagent 2.0.0 · Index: https://voxio.in/docs/llms.txt

## From step to step

1. A call starts at `start_node`.
2. When a step finishes, every step in its `next` starts. `next` can be one name or a list.
3. A Branch picks its own next step from `mappings` instead. If no path matches, it falls back to a `default` path, then to its `next`.
4. A step with no `next` (and no matching path) ends that line of work. When nothing is left running, the agent waits for the caller.

## Steps side by side

When `next` lists several steps, they all start at once. This is how you show the caller's words in the transcript while the AI thinks, or play a quick acknowledgement while a slower model works:

```json
"ask_for_input": {
  "type": "input",
  "parameters": { "input_variables": { "user_input": "str" } },
  "next": ["ack", "main_reply", "transcription"]
}
```

When two or more **AI reply** steps run side by side, the one that starts speaking first is heard first. The others are held, then played in the order they started. Give a held step a `stream_timeout`(seconds) and it's dropped if it's still waiting after that long, so a stale answer is never spoken.

## Waiting for the caller

A **Listen** step pauses its line of the workflow until the caller has finished speaking. The words are saved (normally as `user_input`) and the workflow carries on from the Listen step's `next`. Every turn of a conversation is one pass from Listen round to Listen again.

> **Tip**
>
> How quickly the caller counts as “finished” is set on the flow, not the step. See [Turn-taking](https://voxio.in/docs/turn-taking.md).

## When a step fails

If an AI provider fails or times out, the engine retries once on the next provider (see [Models and failover](https://voxio.in/docs/steps-ai-settings.md#models-and-failover)). If that fails too, the agent says its fallback line. Any other failing step is skipped and logged; the rest of the workflow keeps going.

## Next steps

- [Values and state](https://voxio.in/docs/workflows-values.md): what steps read and write.
- [Patterns](https://voxio.in/docs/workflows-patterns.md): shapes that work well.
