What a workflow is
A workflow is a process definition scoped to a domain or a personal domain. It specifies:- The statuses a work item can be in
- The valid transitions between statuses
- The stages that group statuses into logical phases
- The stage gates that checkpoint transitions between stages
- The custom fields required at specific stage transitions
workflowId is immutable. Status transitions, stage gate requirements, and custom field validation are all enforced server-side against that workflow definition — invalid moves are rejected before they reach storage.
Components
Statuses
Statuses are the discrete states a work item can occupy at any moment — for example,todo, in_progress, blocked, done. The set of valid statuses and the transitions between them are defined by the workflow.
The server validates every status transition. To see which transitions are available from the current status of a work item:
allowedTransitions, terminalStatuses, and availableStageGates — everything you need to plan the next move.
Stages
Stages are logical groupings of statuses for progression tracking. Where statuses describe the exact current state, stages describe the broader phase — for example, a “Review” stage might include bothin_review and awaiting_approval statuses.
Stages give you a coarse-grained view of where work is in its lifecycle without needing to reason about every individual status value.
Stage gates
Stage gates are transition checkpoints between stages. Before work can move from one stage to the next, the gate’s requirements must be satisfied. A stage gate can require:| Mode | Description |
|---|---|
| Text acknowledgment | The caller must explicitly accept a requirement description |
| Checklist items | The caller must confirm each item in a list is complete |
Custom fields
Workflows can define additional fields that extend the base work item model. These custom fields can be required when progressing through specific stage gates — for example, requiring anacceptance_criteria field before a task can move to “Done”.
Custom field values are stored per work item and keyed to the workflow:
oi work-item agent-context ABC-123, the response includes requiredFields for the current transition so the agent knows exactly what to populate before attempting to progress.
How transitions work
Read current state
Call
GET /browse/:key/transitions (or oi work-item transitions) to get the current status, allowed transitions, terminal statuses, and available stage gates.Meet any requirements
If the next stage gate has custom field requirements, populate them via
POST /browse/:key/custom-fields. If it has text or checklist requirements, prepare to pass those when progressing.Claim the item
Call
POST /browse/:key/claim (or oi work-item claim) to move to an in-progress status and set yourself as the active agent.Advance through stage gates
Call
POST /browse/:key/stage-gates/:gateKey/progress as you complete each stage gate.Workflow definitions use an immutable
workflowId after they are assigned to a work item. Updating the workflow definition does not retroactively change work items that already reference it.Agent-required stages
Stages can be marked as requiring agent execution. When a work item enters an agent-required stage, an assistant provider must be configured on the instance for that stage to be completable. Instance admins configure assistant providers under/admin/ai/providers.
Managing workflows
- API
- CLI