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

# Monitoring

> Inspect runs, batches, spans, and traces from the CLI — and set up alerts — to see how your tools, plays, and agents perform.

Every execution in Cargo — a tool run, a play batch, an agent message — is observable from the terminal. Runs, batches, spans, and traces all have list, get, and metrics commands.

## Runs and batches

```bash theme={null}
cargo-ai orchestration run list --workflow-uuid <uuid>
cargo-ai orchestration run get <run-uuid>
cargo-ai orchestration run get-metrics --workflow-uuid <uuid>

cargo-ai orchestration batch list
cargo-ai orchestration batch get <batch-uuid>
cargo-ai orchestration batch download --uuid <batch-uuid>   # results as a file
```

<Warning>
  A batch with `status: success` can still contain individual run failures —
  always check `failedRunsCount`.
</Warning>

## Spans and traces

Drill into a single execution's node-by-node breakdown:

```bash theme={null}
cargo-ai orchestration trace list --started-after 2025-01-01 --workflow-uuid <uuid>
cargo-ai orchestration trace get <trace-uuid>
cargo-ai orchestration span list --execution-started-after 2025-01-01 --run-uuid <run-uuid>
```

<Note>
  `trace list` requires `--started-after`, and `span list` requires
  `--execution-started-after` — both accept an ISO date. The uuid flags narrow
  the results but are optional.
</Note>

## Metrics

`get-metrics` returns per-node execution status counts and credits used, filterable by release, batch, or date range — so you can spot regressions between deploys.

```bash theme={null}
cargo-ai orchestration run get-metrics --workflow-uuid <uuid> \
  --created-after 2025-01-01 --created-before 2025-01-31
```

## Alerts

Connect Slack or email to be notified when a batch's health drops below a threshold, when failures spike, or on specific error types. Configure alert channels and thresholds in the workspace, then let plays and tools report against them.

## Using the UI

Each tool and play also has **Records** and **Metrics** views in the web app — filter by status, version, batch, or date; inspect any execution node-by-node; and retry failed runs individually or in bulk (from scratch or from the failed node).
