---
title: "Workflows"
description: "Workflows are sequential pipelines where each step's output feeds into the next step's input. Unlike sagas, workflows don't have compensation — they're designed for data processing pipelines. Output: Feature Workflow Sag"
resource: https://www.aiagents.nexus/docs/orchestration/workflows
generated: { by: "process:nexus-agent-assets", at: 2026-09-07T09:13:03Z }
status: stable
---

# Workflows

Workflows are sequential pipelines where each step's output feeds into the next step's input. Unlike sagas, workflows don't have compensation — they're designed for data processing pipelines.

## Creating a Workflow

```bash
# Create the workflow
naos workflow create data-pipeline

# Add steps in order
naos workflow add-step data-pipeline fetcher
naos workflow add-step data-pipeline transformer
naos workflow add-step data-pipeline loader
```

## Running a Workflow

```bash
naos workflow run data-pipeline
```

Output:

```
[workflow] data-pipeline starting
[step 1/3] fetcher       ✓ completed (2.1s) → 1.2MB
[step 2/3] transformer   ✓ completed (4.3s) → 0.8MB
[step 3/3] loader        ✓ completed (1.5s) → done
[workflow] data-pipeline completed (7.9s)
```

## Workflow vs Saga

| Feature | Workflow | Saga |
|---|---|---|
| **Purpose** | Data pipelines | Transactions |
| **Data flow** | Output → Input chaining | Independent steps |
| **On failure** | Stops at failed step | Compensates all previous |
| **Use case** | ETL, processing | Orders, bookings |

## Viewing Workflow Status

```bash
naos workflow status data-pipeline
```

```
WORKFLOW: data-pipeline
Steps: 3 | Last Run: completed | Duration: 7.9s

PIPELINE:
  [1] fetcher       → [2] transformer → [3] loader
```

## Workflow History

```bash
naos workflow history data-pipeline
```
