The one rule: one agent execution = one trace. LLM calls and tool calls are child spans of that trace, not separate traces.
Get started
Quickstart
Install the SDK, point it at Lemma, and send your first trace in a few minutes.
Lemma tracing skill
Let a coding agent install the SDK and add tracing from the public Lemma repo.
Trace contract
The exact shape Lemma reads - the mental model everything builds on.
How it works
- Instrument with the SDK. Wrap one agent execution in
lemma.trace(), and record generation, tool, and app work inside it. - The SDK sends to Lemma over HTTPS, using your Lemma credentials.
- Lemma reads the trace shape to show inputs and outputs, model calls, tool calls, threads, and to run automated issue detection.
Instrument in levels
You do not need perfect instrumentation to get value. Start at level 1 and go deeper where debugging hurts.| Level | Add this | You can now see |
|---|---|---|
| 1 | Trace root with input/output | Which executions ran and whether they succeeded |
| 2 | Generations | Prompts, completions, model, and latency |
| 3 | Tool calls | Tool arguments, results, errors, and latency |
| 4 | Spans | Retrieval, ranking, and app-logic steps |
| 5 | Threads & context | Conversations, users, environments, custom filters |
What you can do with Lemma
Trace agents - see the full execution tree for every trace: LLM calls, tools, retrieval, latency, and errors. Debug failures - inspect inputs, outputs, and errors across nested spans; filter by user, session, environment, and custom attributes. Connect your IDE - use the Lemma MCP server to query traces from Cursor, Claude Desktop, or Claude Code.Choose your path
Instrument with the SDK
Install the SDK, then add traces, generations, tool calls, and spans.
Trace contract
Understand the exact shape Lemma reads.