List an agent's tasks
Authorization
ApiKeyAuth API key from API Keys in the dashboard menu.
In: header
Path Parameters
Query Parameters
Value in
- "working"
- "waiting"
- "finished"
value <= 10025Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/agents/string/tasks"{ "data": [ { "id": "string", "agent": { "id": "string", "name": "string" }, "title": "string", "status": "queued", "summary": "string", "created_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z" } ]}Run an agent POST
Give an agent a task: `query` (what to do), `files`, `input` (data a trigger would carry). JSON, or multipart with one `files` field per upload. **Async (default):** returns `202` at once with the `task_id`. Poll `GET /api/v1/tasks/{task_id}` until `status` is `completed`, then read `/summary`, `/structured-response` or `/tool-result`. When it is `waiting_for_input`, read `/messages` and reply to `/message`. **async=false:** holds the connection (budget in `X-Sync-Budget-Seconds`, about 5 minutes) and returns the result you ask for with `result`: `summary`, `feed`, `structured` or `tool:<name>`. `200` with `outcome: terminal` when the task ended (a failed task too: check `status`); `202` with `outcome: waiting_for_input` or `awaiting_review` as soon as it waits on a person, or `budget_expired` if it is still working. Set your client's timeout above the budget.
Give an agent a task (same as POST /run) POST
Give an agent work: a `message` saying what to do and the `files` to work on. `input` is the data the agent's trigger would carry, for an agent that starts from a form, record or webhook. Returns `202` with the task id at once; follow it with `GET /api/v1/tasks/{id}` or a `task.*` webhook. With `wait` (up to 60 seconds) the call holds until the task finishes or waits on a person and returns the whole task (`200`), or `202` if it is still working.