Configuration-driven orchestration for coding-agent pipelines.
A workflow definition contains ordered steps. Each step is one of:
| Kind | Behavior |
|---|---|
agent |
Runs one configured command and stores output. |
parallel |
Marks multiple agent participants as dispatched for this stage. |
approval |
Pauses the run until explicit human approval. |
A run records definition, status, current stage and variables. Step output is stored per run, stage and agent.
| Status | Meaning |
|---|---|
running |
Non-approval stage is active. |
waiting_approval |
Human approval is required. |
completed |
Final stage completed. |
failed |
Command stage returned failure. |
cancelled |
User cancelled an active run. |
{
"name": "delivery",
"steps": [
{
"name": "plan",
"kind": "agent",
"agents": ["planner"],
"command": "true"
},
{
"name": "implement",
"kind": "parallel",
"agents": ["backend", "frontend"]
},
{
"name": "test",
"kind": "agent",
"agents": ["ci"],
"command": "cargo test"
},
{
"name": "review",
"kind": "agent",
"agents": ["reviewer"],
"command": "true"
},
{
"name": "approve",
"kind": "approval"
}
]
}
The engine executes stages in order. It advances automatically through non-approval stages and stops at the first approval. Approval resumes later stages.
POST /workflows
Content-Type: application/json
X-Orbynode-CSRF: <csrf>
{
"name": "delivery",
"steps": [
{"name":"test","kind":"agent","agents":["ci"],"command":"true"},
{"name":"approve","kind":"approval"}
]
}
Definitions are identified by normalized name and upserted.
GET /workflows
GET /workflows/{name}
POST /workflows/{name}/start
Content-Type: application/json
X-Orbynode-CSRF: <csrf>
{"variables":{"project":"app"}}
GET /workflow-runs/latest
GET /workflow-runs/{id}
POST /workflow-runs/{id}/advance
X-Orbynode-CSRF: <csrf>
POST /workflow-runs/{id}/approve
X-Orbynode-CSRF: <csrf>
Approval works only while status is waiting_approval.
POST /workflow-runs/{id}/cancel
X-Orbynode-CSRF: <csrf>
Cancellation works only for running or waiting_approval runs.
Workflow changes publish to the workflows stream as critical events. UI state
should derive from snapshots and workflow.updated events, not polling.
Tables:
| Table | Purpose |
|---|---|
workflow_definitions |
Canonical definition and JSON config. |
workflow_runs |
Run status, stage and variables. |
workflow_steps |
Per-stage agent status and output. |
All workflow routes require authentication and CSRF. Authorization is server-side. Treat commands as host execution capability; only trusted roles should manage definitions containing commands.