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

# Traces Overview

> Upload, query and search the traces your training runs, evaluations and inference jobs produce

<Warning>Prime Traces is in closed beta.</Warning>

Prime Traces stores the traces from your training runs, evaluations and inference jobs, and lets you list, fetch, search and delete them.

* **Trace**: one rollout or request, with its messages, model calls, score and metadata.
* **Episode**: a group of traces produced together, such as a multi-agent rollout.
* **Run**: every trace that shares a `run_id`, with totals like trace count and average reward.

You need an API key with the **Prime Traces** permission. The SDK and CLI read it from `PRIME_API_KEY` or `prime login`. Set `PRIME_TEAM_ID` to work with a team's traces.

## Python SDK

```bash theme={null}
pip install prime-traces
```

```python theme={null}
from prime_traces import TracesClient

client = TracesClient()

client.upload_file("traces.jsonl", context={"source": "my-eval"})

page = client.list(run_id="run_9f3k2m", reward_min=0.9)
for summary in page.items:
    print(summary.trace_id, summary.score.reward)

raw = client.get_raw(page.items[0].trace_id)
matches = client.search("Traceback", run_id="run_9f3k2m")
```

## CLI

```bash theme={null}
prime traces upload traces.jsonl
prime traces list --run-id run_9f3k2m
prime traces get <trace_id> --raw
prime traces search "Traceback" --run-id run_9f3k2m
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.