> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/7.-observe-see-whats-happening/traces.md).

# Traces

Upload, browse, and inspect agent traces in Stratix Premium.

{% hint style="info" %}
**Available in Stratix Premium.** This surface is part of the logged-in workspace at [stratix.layerlens.ai](https://stratix.layerlens.ai). Stratix Public users can browse the catalog but cannot use this feature.
{% endhint %}

The Traces surface ingests agent run records and lets you inspect them in detail. URL: [`stratix.layerlens.ai/dashboard/agent-evaluation/traces`](https://stratix.layerlens.ai/dashboard/agent-evaluation/traces).

## What you can do

* Upload a trace JSON file (single trace or batch)
* Stream traces in via the SDK or API
* Browse all traces in your org
* Filter by date, name, tag, status
* Inspect a single trace's full span tree, inputs, outputs, latencies, costs, errors
* Tag and annotate traces

## Trace shape

Minimum:

```json
{
 "id": "trace-123",
 "name": "answer-question",
 "inputs": {"prompt": "What's the capital of France?"},
 "outputs": {"response": "Paris."},
 "spans": [
 {"name": "llm-call", "kind": "llm", "model": "claude-opus-4-7",...},
 {"name": "tool-call", "kind": "tool", "tool": "lookup_country",...}
 ]
}
```

Stratix preserves any additional fields. The trace inspector renders metadata, spans, and any custom fields.

## Inspecting a trace

The trace page shows:

* Inputs and outputs at the top level
* Span tree with timing and cost rolled up per span
* Per-span details (kind, model, inputs, outputs, errors)
* Tags and annotations

## Streaming traces

For continuous evaluation, stream traces via the SDK:

```python
from layerlens import Stratix
client = Stratix()
client.traces.create(id=..., name=..., inputs={...}, outputs={...}, spans=[...])
```

See the [SDK reference](/6.-build-wire-your-code/sdk-python.md) for batch ingestion patterns.

## Datasets and trace sets

Group traces into a **dataset** — a named, versioned collection — to make them the reusable input to a trace evaluation. Create one from any filtered trace list, upload traces from a file, or **generate** synthetic traces when you don't have enough real ones yet.

* [Datasets](/7.-observe-see-whats-happening/datasets.md) — create, version, and evaluate collections of traces
* [Synthetic data](/7.-observe-see-whats-happening/synthetic-data.md) — generate realistic multi-agent trace datasets from scratch

## Where to next

* [Datasets](/7.-observe-see-whats-happening/datasets.md)
* [Synthetic data](/7.-observe-see-whats-happening/synthetic-data.md)
* [Trace evaluations](/8.-evaluate-score-the-outputs/trace-evaluations.md)
* [Concept: Traces and spans](/6.-build-wire-your-code/traces-and-spans.md)
* [Tutorial: Score live traces](/8.-evaluate-score-the-outputs/04-score-traces.md)
