> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Durable execution

> How durable runs, events, waiting checkpoints, resume, and cancellation work.

Durable execution stores the work associated with a conversation or project.

It tracks run identity, lifecycle, replayable output, waiting checkpoints, resume signals, and cancellation.

```mermaid theme={null}
stateDiagram-v2
  [*] --> pending
  pending --> running
  running --> waiting
  waiting --> running
  running --> completed
  running --> failed
  running --> cancelled
  waiting --> cancelled
  completed --> [*]
  failed --> [*]
  cancelled --> [*]
```

## What it owns

| Data               | Meaning                                                                                             |
| ------------------ | --------------------------------------------------------------------------------------------------- |
| Canonical run      | Shared execution record with run ID, kind, owner, parent run, root run, status, and waiting reason. |
| Agent run          | Conversation-owned execution for chat and project-agent work.                                       |
| Workflow run       | Project-owned execution for a workflow target.                                                      |
| Job run            | Project-owned execution for background work.                                                        |
| Run event          | Ordered payload for text, tools, reasoning, custom data, and terminal updates.                      |
| Waiting checkpoint | Stored state for paused work.                                                                       |
| Resume signal      | Tool result, approval, event, or input response that moves a waiting run forward.                   |
| Completion         | Terminal status plus usage, result, and error metadata.                                             |

## Run types

| Run type     | Owner        | Started by                         | Represents                                  |
| ------------ | ------------ | ---------------------------------- | ------------------------------------------- |
| Agent run    | Conversation | Chat request or agent trigger.     | Agent execution attached to a conversation. |
| Workflow run | Project      | Workflow start request.            | Workflow target and step graph state.       |
| Job run      | Project      | Job start request or cron trigger. | Background execution of a target.           |

## Workflows, tasks, jobs, and cron jobs

These concepts share durable run infrastructure, but they are different resources.

| Concept             | Meaning                                                |
| ------------------- | ------------------------------------------------------ |
| Workflow definition | Multi-step automation definition.                      |
| Workflow run        | Durable execution of a workflow.                       |
| Task definition     | Developer-defined background work target.              |
| Job run             | Durable execution of a target, including task targets. |
| Cron job            | Schedule that creates job runs.                        |

See [AG-UI event reference](/cloud/conversation-api/streaming-events#ag-ui-event-reference) for event types.
