# Run history

Every run keeps the record of what it did: each step, each model reply, each tool call and each answer, in order. Read it as a snapshot or follow it live.

List: Your runs → Run: One run → Events: Its events

Runs are read by their owner only: the signed-in person or the API key that started them.

## Endpoints

| Endpoint | Returns |
| --- | --- |
| [`GET /workflow/runs`](/docs/workflows/api/list-runs/) | A page of your runs, most recently updated first, as `{ count, items }`: each with its id, title and updatedAt. |
| `GET /workflow/runs/{runId}` | The run, with its turn tree and its turns. Asked for as an event stream, the run and then its events. |
| `GET /workflow/runs/{runId}/turns/{turnId}` | The turns from the first one down to the named turn: the history that turn ran on. |

A run read leaves out turns an edit replaced (`Dead`); they stay in the run’s events.

## Replaying and following events

Ask for a run with `Accept: text/event-stream` and the response sends a `run` frame with the run and its turns, then every event the run recorded, then each new event as it is recorded, until you disconnect. Each recorded event carries an SSE `id`: to reconnect without gaps, send the last one you received as `?after=` and the replay starts with the event after it. The id is opaque, so compare it but never parse or order it. Live model text (`ticker.message`) is never recorded and carries no id.

```bash
curl -N "https://api.momor.ai/workflow/runs/$RUN_ID" \
  -H "Authorization: Bearer $MOMOR_API_KEY" \
  -H "Accept: text/event-stream"
```

```text
id: …
event: tool.succeeded
data: {"event":"tool.succeeded","path":"pay/…","turnId":"…","executionId":null,"invocationId":"…","waitId":null,"createdAt":"2026-10-22T09:14:03Z","payload":{…}}
```

`path` says where in the workflow the event happened, from the workflow down through containers and called workflows to the operation, in lowercase. Add `?events=` once per event name to receive only those.

## Events worth knowing

| Event | Recorded when |
| --- | --- |
| `run.created` | The run was started. |
| `turn.started` | A turn opened, with its request and the version it pinned. |
| `model.requested / model.replied` | A model was asked, and answered: the reply, the model that answered, usage, and every provider attempt. |
| `tool.called / tool.succeeded / tool.failed` | A tool was called, with its arguments, and what came back. |
| `workflow.called / workflow.succeeded` | Another workflow was run inside the turn. |
| `branch.taken` | Which case a branch took and what each condition returned. |
| `wait.<class>.raised / .resolved` | A question or other wait was raised, and answered. |
| `advisory.raised` | A notice the model raised for the person. |
| `step.completed` | A step finished with its value. |
| `result.committed` | The turn’s result. |
| `turn.completed / turn.failed / turn.cancelled` | How the turn ended. |
| `hook.completed / hook.failed` | A hook reported. |
| `turn.finalized` | Everything the ending owed has reported. |

> **How long history is kept**
> A permanent run keeps its events until it is deleted with `DELETE /workflow/runs/{runId}`. An ephemeral run, with all its events, is deleted after 30 minutes without activity by default. See [Runs and recovery](/docs/workflows/runs/).
