Build your first pipeline
What you will build
Section titled “What you will build”By the end of this tutorial, you will have:
- A pipeline template with three steps: trigger → agent task → bash verification
- A manual run of that pipeline
- An understanding of how pipelines connect agents, scripts, and conditional logic
Prerequisites: Dispatch your first agent completed.
What are pipelines?
Section titled “What are pipelines?”Pipelines are DAG-based workflows that chain steps together. Each step has a kind (prompt an agent, run a script, dispatch reviewers, route conditionally, join parallel branches) and can pass data to downstream steps via state.
Templates define the graph; runs are executions. Triggers can auto-start pipelines on domain events or schedules.
For background, see Pipelines and automation.
Step 1: Create a pipeline template
Section titled “Step 1: Create a pipeline template”- Navigate to Pipelines in the sidebar
- Click Create template
- Name it “code-quality-check”
- Add a description: “Run code quality checks on a branch”
The template editor opens with a blank canvas.
Step 2: Add a trigger step
Section titled “Step 2: Add a trigger step”Every pipeline starts with a Trigger step. This is the entry point.
- The canvas already has a trigger node. Click it.
- Leave the default configuration — it accepts manual runs.
Step 3: Add an agent step
Section titled “Step 3: Add an agent step”- Click Add step on the canvas
- Select Prompt agent as the step kind
- Configure it:
- Agent: pick your coder agent
- Prompt: “Review the code in the current branch for common quality issues. List any problems you find.”
- Mode: chat
- Connect the trigger step to this agent step (drag from trigger’s output to agent’s input)
Step 4: Add a bash script step
Section titled “Step 4: Add a bash script step”- Add another step, kind Bash script
- Configure it:
- Script:
echo "Quality check complete" - This is a simple verification step — in practice you’d run linting or test commands
- Script:
- Connect the agent step to this script step
Your pipeline now has three connected steps: trigger → agent → script.
Step 5: Run the pipeline
Section titled “Step 5: Run the pipeline”- Click Run pipeline in the header
- If the template declares inputs, fill them in (our template has none)
- Click Start run
The pipeline engine:
- Creates a
PipelineRunrecord - Starts the trigger step
- When the trigger completes, schedules the agent step
- The agent dispatches, works, and completes
- When the agent step completes, schedules the script step
- The script runs and completes
- The run status moves to Completed
Watch the run progress in the pipeline run detail view. Each step shows its status, input, and output.
Step 6: Inspect the results
Section titled “Step 6: Inspect the results”Click any step in the run to see:
- Input: the data passed into the step
- Output: what the step produced
- Status: completed, failed, or skipped
- Duration: how long it took
The agent step’s output contains the agent’s response. The script step’s output contains the stdout.
You created a three-step pipeline, ran it manually, and inspected the results. Pipelines can be much more complex — conditional routing, parallel branches, join nodes, error handling — but the basic pattern is the same: steps connected in a DAG, passing data through shared state.
Next steps:
- Set up pipeline triggers to auto-start pipelines on events
- Pipelines and automation for a deeper conceptual understanding
- Pipeline step kinds for all available step types