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

# tai traces

> List and inspect run traces.

List and inspect run traces.

```console theme={null}
$ tai traces [OPTIONS] COMMAND [ARGS]...
```

## `tai traces get`

Get one run's full trace, or download it as JSON with `--export`.

Example: `tai traces get trace_abc`

```console theme={null}
$ tai traces get [OPTIONS] TRACE_ID
```

| Argument   | Description            |
| ---------- | ---------------------- |
| `TRACE_ID` | Trace id. *(required)* |

| Option                 | Description                                                          |
| ---------------------- | -------------------------------------------------------------------- |
| `--export`             | Download the full trace as a JSON file instead. *(default: `False`)* |
| `--json` / `--no-json` | Emit raw JSON instead of human tables.                               |

## `tai traces list`

List observability runs, or download the filtered list with `--export`.

Example: `tai traces list --status error --sort cost`

```console theme={null}
$ tai traces list [OPTIONS]
```

| Option                  | Description                                                           |
| ----------------------- | --------------------------------------------------------------------- |
| `--from` `TEXT`         | Range start: an ISO instant or a relative token (30d).                |
| `--to` `TEXT`           | Range end: an ISO instant or a relative token.                        |
| `--status` `TEXT`       | Filter: 'error' or 'success'.                                         |
| `--sort` `TEXT`         | Sort field: createdAt, cost, latencyMs, totalTokens.                  |
| `--dir` `TEXT`          | Sort direction: asc or desc.                                          |
| `--page` `INTEGER`      | Page number (1-based).                                                |
| `--page-size` `INTEGER` | Rows per page.                                                        |
| `--export`              | Download the filtered list instead of paging it. *(default: `False`)* |
| `--format` `TEXT`       | Export format: csv or json (only with --export). *(default: `csv`)*   |
| `--json` / `--no-json`  | Emit raw JSON instead of human tables.                                |
