Tasks
About 973 wordsAbout 3 min
Generated from
docs/.vuepress/openapi.json. Refresh withnpm run gen:api. Back to overview.
GET /api/v1/tasks — Index Task
Tags: Tasks
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/tasks — Store Task
Tags: Tasks
Request body
application/json — required
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | yes | User prompt. |
agent_id | integer | yes | Agent id. |
max_steps | integer | null | no | Override the agent’s default step cap. |
parent_task_id | integer | null | no | Set to continue a prior task in the same chat. |
media_ids | array of string (uuid) | no | Media Archive UUIDs to attach to the user turn. Image attachments require a vision-capable LLM (HTTP 400 MEDIA_CAPABILITY_MISMATCH otherwise). |
effort | string | null | no | The reasoning effort for this message. Omit it and the agent’s default applies, then the LLM configuration’s default, then the model default; an empty string asks for the model default. A level the agent’s LLM configuration does not offer is refused with 422 EFFORT_LEVEL_UNSUPPORTED. The levels are listed by GET /api/v1/agents/{id}/effort, GET /api/v1/agent-api/effort, GET /api/v1/group-api/agents/{agentId}/effort and GET /api/v1/global-api/agents/{agentId}/effort. |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
GET /api/v1/tasks/{taskId} — Show Task
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
DELETE /api/v1/tasks/{taskId} — Destroy Task
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/tasks/{taskId}/abort — Abort Task
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | |
taskId | string | yes |
Responses
| Status | Description |
|---|---|
200 | JSON envelope: {data: {task: ...}} with status ABORTED. |
404 | NOT_FOUND — task is not owned by the calling user. |
409 | INVALID_STATE — task is terminal or already-paused. |
POST /api/v1/tasks/{taskId}/abort-sub-agent — Abort sub-agent and cascade-up
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | |
taskId | string | yes |
Responses
| Status | Description |
|---|---|
200 | JSON envelope: {data: {task: ...}} with status ABORTED. |
404 | NOT_FOUND — task is not owned by the calling user. |
409 | INVALID_STATE — task is terminal or already-paused. |
POST /api/v1/tasks/{taskId}/answer — Answer pending question batch
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | |
taskId | string | yes |
Request body
application/json — required
| Field | Type | Required | Description |
|---|---|---|---|
tool_call_id | string | yes | |
answers | array of object | yes | |
answers[].header | string | yes | |
answers[].selections | array of string | yes | |
answers[].free_text | string | null | no |
Responses
| Status | Description |
|---|---|
200 | JSON envelope: {data: {task: ...}} — status flips to QUEUED (or stays AWAITING_INPUT if more batches are still pending). |
404 | NOT_FOUND — task is not owned by the calling user. |
422 | VALIDATION_ERROR — malformed body or unknown header/selection. |
POST /api/v1/tasks/{taskId}/approve — Approve Task
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes |
Request body
application/json — required
| Field | Type | Required | Description |
|---|---|---|---|
decisions | array of object | yes | At least 1 item. |
decisions[].provider_call_id | string | yes | |
decisions[].decision | string | yes | One of approve, reject. |
decisions[].arguments | object | no | Required when decision is approve. |
decisions[].reason | string | no | Optional when decision is reject. |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/tasks/{taskId}/compact — Compact Task History
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | |
taskId | string | yes |
Responses
| Status | Description |
|---|---|
200 | JSON envelope: {data: {task: ..., compacted: bool}}. compacted is false when the history was too short to summarise. |
404 | NOT_FOUND — task is not owned by the calling user. |
409 | INVALID_STATE — the task is not in a state that can be compacted. |
429 | USAGE_LIMIT_REACHED — the usage limit was reached, so no summary was requested. |
500 | COMPACTION_FAILED — the model returned no summary. The history is left unchanged. |
POST /api/v1/tasks/{taskId}/continue — Continue Task
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes |
Request body
application/json — required
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | yes | Follow-up prompt. |
additional_steps | integer | null | no | Step budget for this continuation (defaults to the task’s remaining budget). |
media_ids | array of string (uuid) | no | Media Archive UUIDs to attach to the follow-up turn. Image attachments require a vision-capable LLM (HTTP 400 MEDIA_CAPABILITY_MISMATCH otherwise). |
effort | string | null | no | The reasoning effort for this message. Omit it and the agent’s default applies, then the LLM configuration’s default, then the model default; an empty string asks for the model default. A level the agent’s LLM configuration does not offer is refused with 422 EFFORT_LEVEL_UNSUPPORTED. The levels are listed by GET /api/v1/agents/{id}/effort, GET /api/v1/agent-api/effort, GET /api/v1/group-api/agents/{agentId}/effort and GET /api/v1/global-api/agents/{agentId}/effort. |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/tasks/{taskId}/reject — Reject Task
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/tasks/{taskId}/retry — Retry Task
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
DELETE /api/v1/tasks/{taskId}/retry-chain — CancelRetryChain RetryChain
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/tasks/{taskId}/tick — Tick a task (client-worker mode only)
Tags: Tasks
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | yes | |
taskId | string | yes |
Responses
| Status | Description |
|---|---|
200 | JSON envelope: {data: {task: ...}} with the post-tick task resource. |
404 | NOT_FOUND — server mode is active or task is not owned by the calling user. |
409 | INVALID_STATE — task is terminal, quiescent, or being ticked by another caller. |
429 | TOO_MANY_REQUESTS — per-user rate limit exceeded. |