Skip to main content
A workflow is a state machine stored as JSON in .kiwi/workflows/<name>.json. A page joins a workflow through its workflow and state frontmatter fields. These endpoints edit definitions, move pages between states with transition checks, and return the kanban board the web UI renders. See Workflows for the model. Page updates (assign, advance, reorder) go through the write pipeline with an internal If-Match check, so a page edited between the server’s read and write returns 409. Retry the request.

List workflows

Return every workflow definition.
object[]
Valid workflow definitions. See Workflow definition for the shape.
string[]
One message per workflow file that failed to parse or validate. Omitted when every file loaded.

Get a workflow

Return one workflow definition.
string
required
Workflow name (the file name without .json).
Returns 404 if the workflow does not exist. The response is a workflow definition.

Save a workflow

Create or replace a workflow definition. The name in the URL wins over any name in the body.
string
required
Workflow name. Must not contain / or \, or leading or trailing spaces.
object[]
required
At least one state. Names must be unique.
object[]
required
Allowed moves. Every from and to must name a defined state, and terminal states can’t have outbound transitions.
Returns 400 for invalid JSON or a definition that fails validation. The body limit is 1 MB.
string
Always saved.
object
The saved definition.

Workflow definition

string
Workflow name.
object[]
Board columns, in display order.
object[]
Allowed moves.

Delete a workflow

Delete a workflow definition file.
string
required
Workflow name.
Returns 404 if the workflow does not exist. Pages that reference it keep their workflow and state fields but can no longer be advanced.

Assign a page to a workflow

Set a page’s workflow and state frontmatter, either to add it to a workflow or to place it in a column directly. Assignment does not check transitions.
string
required
Markdown page path. Must end in .md.
string
required
Workflow name.
string
required
Target state. Matched case-insensitively and stored with the workflow’s spelling.
integer
Position within the column. Lower values sort first.
string
Commit author. Falls back to the X-Actor header, then system.
Returns 400 for a missing field, a non-markdown path, or an unknown state, and 404 if the workflow or page does not exist.
string
Page path.
string
Workflow name.
string
Stored state name.
string
Git blob hash of the page after the call.
boolean
true when the page already had this workflow and state and no ordinal was given, so nothing was written.

Advance a page

Move a page to another state, enforcing the workflow’s rules. The server also sets modified to the current UTC time and, if the page has a status field that mirrored the old state, updates status too.
string
required
Markdown page path. The page must have workflow and state frontmatter.
string
required
State to move to.
string
Expected workflow. If set and it differs from the page’s workflow, the call fails with 409.
string
Commit author. Falls back to the X-Actor header, then system.
The call returns 409 when:
  • the target state does not exist in the workflow
  • the current state is terminal
  • no transition goes from the current state to the target
  • the target column is at its wip_limit
  • the target is in_progress and the page is blocked (a blocked_by page isn’t finished, or blocked: true)
  • the page changed during the request
It returns 400 when the page has no frontmatter, workflow, or state, and 404 when the page or workflow does not exist.
string
Page path.
string
State before the call.
string
State after the call.
string
Git blob hash of the page after the call.
boolean
true when the page was already in target_state.

Reorder a card

Set a page’s ordinal frontmatter field, which controls its position within its board column.
string
required
Page path.
integer
required
New position. Cards sort by ascending ordinal; cards without one sort last. Leave gaps (the web UI uses steps of 1000) so you can insert between cards.
string
Commit author. Falls back to the X-Actor header, then system.
Returns 404 if the page does not exist.
string
Page path.
integer
Stored ordinal.
string
Git blob hash of the page after the call.
boolean
true when the page already had this ordinal.

Get the kanban board

Return the workflow definition and every markdown page in it, grouped by state.
string
required
Workflow name.
Returns 404 if the workflow does not exist.
object
object
Map from state name to an array of cards. Every state has a key, even when empty. Pages whose state isn’t in the workflow appear under __unmatched__.

MCP equivalents

kiwi_workflow_list, kiwi_workflow_get, kiwi_workflow_save, kiwi_workflow_advance, and kiwi_workflow_board. Assign, reorder, and delete are REST-only.

Workflows concepts

States, transitions, WIP limits, and blocked cards.

Claims

Lease a page before an agent works on it.
Last modified on October 19, 2026