Tasks API
Create, list and control tasks, read their events, download artifacts, and apply plans.
| Method and path | Purpose | Permission |
|---|---|---|
POST /orgs/:orgId/tasks | Create a task | task.create |
GET /orgs/:orgId/tasks | List tasks (cursor pagination) | member |
GET /orgs/:orgId/tasks/:taskId | Get a task | member |
GET /orgs/:orgId/tasks/:taskId/events | Timeline events | member |
POST /orgs/:orgId/tasks/:taskId/actions | pause, resume, cancel, retry, restart, input, approve, deny | task.control |
GET /orgs/:orgId/tasks/:taskId/artifacts/:name | Download an artifact (screenshots, reports) | member |
POST /orgs/:orgId/tasks/:id/apply-plan | Create the tasks a completed plan proposes (idempotent) | task.create |
GET / POST /orgs/:orgId/schedules, PATCH / DELETE …/schedules/:id | Scheduled tasks | project.update to change |
POST /orgs/:orgId/schedules/:id/run | Create a schedule's task now | task.create |
GET / POST /orgs/:orgId/task-templates, POST …/task-templates/:id/use | Task templates | project.update to change, task.create to use |
GET /orgs/:orgId/budget | This month's spend against the budget limits | member |
GET /orgs/:orgId/analytics | Insights: outcomes of finished tasks | member |
Create
Terminal
curl -X POST "$AO_SERVER/api/v1/orgs/$AO_ORG/tasks" \
-H "Authorization: Bearer $AO_TOKEN" -H "Content-Type: application/json" \
--data '{"projectId": "prj_123", "title": "Fix flaky login test", "prompt": "…", "priority": "HIGH"}'Fields are described in Creating tasks. For a review, add "kind": "review" and
"review": { "base": "main", "head": "feature/x" }; for a plan, "kind": "plan". attempts lets
several agents try the task, and continuesTaskId makes it a
follow-up. List the attempts of one group with GET /orgs/:orgId/tasks?attemptGroupId=….
A task carries its spend in usage.
Act
Terminal
curl -X POST "$AO_SERVER/api/v1/orgs/$AO_ORG/tasks/tsk_123/actions" \
-H "Authorization: Bearer $AO_TOKEN" -H "Content-Type: application/json" \
--data '{"action": "input", "input": "Use the existing Money type for amounts."}'reason (up to 2,000 characters) can accompany any action, for example a denial.
Follow
Subscribe to task.updated and task.event on the live WebSocket, or poll the task and
its events.