Documentation

Quick Start

Install TraceLLM and capture a first trace.

Quick Start

Get from zero to your first trace in under two minutes. You only need a terminal and Python 3.10+.

Tracey Tip

Pro tip: make sure you have Python 3.10+ and MongoDB ready before starting. I'll guide you through each step.

Step 1 — Install

Install TraceLLM via pip. The package includes the CLI, SDK, and all runtime dependencies.

terminalCopy
bash
pip install tracellm

Tip

Use a virtual environment: python -m venv .venv && source .venv/bin/activate

Step 2 — Start the Stack

Start all TraceLLM services with a single command:

terminalCopy
bash
tracellm start

This launches three services automatically:

Dashboard

Web UI at localhost:3000

WebSocket

Real-time event stream at localhost:3200

MongoDB

Trace storage at localhost:27017

Note

The first start may take a moment while MongoDB initializes. Subsequent starts are near-instant.

Step 3 — Run Your First Trace

Run a trace against any prompt. TraceLLM sends the prompt to your configured LLM provider and captures the full execution.

terminalCopy
bash
tracellm trace "Explain transformers"

You will see the trace ID printed to the terminal along with the model response, latency, and token usage.

Step 4 — Open the Dashboard

Navigate to http://localhost:3000 in your browser. Your trace appears in the trace list as soon as it completes.

Dashboard screenshot placeholder

Click on the trace to inspect the full detail: prompt, response, timing breakdown, and every span that was created during execution.

Step 5 — Replay the Trace

Replay any recorded trace with the replay command. This re-executes the trace using the captured inputs and shows the same execution path.

terminalCopy
bash
tracellm replay tr_abc123

Replace tr_abc123 with the ID returned by your trace command. Replay is useful for debugging failures without running the full workflow again.

Tip

Replay respects the original trace's latency profile by default. Pass --real-time to throttle replay to the original speed.