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

# List Tasks

> List tasks with filtering, sorting, and pagination

## Query Parameters

* `project_id` (UUID)
* `conversation_id` (UUID)
* `user_id` (string)
* `status` (`active | completed | failed | timeout`)
* `loop_detected` (boolean)
* `has_failures` (boolean)
* `has_issues` (boolean; loops OR failures)
* `start_date`, `end_date` (ISO datetime)
* `page` (default `1`)
* `page_size` (default `20`, max `100`)
* `sort_by` (`started_at | completed_at | total_traces | total_tool_calls | total_tokens | total_cost_usd | total_latency_ms | status`)
* `sort_order` (`asc | desc`)

## Response

```json theme={null}
{
  "tasks": [
    {
      "id": "...",
      "project_id": "...",
      "conversation_id": "...",
      "user_id": "user_123",
      "task_name": "booking_flow",
      "task_type": null,
      "status": "completed",
      "total_traces": 3,
      "total_tool_calls": 2,
      "total_tokens": 1200,
      "total_cost_usd": 0.01,
      "total_latency_ms": 1800,
      "loop_detected": false,
      "tool_failure_count": 1,
      "context_failure_count": 0,
      "started_at": "...",
      "completed_at": "..."
    }
  ],
  "total": 1,
  "page": 1,
  "page_size": 20,
  "total_pages": 1
}
```
