Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.uselemma.ai/llms.txt

Use this file to discover all available pages before exploring further.

Lemma is an observability platform for AI agents. Export your OpenTelemetry traces to Lemma to search, debug, and monitor production agent behavior.

Get started

Quickstart

Send your first trace in under 2 minutes.

How it works

  1. Instrument with Langfuse or your existing OpenTelemetry instrumentation in your framework/provider stack.
  2. Export to Lemma via OTLP using your Lemma credentials.
  3. View traces in Lemma with span trees, timing, token/cost data, and metadata.
import { LangfuseSpanProcessor } from "@langfuse/otel";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";

const provider = new NodeTracerProvider({
  spanProcessors: [
    new LangfuseSpanProcessor({
      exporter: new OTLPTraceExporter({
        url: process.env.LEMMA_BASE_URL,
        headers: {
          Authorization: `Bearer ${process.env.LEMMA_API_KEY}`,
          "X-Lemma-Project-ID": process.env.LEMMA_PROJECT_ID,
        },
      }),
    }),
  ],
});

provider.register();
See the complete guide at Langfuse integration.

What you can do with Lemma

Trace agents — See the full execution tree for every run: 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. Monitor production — Set up monitors on metrics like latency, error rate, or tool call success rate. When something breaks, Lemma creates an incident with root cause analysis and notifies you via webhook. Connect your IDE — Use the Lemma MCP server to query traces directly from Cursor, Claude Desktop, or Claude Code without switching to the dashboard.

Choose your path

Langfuse integration (recommended for greenfield)

Start here when you are adding instrumentation from scratch.

Tracing overview

Understand the data model and setup choices.

OpenTelemetry export

Add Lemma as an export destination alongside an existing OTel stack.