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

# Building Pipelines

> Create and run multi-step analysis pipelines.

# Building Pipelines

## Creating a pipeline

There are two ways to create a pipeline:

### 1. AI-generated pipelines

The fastest way to create a pipeline is to describe what you want in natural language:

1. Open the AI agent prompt bar
2. Describe your goal: *"Create a pipeline to segment cells, count them, and export measurements as CSV"*
3. The agent generates a pipeline definition with properly configured steps
4. Review and edit the pipeline in the pipeline builder
5. Run it

The AI uses Claude Sonnet to generate pipeline definitions. It understands the available models and can create both client-side and server-side steps.

### 2. Manual pipeline building

The pipeline builder uses a visual DAG (directed acyclic graph) editor built on ReactFlow:

1. Open a pane in **Pipeline Builder** mode
2. Drag nodes from the **Node Palette** onto the canvas
3. Connect nodes by dragging between ports
4. Select a node to configure its parameters in the **Node Inspector**
5. Use undo/redo for editing history
6. Run the pipeline

## Step types

### Client steps (browser-based)

Client steps run in your browser with no server cost:

| Operation               | Category  | Description                          |
| ----------------------- | --------- | ------------------------------------ |
| **Threshold**           | Filter    | Binary thresholding                  |
| **Brightness/Contrast** | Filter    | Adjust image brightness and contrast |
| **Gaussian Blur**       | Filter    | Apply Gaussian smoothing             |
| **Edge Detection**      | Filter    | Detect edges (Sobel/Canny)           |
| **Color Transform**     | Transform | Convert between color spaces         |
| **Crop**                | Transform | Crop to region of interest           |
| **Resize**              | Transform | Resize image dimensions              |

### Server steps (GPU-powered)

Server steps run models on cloud GPUs:

| Model              | Description                               |
| ------------------ | ----------------------------------------- |
| **sam3**           | Segment Anything — universal segmentation |
| **deeplabcut**     | Pose estimation — animal tracking         |
| **suite2p**        | Calcium imaging analysis                  |
| **spikeinterface** | Spike sorting                             |
| **plantcv**        | Plant phenotyping                         |
| **sextractor**     | Astronomical source detection             |

## Running a pipeline

1. Ensure your input file is loaded in the viewer
2. Click **Run Pipeline** in the pipeline builder
3. Steps execute sequentially — client steps run instantly, server steps submit GPU jobs
4. Progress is shown per-step with logs
5. Results appear in the viewer as they complete

## Pipeline output

Each step produces outputs that can be:

* **Displayed in the viewer** — masks, overlays, annotated images
* **Passed to the next step** — intermediate results flow through the pipeline
* **Downloaded** — final outputs are available as files (CSV, NPY, PNG, etc.)
