> 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/2.-get-started/first-trace.md).

# Your first trace

Upload a trace to Stratix Premium and inspect it — see every span, every cost, every error.

A trace is a record of an AI call (or a chain of calls). Uploading a trace into Premium lets you inspect it in the UI and run trace evaluations against it.

## Prerequisites

* [ ] A Stratix Premium account ([sign up](/2.-get-started/sign-up.md))
* [ ] Either: a JSON file with one trace, or willingness to use the SDK to ingest a sample trace

## Option A — Upload via UI

### 1. Open Traces

Left rail: **Agent Evaluation → Traces**. Click **Upload trace**.

### 2. Drop the JSON file

A valid trace has at least:

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

### 3. Confirm

Stratix parses the JSON, infers the schema, and shows a preview. Click **Save**.

### 4. Inspect

The trace page shows:

* The full span tree
* Per-span model, latency, cost, errors
* Inputs and outputs at every level

## Option B — Ingest via SDK

```python
import os
from layerlens import Stratix

client = Stratix(api_key=os.environ["LAYERLENS_STRATIX_API_KEY"])
client.traces.create(
 id="trace-1",
 name="answer-question",
 inputs={"prompt": "What is the capital of France?"},
 outputs={"response": "Paris."},
 spans=[
 {"name": "llm-call", "kind": "llm", "model": "claude-opus-4-7"}
 ],
)
```

The trace appears in **Agent Evaluation → Traces** within seconds.

## Verify

Open the trace page; you should see your trace's span tree, inputs, and outputs.

## What to try next

* **Score this trace.** See [Trace evaluations](/8.-evaluate-score-the-outputs/trace-evaluations.md).
* **Ingest more traces.** A representative trace set is the starting point for agentic evaluations.

## Where to next

* [First judge](/2.-get-started/first-judge.md)
* [Stratix Premium — Traces](/7.-observe-see-whats-happening/traces.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)
