> ## Documentation Index
> Fetch the complete documentation index at: https://noorle.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tasks

> Track A2A agent task status with GET /tasks/{id}, monitor submitted, working, completed, failed, and canceled states, and cancel long-running operations

Get task status and manage long-running operations.

## Get Task Status

**GET** `/tasks/{id}`

```bash theme={null}
curl https://agent-{gateway-id}.noorle.com/tasks/task-123 \
  -H "Authorization: Bearer eyJhbGc..."
```

Response:

```json theme={null}
{
  "id": "task-123",
  "status": "completed",
  "result": "Task output",
  "created_at": "2024-03-22T10:30:45Z",
  "completed_at": "2024-03-22T10:31:15Z"
}
```

## Task States

| State       | Meaning          |
| ----------- | ---------------- |
| `submitted` | Task accepted    |
| `working`   | Agent processing |
| `completed` | Success          |
| `failed`    | Error occurred   |
| `canceled`  | User canceled    |

## Cancel Task

**DELETE** `/tasks/{id}`

```bash theme={null}
curl -X DELETE https://agent-{gateway-id}.noorle.com/tasks/task-123 \
  -H "Authorization: Bearer eyJhbGc..."
```

## Related Methods

* [message/send](/docs/reference/a2a/message-send)
* [message/stream](/docs/reference/a2a/message-stream)
