█

AI/TLDR

Buy me a coffee
Buy me a coffee

TraceRoot

Trace AI agents in production, flag bad runs with detectors, cluster them into signals and verify fixes with evals

Observability & LLMOpsOpen core
Latest
v1.3.2
Updated
21 Oct 2026
Language
TypeScript
License
Apache-2.0 (directories named ee are under the TraceRoot Enterprise License)
$git clone https://github.com/traceroot-ai/traceroot.git

What's new

v1.3.221 Oct 2026

Adds a read-only public demo workspace with recorded agent investigations, and lists, resolves and reopens signals through the public API; Docker Compose moves to maintained object-storage images.

IN SHORT

What is TraceRoot?

TraceRoot is an open-source platform for finding out why AI agents fail in production and checking that a fix actually helps. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in TypeScript and licensed Apache-2.0 (directories named ee are under the TraceRoot Enterprise License).

Updated Markdown version ↗

Overview

TraceRoot is an open-source platform for finding out why AI agents fail in production and checking that a fix actually helps. It describes itself as an "AI agent improvement platform", and its loop has four steps: trace every production run, detect runs that miss a definition of good behaviour, group those failures into signals, and verify proposed changes against evaluation datasets. The company behind it went through Y Combinator's Summer 2025 batch, and the platform runs either as TraceRoot Cloud or self-hosted with Docker Compose.

TraceRoot trace view: a trace tree of agent turns, ChatCompletion spans and get_weather tool calls on the left, and the selected ChatCompletion span's latency, model, cost, input messages and a token usage breakdown on the right
A traced agent session: every model and tool call in a tree, with latency, cost and token usage for the selected span.TraceRoot docs ↗

Tracing records each model call, tool call and response with its inputs, outputs, latency and cost, shown as a trace tree, a timeline and per-span token usage. Native Python and TypeScript SDKs instrument model providers including OpenAI, Anthropic, Google Gemini, Mistral and OpenRouter, and agent frameworks including LangChain and LangGraph, LlamaIndex, CrewAI, AutoGen, DSPy, Google ADK, Pydantic AI, Mastra, the Vercel AI SDK, the OpenAI Agents SDK and the Claude Agent SDK.

TraceRoot signal detail for 'Tool dereferences a missing response field without validation', with status Open, a summary, a Run root cause analysis button and a chart of affected versus unaffected traces over 14 days
A signal groups recurring failures and can start a root cause analysis.TraceRoot docs ↗

Detectors are where you define what good behaviour looks like; runs that fail them are flagged automatically. Signals then cluster the judges' outputs into recurring problems, and a background coding agent investigates the traces together with the connected GitHub code in a sandbox to suggest a fix. You can also hand that work to your own coding agent: the TraceRoot CLI lets a coding agent set up instrumentation and investigate signals locally. Evals close the loop by running versions of the agent against your datasets so improvements and regressions show up before you ship, and the next round of production traces feeds the next round of detection.

Code outside directories named `ee` is Apache 2.0; those directories are under TraceRoot's Enterprise License. The repository is TypeScript, and the README credits pi-mono as the agent runtime behind its investigations.

What it does

  • Traces of every model call, tool call and response with inputs, outputs, latency, token usage and cost, in a trace tree and a timeline view
  • Python and TypeScript SDKs with automatic instrumentation for major model providers and agent frameworks, from LangChain and CrewAI to the OpenAI Agents SDK and Claude Agent SDK
  • Detectors that encode good behaviour and automatically flag production runs that miss it
  • Signals that cluster judge outputs into recurring issues, with a sandboxed background coding agent that investigates traces and the connected GitHub code to suggest fixes
  • A CLI that lets your own coding agent set up tracing and work through signals locally
  • Offline evals against datasets to compare agent versions and catch regressions, plus Slack alerts and a public API

Getting started

