# Lemma - [Introduction](https://docs.uselemma.ai/getting-started/introduction.md): Find, investigate, and fix failures in production AI agents - [Overview](https://docs.uselemma.ai/platform/overview.md): How Lemma turns a trace into an issue, and where projects and agents fit - [Concepts](https://docs.uselemma.ai/platform/concepts.md): Traces, issues, artifacts, and agents in the Lemma dashboard - [Traces](https://docs.uselemma.ai/platform/traces.md): Search, filter, and inspect ready traces in the Lemma dashboard - [Issues](https://docs.uselemma.ai/platform/issues.md): Recurring failure patterns Lemma detects from trace evidence - [Inspect](https://docs.uselemma.ai/platform/inspect.md): Ask Lemma about this project's traces, issues, artifacts, and settings - [Artifacts](https://docs.uselemma.ai/platform/artifacts.md): Per-agent context, understanding documents, and decision-flow diagrams - [Analytics](https://docs.uselemma.ai/platform/analytics.md): Project-level volume, latency, errors, tools, models, and estimated cost - [Overview](https://docs.uselemma.ai/connections/overview.md): Connect Lemma findings to Slack, Linear, MCP, and webhooks - [Slack](https://docs.uselemma.ai/connections/slack.md): Issue alerts and Issue Briefs in your Slack workspace, plus the Lemma support channel - [Linear](https://docs.uselemma.ai/connections/linear.md): Create, link, and unlink Linear tickets from Lemma issues - [Lemma MCP server](https://docs.uselemma.ai/connections/mcp.md): Connect a coding agent to Lemma, or connect an external MCP server into Lemma - [Webhooks](https://docs.uselemma.ai/connections/webhooks.md): Receive signed HTTP POST requests for issue lifecycle events - [Concepts](https://docs.uselemma.ai/tracing/instrumentation/concepts.md): Core SDK concepts and terminology in Lemma - [Quickstart](https://docs.uselemma.ai/tracing/instrumentation/setup.md): Install the Lemma SDK and send your first complete agent trace - [Instrument an agent](https://docs.uselemma.ai/tracing/instrumentation/instrument-an-agent.md): Build a complete Lemma trace one piece at a time - [Agent traces](https://docs.uselemma.ai/tracing/instrumentation/traces.md): Wrap one agent execution in one trace with input and output - [Cross-process turns](https://docs.uselemma.ai/tracing/instrumentation/cross-process-turns.md): Record a host and sandbox as one Lemma trace - [Generations](https://docs.uselemma.ai/tracing/instrumentation/generations.md): Capture LLM calls with model, prompt, completion, and timing - [Tool calls](https://docs.uselemma.ai/tracing/instrumentation/tool-calls.md): Record tool invocations as child spans with arguments and results - [Spans](https://docs.uselemma.ai/tracing/instrumentation/spans.md): Trace retrieval, ranking, and app logic as child spans - [Threads & context](https://docs.uselemma.ai/tracing/instrumentation/context.md): Group multi-turn conversations, attach users, and add custom metadata - [OpenAI Agents SDK](https://docs.uselemma.ai/integrations/openai-agents.md): Record OpenAI Agents SDK traces with Lemma - [Vercel AI SDK](https://docs.uselemma.ai/integrations/vercel-ai.md): Record Vercel AI SDK model calls and tool executions with Lemma - [LangChain](https://docs.uselemma.ai/integrations/langchain.md): Record LangChain runs with Lemma callback handlers - [LangGraph](https://docs.uselemma.ai/integrations/langgraph.md): Record LangGraph graph runs with Lemma callback handlers - [Mastra](https://docs.uselemma.ai/integrations/mastra.md): Record Mastra agent and workflow runs with Lemma - [Debug mode](https://docs.uselemma.ai/tracing/troubleshooting/debug-mode.md): Use SDK runtime logs to debug trace delivery and trace shape - [Common issues](https://docs.uselemma.ai/tracing/troubleshooting/common-issues.md): Troubleshoot missing traces and trace-quality issues: lost context, invisible tools, blank input/output, and unsupported shapes - [Trace contract](https://docs.uselemma.ai/reference/trace-contract.md): What clients send to Lemma, what ingest requires, and which fields unlock product behavior - [Analytics telemetry](https://docs.uselemma.ai/reference/analytics-telemetry.md): Required SDK attributes for Analytics widgets, coverage semantics, and upgrade behavior - [Building high-quality traces](https://docs.uselemma.ai/guides/building-high-quality-traces.md): The ideal instrumentation path, with bad → better → best examples for structure, timing, nesting, generations, and tools - [Instrumenting multi-turn agents](https://docs.uselemma.ai/guides/instrumenting-multi-turn-agents.md): Give each conversation turn its own trace and link the turns with a shared thread id - [Runnable examples](https://docs.uselemma.ai/guides/examples.md): The same Lemma docs chat agent, instrumented once per first-party stack - [From Raindrop to Lemma](https://docs.uselemma.ai/guides/migrations/raindrop.md): Map Raindrop's event- and signal-centric model onto Lemma's trace contract, and re-instrument your agent to emit conforming Lemma traces - [From Langfuse to Lemma](https://docs.uselemma.ai/guides/migrations/langfuse.md): Keep your existing Langfuse instrumentation and add Lemma SDK tracing alongside it to produce the Lemma trace contract - [From OpenTelemetry to Lemma](https://docs.uselemma.ai/guides/migrations/opentelemetry.md): Keep your existing OpenTelemetry instrumentation and add Lemma SDK tracing alongside it to produce the Lemma trace contract - [List projects](https://docs.uselemma.ai/api-reference/projects/list-projects.md): Returns projects available to the authenticated tenant. - [Create project](https://docs.uselemma.ai/api-reference/projects/create-project.md): Create a project for the authenticated tenant. - [Reorder projects](https://docs.uselemma.ai/api-reference/projects/reorder-projects.md): Persist project ordering for the authenticated tenant. - [Get project](https://docs.uselemma.ai/api-reference/projects/get-project.md): Returns a single project if it belongs to the authenticated tenant. - [Update project](https://docs.uselemma.ai/api-reference/projects/update-project.md): Update a project for the authenticated tenant. - [Get project analytics](https://docs.uselemma.ai/api-reference/projects/get-project-analytics.md): Returns one analytics payload selected by the view discriminator. Omit view or pass view=general for the legacy timeseries + top-models contract. Specialized views do not compute unrequested panels. Cost figures are Lemma estimates from observed token counts and public LiteLLM list prices — not invo… - [Get instrumentation diagnostics settings](https://docs.uselemma.ai/api-reference/projects/get-instrumentation-diagnostics-settings.md): Returns the instrumentation-diagnostics settings for a project owned by the authenticated tenant. - [Update instrumentation diagnostics settings](https://docs.uselemma.ai/api-reference/projects/update-instrumentation-diagnostics-settings.md): Enable or disable the instrumentation-diagnostics digest for the authenticated tenant. - [List instrumentation diagnostics findings](https://docs.uselemma.ai/api-reference/projects/list-instrumentation-diagnostics-findings.md): Returns the complete active instrumentation-diagnostics findings for a project owned by the authenticated tenant. Empty when the rollout gate or project preference is off. - [Get project briefs settings](https://docs.uselemma.ai/api-reference/projects/get-project-briefs-settings.md): Returns the Slack briefs settings for a project owned by the authenticated tenant. - [Update project briefs settings](https://docs.uselemma.ai/api-reference/projects/update-project-briefs-settings.md): Enable or disable Slack briefs and optionally set cadence for the authenticated tenant. - [Inspect project setup status](https://docs.uselemma.ai/api-reference/projects/inspect-project-setup-status.md): Returns setup state, scope, permissions, and stable blocker codes without exposing credentials or provider-private data. - [List project artifacts](https://docs.uselemma.ai/api-reference/artifacts/list-project-artifacts.md): Returns Agent understanding and uploaded artifacts for a project, scoped to the selected agent. - [Upload project artifact](https://docs.uselemma.ai/api-reference/artifacts/upload-project-artifact.md): Upload an agent-scoped .txt or .md file (text/plain or text/markdown). - [List Agent understanding versions](https://docs.uselemma.ai/api-reference/artifacts/list-agent-understanding-versions.md): Returns Agent understanding version metadata for a project and agent, newest first. The response omits artifact content. - [Get Agent understanding version](https://docs.uselemma.ai/api-reference/artifacts/get-agent-understanding-version.md): Returns the Agent understanding content and metadata for a specific project, agent, and version. - [Regenerate project artifacts](https://docs.uselemma.ai/api-reference/artifacts/regenerate-project-artifacts.md): Starts Agent understanding and diagram regeneration for a tenant-owned project and optional agent. Clients should poll list_project_artifacts for a new latest_version to observe completion. - [Get uploaded project artifact content](https://docs.uselemma.ai/api-reference/artifacts/get-uploaded-project-artifact-content.md): Returns stored text content and metadata for one uploaded text artifact. - [Delete project artifact](https://docs.uselemma.ai/api-reference/artifacts/delete-project-artifact.md): Deletes one uploaded project artifact. - [Search traces (structural)](https://docs.uselemma.ai/api-reference/traces/search-traces-structural.md): Structural search over traces and span attributes. Distinct from evidence search, which searches visible span content. - [Search trace evidence](https://docs.uselemma.ai/api-reference/traces/search-trace-evidence.md): Search visible span content, grouped into trace-level results. Distinct from structural search. - [Discover trace search facets](https://docs.uselemma.ai/api-reference/traces/discover-trace-search-facets.md): Returns curated, bounded facets for the active trace-search context. - [List dashboard traces](https://docs.uselemma.ai/api-reference/traces/list-dashboard-traces.md): Canonical first-party dashboard list with cursor pagination and independent has_error/has_issues filters. Kept separate from GET /traces because that legacy window list uses a different backend and response shape. - [List trace agent names](https://docs.uselemma.ai/api-reference/traces/list-trace-agent-names.md): Returns agent names seen in project traces. - [Check ready traces](https://docs.uselemma.ai/api-reference/traces/check-ready-traces.md): Returns whether a project has ready traces. - [Check per-trace ingest status](https://docs.uselemma.ai/api-reference/traces/check-per-trace-ingest-status.md): Returns whether a specific otel_trace_id is queued (`enqueued`), stored (`ingested`), ready (`ready`), or not found (`not_found`). - [Bulk delete traces](https://docs.uselemma.ai/api-reference/traces/bulk-delete-traces.md): Delete multiple traces for a project. - [Get agent names by trace ids](https://docs.uselemma.ai/api-reference/traces/get-agent-names-by-trace-ids.md): Returns a map of trace id to agent name. - [Get trace by run id](https://docs.uselemma.ai/api-reference/traces/get-trace-by-run-id.md): Canonical efficient lookup of the trace carrying a given agent run id. Not folded into list_traces. - [Get trace](https://docs.uselemma.ai/api-reference/traces/get-trace.md): Loads a single trace with spans and stats. Pass expand=context to return the agent context bundle (row, stats, spans, and issue occurrences) instead of the default detail payload. Default (no expand) responds with the get_trace detail schema; expand=context responds with the get_trace_context bundle… - [Delete trace](https://docs.uselemma.ai/api-reference/traces/delete-trace.md): Delete a trace for a project. - [List trace spans](https://docs.uselemma.ai/api-reference/traces/list-trace-spans.md): Returns spans for a ready trace in start-time order. Optional limit/offset pages the result and include_attributes/include_events=false drop the payload-heavy span keys. Default returns every span with all fields. The bare array is intentional (continuation is detected by a short or empty page, no t… - [List thread traces](https://docs.uselemma.ai/api-reference/traces/list-thread-traces.md): Thread traversal for a ready trace. scope=all (default) returns every ready member oldest first using the threadTraces schema; scope=neighbors returns previous/next ids using the threadTraceNeighbors schema. Empty for standalone traces. - [List trace issue occurrences](https://docs.uselemma.ai/api-reference/traces/list-trace-issue-occurrences.md): Returns issue occurrence evidence linked to a ready trace. - [List thread issue summaries](https://docs.uselemma.ai/api-reference/traces/list-thread-issue-summaries.md): Batch-fetch issue extraction completion and dev issues for thread_ids (join key for eval trial_hash). - [List issues](https://docs.uselemma.ai/api-reference/issues/list-issues.md): List issues for a project. By default, returns issues at or above the frequency cutoff. Pass expanded=true for less-common issues and include_context=true for dashboard metric context. expand=dashboard and projection=dashboard are deprecated aliases. - [List issue tags](https://docs.uselemma.ai/api-reference/issues/list-issue-tags.md): List project-scoped issue tags in normalized name order. - [Create issue tag](https://docs.uselemma.ai/api-reference/issues/create-issue-tag.md): Create a project-scoped issue tag. Names are normalized; duplicate normalized names return the existing tag with 200. - [List project releases](https://docs.uselemma.ai/api-reference/issues/list-project-releases.md): Observed releases in first-observation order, with first_observed_at and 7-day release coverage. - [Get issue](https://docs.uselemma.ai/api-reference/issues/get-issue.md): Get a single issue. The validation field is null when no validation row exists; when present it contains status, evidence_summary, and validated_at. - [Patch issue](https://docs.uselemma.ai/api-reference/issues/patch-issue.md): Apply exactly one scalar mutation: status (with optional dismissal fields), flagged, or user_id assignee. Empty, mixed, or incompatible bodies are rejected before any write. start-review stays on its dedicated route. - [Get issues in bulk](https://docs.uselemma.ai/api-reference/issues/get-issues-in-bulk.md): Fetch many issues by id. One invalid or unauthorized id does not hide the rest of the batch. Results preserve input order. Mixed results are HTTP 200. - [Get issue metric series](https://docs.uselemma.ai/api-reference/issues/get-issue-metric-series.md): Returns zero-filled daily occurrence buckets for an issue over the last 30 days. - [Get issue artifact context](https://docs.uselemma.ai/api-reference/issues/get-issue-artifact-context.md): Returns bounded Agent understanding and uploaded text artifact context for validation and debugging. - [List issue occurrences](https://docs.uselemma.ai/api-reference/issues/list-issue-occurrences.md): List occurrences for an issue. Pass release to filter; empty string matches unreleased occurrences. - [Get issue chat context](https://docs.uselemma.ai/api-reference/issues/get-issue-chat-context.md): Returns the issue, recent occurrences, aggregate stats, and per-trace bundles (trace row, stats, and spans) for issue chat. - [Get issue markdown](https://docs.uselemma.ai/api-reference/issues/get-issue-markdown.md): Build markdown for an issue. - [Start issue review](https://docs.uselemma.ai/api-reference/issues/start-issue-review.md): Set status to in_progress and assign the acting user when the issue is unassigned, in one atomic write. An existing assignee is preserved; an issue already in progress is returned unchanged. - [Merge issues](https://docs.uselemma.ai/api-reference/issues/merge-issues.md): Merge one active same-agent issue into this issue. The loser is dismissed as a merged duplicate; its occurrences are immediately moved onto the survivor. - [Delete issue tag](https://docs.uselemma.ai/api-reference/issues/delete-issue-tag.md): Delete a project-scoped tag and cascade removal from all issues. - [Attach issue tag](https://docs.uselemma.ai/api-reference/issues/attach-issue-tag.md): Attach a tag to an issue idempotently. - [Detach issue tag](https://docs.uselemma.ai/api-reference/issues/detach-issue-tag.md): Detach a tag from an issue idempotently. - [Mutate issues in batch](https://docs.uselemma.ai/api-reference/issues/mutate-issues-in-batch.md): Apply one discriminated batch mutation: status, start-review, flag, assignee, or tag. Mixed item-level failures return HTTP 200. Successful items are not rolled back. - [List insights](https://docs.uselemma.ai/api-reference/insights/list-insights.md): List project-scoped insights. Empty projects return an empty list. Pass limit and offset to page; defaults match issues (50 / max 200). - [Get insight](https://docs.uselemma.ai/api-reference/insights/get-insight.md): Get a single insight for a project, including assigned member issues. Unauthorized or unknown projects return 404. - [Inspect Linear connection](https://docs.uselemma.ai/api-reference/linear-tickets/inspect-linear-connection.md): Returns retained Linear connection health and project defaults. Disabled rollout state does not remove stored history. - [Inspect issue Linear ticket](https://docs.uselemma.ai/api-reference/linear-tickets/inspect-issue-linear-ticket.md) - [Link confirmed Linear ticket](https://docs.uselemma.ai/api-reference/linear-tickets/link-confirmed-linear-ticket.md) - [Create Linear ticket](https://docs.uselemma.ai/api-reference/linear-tickets/create-linear-ticket.md) - [Unlink Linear ticket](https://docs.uselemma.ai/api-reference/linear-tickets/unlink-linear-ticket.md) - [Inspect compact Linear ticket states](https://docs.uselemma.ai/api-reference/linear-tickets/inspect-compact-linear-ticket-states.md): Returns no ticket history or workspace directory; only active compact states for the requested project issues. - [Preview exact Linear ticket](https://docs.uselemma.ai/api-reference/linear-tickets/preview-exact-linear-ticket.md) - [Inspect GitHub connection](https://docs.uselemma.ai/api-reference/github-repositories/inspect-github-connection.md): Returns retained GitHub connection health and last-known repository identity. Disabled rollout state does not remove stored history. ## OpenAPI Specs - [openapi](https://api.uselemma.ai/openapi.json)