Debuly
TruLens logo

TruLens

Open-source, OpenTelemetry-native Python library for tracing AI agents and RAG apps and scoring each step with LLM judges.

Open source

What is TruLens?

TruLens is an open-source library for evaluating and tracing AI agents and retrieval-augmented generation apps. It instruments your application with OpenTelemetry so every step is recorded as a span with inputs, outputs, latency, tokens and cost, then attaches metric scores from LLM judges that also explain why a score is low. Built-in metrics cover agent tool selection, plan adherence and execution efficiency, the RAG triad of groundedness, context relevance and answer relevance, MCP tool calling and quality, and summarization. You can tune a judge with your own rubric, few-shot examples and score range, and compare app versions on a leaderboard to find the point where quality and cost balance. A Streamlit dashboard shows leaderboards, trends, records and side-by-side comparisons, and results can be logged to a local SQLite database, Postgres or Snowflake. TruLens supports Python 3.10 through 3.14 and integrates with LangChain, LangGraph and LlamaIndex. It is free to install with pip, and no paid plans are listed.

Use cases

  • Trace every step of an AI agent run
  • Score RAG answers for groundedness
  • Compare agent versions on quality and cost
  • Evaluate MCP tool calling
  • Add blocking guardrails to an app
  • Log human feedback next to automated scores

Who it's for

  • AI engineers
  • ML engineers
  • Python developers
  • Data scientists

Why use TruLens

  • Per-step traces make it clear which retrieval or tool call caused a bad answer.
  • Explained scores point to what went wrong instead of giving only a number.
  • Version comparison helps you balance quality against cost before shipping.
  • OpenTelemetry-native traces fit into existing observability setups, and the library is free.

TruLens features

  • OpenTelemetry-native tracing with span-level detail
  • LLM-judge metrics that return explanations
  • Agent metrics for tool selection and plan adherence
  • RAG triad of groundedness, context relevance and answer relevance
  • MCP tool calling and tool quality metrics
  • Judge customization with rubric, examples and score range
  • Streamlit dashboard with leaderboard, trends, records and compare
  • Logging to SQLite, Postgres or Snowflake
  • Ground truth evaluations and streaming app support
  • Instrumentation for LangChain, LangGraph and LlamaIndex

TruLens integrations

  • LangChain
  • LangGraph
  • LlamaIndex
  • Postgres
  • Snowflake
  • Streamlit
  • OpenTelemetry
  • MCP

How to get started with TruLens

  1. Install TruLens with pip in a Python 3.10 or newer environment.
  2. Instrument your app with the instrument decorator or a framework wrapper such as TruGraph.
  3. Define metrics with LLM judge providers and select the inputs and outputs they should score.
  4. Run your app so records, traces and scores are logged to your database.
  5. Launch the dashboard with run_dashboard to compare versions and inspect individual traces.

TruLens limitations

  • Requires Python 3.10 through 3.14, with Snowflake and Cortex packages limited to 3.13 and the NeMo package to 3.12
  • Judges that use hosted models incur the cost of those model calls
  • The deprecated trulens-apps-nemo package installs only on Python 3.10 through 3.12

TruLens pricing

TruLens is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

TruLens alternatives

The main TruLens alternatives listed on Debuly are Langfuse, Arize Phoenix, Ragas, Arize AX, LightAgent and Opik. The table compares pricing and platforms; order is A–Z.

TruLens compared with its alternatives
ToolPricingStarting pricePlatforms
TruLensOpen source—Python, Self-hosted
Arize AXFreemium$50/moWeb, CLI, Self-hosted
Arize PhoenixOpen source—Web, Self-hosted, Docker, Kubernetes
LangfuseFreemium$29/moWeb, API, Self-hosted, Docker
LightAgentOpen source—API, Self-hosted
OpikFreemium$19/moWeb, Self-hosted, API
RagasOpen source—CLI
  1. Arize AX

    Observability and evaluation platform for AI agents and LLM apps, with tracing, issue detection and experiments on a free plan.

  2. Arize Phoenix

    Open-source tool for tracing, evaluating and experimenting on LLM apps and agents, free to self-host or run locally.

  3. Langfuse

    Open-source LLM observability and evaluation platform for tracing agents, managing prompts and scoring outputs.

  4. LightAgent

    Compact open-source Python framework for building agents with tools, memory, MCP, tracing, guardrails and multi-step workflows.

  5. Opik

    Comet's open-source platform for tracing, evaluating and monitoring LLM applications and agents, self-hosted or in the cloud.

  6. Ragas

    Open-source Python library for evaluating LLM and RAG applications with metrics, experiments and synthetic test data generation.

TruLens FAQ

Is TruLens free?

Yes. It is open source and installs with pip. No paid plans are listed, so the cost is whatever you pay for the model calls behind your judges.

How much does TruLens cost?

No price is published. TruLens is open source and free to install.

What frameworks does TruLens work with?

It documents integrations for LangChain, LangGraph and LlamaIndex, plus client hooks, MCP and plain Python instrumentation.

Does TruLens have a dashboard?

Yes. A built-in Streamlit dashboard shows a leaderboard, trends, individual records and side-by-side version comparison, and components can be embedded in your own Streamlit app.

Where are TruLens results stored?

By default in a local SQLite file, and you can configure a database URL. Guides cover logging to Postgres and Snowflake.

What are alternatives to TruLens?

Alternatives include Langfuse, Arize Phoenix, RAGAS, DeepEval, LangSmith and Weights & Biases Weave.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

SourceTypeAccessed
trulens.org/official
trulens.org/pricingpricing
trulens.org/getting_started/dashboard/official
trulens.org/getting_started/official

Image credits

  • Logo: from trulens.org · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.