You need a TraceRoot instance — TraceRoot Cloud at app.traceroot.ai or a self-hosted one — and a project in its dashboard. Then let a coding agent set up instrumentation through the CLI, or wire an SDK in by hand.

Self-host the platform (optional)

With Git, Docker Compose and Make installed, this starts TraceRoot locally; open localhost:3000 afterwards. Skip this step to use TraceRoot Cloud.

bashbash
git clone https://github.com/traceroot-ai/traceroot.git
cd traceroot
cp .env.example .env
make prod-lite

Let your coding agent instrument the app

Install the CLI and log in, then ask your coding agent: "Use the TraceRoot CLI to set up tracing for this application."

bashbash
npm install -g traceroot-cli
traceroot login

Or install the TypeScript SDK yourself

You need a TraceRoot project API key. For a self-hosted instance, replace the host URL with your own.

bashbash
npm install @traceroot-ai/traceroot openai

export TRACEROOT_API_KEY="your-project-api-key"
export TRACEROOT_HOST_URL="https://app.traceroot.ai"
export OPENAI_API_KEY="your-openai-api-key"

Trace an agent call

Save this as `example.ts` and run it with `npx tsx example.ts`, then open the project's Traces page to inspect the run.

tsts
import OpenAI from 'openai';
import { TraceRoot, observe } from '@traceroot-ai/traceroot';

TraceRoot.initialize({ instrumentModules: { openAI: OpenAI } });
const openai = new OpenAI();

const myAgent = observe({ name: 'my_agent', type: 'agent' }, async (query: string) => {
  const response = await openai.chat.completions.create({
    model: 'gpt-4o',
    messages: [{ role: 'user', content: query }],
  });
  return response.choices[0].message.content;
});

async function main() {
  try {
    await myAgent("What's the weather in SF?");
  } finally {
    await TraceRoot.shutdown();
  }
}

main().catch(console.error);

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when an agent in production fails in ways you only notice from user complaints and you want those failures flagged and grouped automatically
  • Reach for it to hand recurring production issues to a coding agent with the traces and code context it needs to propose a fix
TraceRoot evaluation results for a 'Support agent golden set' dataset: rows of input, output and expected values with expected_facts, follows_policy and no_handoff_loop scores per row
An eval run scores each dataset row against the expected answer and policy checks.TraceRoot docs ↗
  • Reach for it when you want to prove a prompt or code change improves an agent by running evals on a dataset before shipping
  • Reach for it when you need self-hostable tracing of token usage, latency and cost across many agent frameworks and model providers

How TraceRoot compares

TraceRoot alongside other open-source observability & llmops tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Langfuse★ 38kA self-hostable platform for tracing LLM and agent calls, managing prompts, and running evaluations to debug and improve AI applications.
Opik★ 23.5kAn open-source platform from Comet for tracing, evaluating, and monitoring LLM applications, RAG systems, and agent workflows with dashboards and LLM-as-judge metrics.
RagaAI Catalyst★ 16.2kPython SDK that combines agentic tracing, metric evaluation, dataset and prompt management, guardrails and red-teaming for LLM and multi-agent applications.
CodeBurn★ 11.9kReads the session files 41 AI coding tools already write to disk and breaks token spend down by model, project and task — no API keys or proxy — then flags waste and correlates spend with git commits.
TensorZero★ 11.7kAn open-source LLMOps platform that puts a single gateway in front of every major LLM provider and adds observability, evaluation, optimization, and A/B testing.
Evidently★ 8.1kA monitoring and evaluation framework for ML and LLM systems that tracks output quality, drift, and test results over time with reports and dashboards.
Star Office UI★ 7.6kA self-hosted pixel-art office that shows an AI agent's live work state, with a character moving between desk, sofa and bug corner as it writes, idles or hits errors; built for OpenClaw but drivable by any HTTP client.
TraceRoot★ 1.5kTrace AI agents in production, flag bad runs with detectors, cluster them into signals and verify fixes with evals