Skip to content

Tasks & Runs

List tasks — GET /api/tasks

Terminal window
GET /api/tasks?limit=20&offset=0&status=completed
ParamDescription
limitNumber of tasks (default: 20, max: 100)
offsetPagination offset
statusFilter: pending, running, completed, failed

Response:

{
"tasks": [
{
"task_id": "task_abc",
"title": "Review open GitHub issues",
"status": "completed",
"created_at": "2025-04-01T09:00:00Z",
"run_count": 2,
"credits_used": 12
}
],
"total": 47
}

Get a task — GET /api/tasks/{task_id}

Returns the full task object including run summaries.


List runs for a task — GET /api/tasks/{task_id}/runs

{
"runs": [
{
"run_id": "run_xyz",
"task_id": "task_abc",
"status": "completed",
"query": "Review open GitHub issues",
"output": "I found 5 open issues...",
"credits_used": 6,
"duration_ms": 3241
}
]
}

Delete a task — DELETE /api/tasks/{task_id}

Permanently deletes the task and all its runs and messages. Returns 204 No Content.


Replay run events — GET /api/tasks/{task_id}/runs/{run_id}/events

Replay the SSE event stream for a completed run. Useful for debugging or displaying historical run details.