---
question: How do I run a pipeline from Nexus, Python or HTTP?
kind: task
via_web: available
via_cli: na
via_python: available
via_api: available
via_config: na
ref_web: System › Jobs › Run now
ref_python: get_workflow / Pipeline.run
ref_api: POST /api/workflows/{module_id}/{name}/runs
prereq: You need a pipeline whose `run` is filled in, in a module that runs. See [Create a pipeline](/capabilities/build/knowledge-graph/creating-a-pipeline).
next:
  - /capabilities/build/pipelines/schedule-a-pipeline
  - /capabilities/build/pipelines/monitor-runs
  - /capabilities/build/workflows/monitor-and-cancel-a-run
---

# Run a pipeline

Running a pipeline awaits its `run(parameters)`. It returns an `rdflib.Graph`, and the usual class also inserts that graph into the triple store before returning. Every tab below ends in the same call; they differ in where it runs, and in whether the run is recorded:

- **A durable run** starts the published workflow `pipeline.<slug>` by name. One replica of the module runs it, once unless the class sets `max_attempts`, and the run shows in System › Jobs with its input and output. The output is the graph as `{"format": "text/turtle", "triples": n, "data": "<turtle>"}`, without `data` above 60 KiB.
- **A direct call** (the module's own code, an agent tool) awaits `run` in the module's process and records nothing.

## Web UI

### Open the pipeline

Open **System** from the Nexus sidebar, then the **Jobs** tab. Pick **Workflows** in the kind filter: each pipeline shows under its published name, such as `pipeline.items_pipeline`. Click it.

![System app on the Jobs tab, filtered](/abi/Screenshot_System_Jobs.png)

*System › Jobs: jobs and workflows, with their schedules and recent runs.*

### Start it

Click **Run now**. The form is built from the parameters model; **JSON** switches to an editor. Click **Run**. The start is written to the audit log, and the input is checked against the parameters model before anything is sent.

### Follow the run

The run shows in **Runs**. Its **Steps** tab has the one step, `run`, and its **Result** tab the triple count and the Turtle. See [Monitor runs](/capabilities/build/pipelines/monitor-runs?via=web).

The System app is for platform super admins only.

## CLI

Not applicable. No `abi` command starts a pipeline. From a terminal, call the REST API with `curl`, as in the REST API tab.

## Python

### Start a durable run

Start `pipeline.<slug>` by name, from the module itself or from another one:

```python
items = self.get_workflow("pipeline.items_pipeline")      # the module's own pipeline
out = await items.run({"filter": "open"})
print(out["triples"])

run = await items.start({"filter": "open"}, idempotency_key="items-open-2026-10-31")
```

From another module, declare it in `ModuleDependencies(modules=(...))`, then get the proxy through discovery:

```python
catalog = self.engine.modules["catalog"]
items = await catalog.get_workflow("pipeline.items_pipeline")
out = await items.run({"filter": "open"})
graph = Graph().parse(data=out["data"], format="turtle")
```

A script outside any module uses an `ABIClient`: `ABIClient(url, token).get_workflow("catalog", "pipeline.items_pipeline", project="my_project")`. It checks nothing before the start: a run of a workflow no module declares stays `QUEUED`. Pass `project=` the project's discovery project, `nats.discovery.project` in `config.yaml` (the module runs with it as `ABI_DISCOVERY_PROJECT`): it defaults to `"default"`, and a run sent to another project stays `QUEUED`. `run.status()`, `run.steps()` and `run.cancel()` are on [Monitor and cancel a run](/capabilities/build/workflows/monitor-and-cancel-a-run?via=python).

### Or call run directly

Inside the module, the built instance runs in process, with nothing recorded:

```python
from catalog.pipelines.ItemsPipeline import ItemsPipelineParameters

pipeline = self.get_pipeline_instance("items_pipeline")
graph = await pipeline.run(ItemsPipelineParameters(filter="open"))
```

The module builds its pipelines after `on_initialized`. To use one inside `on_initialized`, call `await self.build_processes()` first.

### Give it to an agent

The class comes with one tool: `self.get_pipeline_instance("items_pipeline").as_tools()`, after `await self.build_processes()`. A caller in another module gets one from the proxy: `items.as_tools()`. See [Give it tools](/capabilities/build/agents/give-it-tools).

## REST API

### Find the pipeline

`GET /api/workflows` on Nexus lists every published workflow, pipelines included, with the `module_id`, `name`, input and output schemas and triggers of each:

```bash
curl -s "http://localhost:9879/api/workflows" \
  -H "Authorization: Bearer $ABI_API_KEY"
```

With `abi dev up`, use the `api` port that `abi dev ports` prints. The kernel REST API does not mount a module's pipelines: start them here.

### Start a run

`POST /api/workflows/{module_id}/{name}/runs` starts the pipeline as a recorded run. The body is the parameters model as JSON (`{}` when it has no fields):

```bash
curl -s -X POST "http://localhost:9879/api/workflows/catalog/pipeline.items_pipeline/runs?wait=60" \
  -H "Authorization: Bearer $ABI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter": "open"}'
```

With `?wait` (0 to 120 seconds) and a run that ends in time, the answer is `200` with its `status`, `result` and `steps`; without it, `202` with the run, `QUEUED`. The key is the instance's `ABI_API_KEY` (or a super admin's session), and the start is audited. The options (`Idempotency-Key`, 422 on a refused input) are on [Run a workflow](/capabilities/build/workflows/run-a-workflow?via=api).

### Read the result

The `result` is the graph envelope. To rebuild the graph: `Graph().parse(data=result["data"], format="turtle")`. A run that has not ended yet is read with `GET /api/workflows/{module_id}/runs/{run_id}`: see [Monitor runs](/capabilities/build/pipelines/monitor-runs?via=api).

## Config

Not applicable. `config.yaml` has no key that runs a pipeline. To run one on a schedule, see [Schedule a pipeline](/capabilities/build/pipelines/schedule-a-pipeline).
