# Traces

{% 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.

## Trace sets

Group traces into a **trace set** for evaluation. A trace set is the input to a trace evaluation. Create one from any filtered trace list.

## Where to next

* [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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.layerlens.ai/7.-observe-see-whats-happening/traces.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
