Skip to content

Database tables for pipelines and runs

This page lists the columns of pipelines, pipeline_versions, runs and run_stages. Database tables says how to read the columns.

A pipeline of a team, which is a file in a repo. It points at its current version.

Column Type Notes
id uuid key
team_id uuid references teams
repo_id uuid optional; references repos
name text
path text
created_at timestamptz default now()
description text default ''
current_version_id uuid optional; references pipeline_versions
conversation_id uuid optional; references conversations
shepherd_id uuid optional; references people
cron_checked_at timestamptz optional

Unique (team_id, name).

One version of a pipeline, named by git’s id for the file. A version whose file fails to load keeps its error.

Column Type Notes
id uuid key
pipeline_id uuid references pipelines
git_sha text
created_at timestamptz default now()
source text default ''
error text optional

Unique (pipeline_id, git_sha).

One run of a pipeline version for a task. A replay names the run it replays in replay_of.

Column Type Notes
id uuid key
team_id uuid references teams
pipeline_version_id uuid references pipeline_versions
task_id uuid references tasks
trigger text
trigger_payload jsonb default '{}'
status text default 'queued'; one of cancelled, done, failed, paused, queued, running, waiting
stage text optional
metrics jsonb default '{}'
cost_usd numeric(12,4) optional
started_at timestamptz optional
ended_at timestamptz optional
created_at timestamptz default now()
note text optional
replay_of uuid optional; references runs
proposal_id uuid optional; references proposals
playbook text optional
paused_at timestamptz optional
paused_by uuid optional; references people
pause_note text optional

Unique (team_id, ((trigger_payload ->> 'once'::text))) where (trigger_payload ? 'once'). Check ((status = 'paused') = (paused_at IS NOT NULL)).

One row for each try at a stage of a run. A stage is an agent’s turn, a check run in the workspace, an action on the forge, or a gate that waits on a person.

Column Type Notes
id uuid key
team_id uuid references teams
run_id uuid references runs
n integer
stage text
attempt integer
kind text one of action, agent, check, confirm, gate, handoff, review, route, suite, verify
status text default 'pending'; one of pending, running, waiting, done, failed, cancelled
session_id uuid optional; references sessions
from_seq bigint optional
command_id uuid optional; references commands
ask_id uuid optional; references asks
outcome text optional
summary text optional
data jsonb default '{}'
started_at timestamptz optional
ended_at timestamptz optional
created_at timestamptz default now()

Unique (run_id, n).