TruLens is an open-source system for tracing and evaluating LLM applications and AI agents. It records each step's inputs, outputs, latency, tokens, and cost, then uses evaluations to find failures and compare application versions.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add truera/trulens --skill trulens-running-evaluationsgit clone --depth 1 https://github.com/truera/trulensWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/truera/trulens/trulens-running-evaluations)<a href="https://agentmods.dev/skills/truera/trulens/trulens-running-evaluations"><img src="https://agentmods.dev/badge/skills/truera/trulens/trulens-running-evaluations/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/truera/trulens/trulens-running-evaluations"><img src="https://agentmods.dev/badge/skills/truera/trulens/trulens-running-evaluations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00015 | $0.01281 |
| Opus 5 | $0.00008 | $0.00641 |
| Sonnet 5 | $0.00003 | $0.00256 |
| Haiku 4.5 | $0.00002 | $0.00128 |
Grade A, and why
trulens-running-evaluations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TruLens Running Evaluations
Execute your configured evaluations and analyze results.
Prerequisites
Before running evaluations, ensure you have:
- Instrumented your app (see
instrumentationskill) - Configured your feedback functions (see
evaluation-setupskill)
Instructions
Step 1: Wrap Your App with Feedbacks
Pass your configured feedbacks to the appropriate wrapper:
from trulens.core import TruSession
session = TruSession()
# Use the wrapper that matches your framework
tru_app = YourWrapper(
your_app,
app_name="MyApp",
app_version="v1",
feedbacks=your_feedbacks, # From evaluation-setup
)
| Framework | Wrapper |
|---|---|
| LangChain | TruChain |
| LangGraph | TruGraph |
| LlamaIndex | TruLlama / TruLlamaWorkflow |
| Custom | TruApp |
Step 2: Run Your App with Recording
Use the context manager to record traces and run evaluations:
# Single query
with tru_app as recording:
result = your_app.query("What is TruLens?")
# Multiple queries
test_queries = [
"What is machine learning?",
"How does RAG work?",
"Explain transformers.",
]
with tru_app as recording:
for query in test_queries:
your_app.query(query)
Step 3: Wait for and View Results
Evaluations run asynchronously. Use retrieve_feedback_results() to wait for them to complete:
# Wait for evaluations to complete and get results as a DataFrame
# The timeout parameter controls how long to wait (default: 180 seconds)
feedback_results = recording.retrieve_feedback_results(timeout=300)
print(feedback_results)
# For a single record:
single_record_results = recording[0].retrieve_feedback_results(timeout=300)
# View leaderboard summary across all records
print(session.get_leaderboard())
# Launch interactive dashboard
from trulens.dashboard import run_dashboard
run_dashboard(session)
Important: Do NOT use time.sleep() to wait for evaluations. The retrieve_feedback_results() method properly waits for:
- Records to be written to the database
- Feedback evaluations to complete
- Results to be available
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 187 lines · 15 tokens per session scan A bca648b22f07
trulens-running-evaluations is a skill published in the GitHub repository truera/trulens (3,545 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 1,281 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
generate-rag-dataset
Generate a synthetic evaluation dataset from your RAG knowledge base. Creates diverse Q&A pairs with expected answers and relevant context, ready for LangWatch experiments and platform import. Use when you need test data for your RAG pipeline.
testing-llm
LLM and AI testing patterns — mock responses, evaluation with DeepEval/RAGAS, structured output validation, and agentic test patterns (generator, healer, planner). Use when testing AI features, validating LLM outputs, or building evaluation pipelines.
golden-dataset
Golden dataset lifecycle patterns for curation, versioning, quality validation, and CI integration. Use when building evaluation datasets, managing dataset versions, validating quality scores, or integrating golden tests into pipelines.
evaluators
Author or refine a Phoenix evaluator — code or LLM-as-a-judge — that scores a run's output. Trigger when the user wants to create a new evaluator, improve an existing one's logic or rubric, choose labels, or decide what to measure on a dataset or experiment. Do NOT trigger on: (1) manual prompt drafting (use…
phoenix-client-development
Development guide for the @arizeai/phoenix-client TypeScript SDK — run and resume experiments, manage OpenTelemetry tracer providers with stack-based attach/detach, and write vitest unit and integration tests. Use when adding features to phoenix-client, debugging experiment lifecycle or provider cleanup, modifying…
rag-evaluator
Evaluate RAG pipeline quality across faithfulness, relevance, and hallucination metrics. Use when user asks to test, benchmark, or improve a RAG system, or when RAG outputs look wrong.