On this page
Sommatic Docs
Open portal

Task lifecycle

The statuses of a task, the transitions that move it between them and what each transition checks or changes, including the output validation on complete.

View as Markdown
Open in

A task moves through a small state machine. Every move is a named transition: you never set the status by hand, you ask for a transition and Sommatic AI checks that it is allowed from the current status.

Statuses

StatusMeaning
queuedCreated, waiting for an assignee or a claim.
assignedAssigned to a user or a group.
claimedA specific person took ownership.
in_progressThe person is working on it.
completedThe output was provided and validated.
rejectedConcluded as rejected.
invalidatedNo longer applicable (cancelled or replaced).
expiredIts deadline passed.

Transitions

TransitionFromTo
assignqueuedassigned (claimed when the assignee is a user)
claimqueued, assignedclaimed
startclaimedin_progress
completequeued, assigned, claimed, in_progresscompleted
rejectqueued, assigned, claimed, in_progressrejected
invalidatequeued, assigned, claimed, in_progressinvalidated
expirequeued, assigned, claimed, in_progressexpired
restartcompleted, rejected, invalidatedqueued

A transition that is not allowed from the current status fails with Transition '<name>' not allowed from status '<status>'. GET /work-management/task/transitions returns this table.

What each transition does

  • assign sets assignee from the payload. When the assignee is a user, the task is also claimed by that user and goes straight to claimed.
  • claim sets ownership (is_claimed, claimed_by, claimed_at) and, when claimed_by is given, makes that person the assignee.
  • complete validates outputs against required_output.schema and saves them. Every field listed in required must be present and not empty, or the transition fails with Cannot complete task: missing required outputs: <fields>.
  • reject saves outputs. Put the reason there (for example outputs.reason), which the portal shows on rejected tasks.
  • complete and reject on a task nobody claimed: when the payload carries claimed_by, that person becomes the claimant and the assignee.
  • restart returns the task to queued, clears its ownership and empties its outputs.

A task created with a user assignee starts in claimed, so it can be worked right away.

Call a transition

PATCH /work-management/task/transition/ with the task id, the transition_name and an optional payload.

Shell
curl -X PATCH https://api.sommatic.ai/work-management/task/transition/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<task-id>",
    "transition_name": "complete",
    "payload": {
      "outputs": { "decision": "approved", "reason": "Within policy." }
    }
  }'
Shell
curl -X PATCH https://api.sommatic.ai/work-management/task/transition/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<task-id>",
    "transition_name": "claim",
    "payload": {
      "claimed_by": { "id": "<user-identity>", "name": "Ana Ruiz" }
    }
  }'
Shell
curl -X PATCH https://api.sommatic.ai/work-management/task/transition/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<task-id>",
    "transition_name": "assign",
    "payload": {
      "assignee": { "assignee_type": "group", "group": { "id": "<group-id>", "name": "Supervisors" } }
    }
  }'

The answer is the updated task in the standard envelope.

Read tasks

GET /work-management/task/:queryselector with:

SelectorReturns
idOne task (?search=<task-id>).
inboxThe tasks of a person.
all, listTasks with pagination and filters.
statuses, types, priorities, transitionsThe catalogs on this page.

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs