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-instrumentationgit 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-instrumentation)<a href="https://agentmods.dev/skills/truera/trulens/trulens-instrumentation"><img src="https://agentmods.dev/badge/skills/truera/trulens/trulens-instrumentation/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-instrumentation"><img src="https://agentmods.dev/badge/skills/truera/trulens/trulens-instrumentation.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.00025 | $0.03164 |
| Opus 5 | $0.00013 | $0.01582 |
| Sonnet 5 | $0.00005 | $0.00633 |
| Haiku 4.5 | $0.00003 | $0.00316 |
Grade A, and why
trulens-instrumentation 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 13d 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 — 443 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TruLens Instrumentation
Instrument your LLM application to capture traces for evaluation and debugging. This skill covers everything from initial setup to iterative improvement of trace quality.
When to Use This Skill
- Setting up instrumentation for a new app
- Adding custom spans to framework-wrapped apps
- Improving trace readability (unclear span names, missing context)
- Debugging why evaluations aren't working (missing attributes)
- Optimizing what gets captured for visualization
Part 1: Setup
Instrument your LLM application to capture traces for evaluation and debugging.
Interactive Instrumentation Setup
Let's identify what you need to instrument for visualization and/or evaluation.
Question 1: What framework are you using?
| Framework | Wrapper | Auto-instrumented |
|---|---|---|
| LangChain | TruChain |
Chain components, LLM calls |
| LangGraph | TruGraph |
Graph nodes, @task decorators |
| LlamaIndex | TruLlama / TruLlamaWorkflow |
Query engines, retrievers, workflows |
| Custom/Other | TruApp |
Only what you explicitly @instrument() |
→ If using a framework, the wrapper handles basic instrumentation automatically. Continue to Question 2 to add custom attributes.
Question 2: What data do you want to capture?
Tell me what's important to track in your app. This could be for:
- Visualization: Understanding execution flow in the dashboard
- Evaluation: Feeding data into feedback functions
Common attributes to instrument:
| What to Capture | Span Type | Attributes |
|---|---|---|
| User query/input | RECORD_ROOT |
INPUT |
| Final response | RECORD_ROOT |
OUTPUT |
| Retrieved documents/chunks | RETRIEVAL |
QUERY_TEXT, RETRIEVED_CONTEXTS |
| LLM prompts/completions | GENERATION |
(auto-captured by wrappers) |
| Tool calls | TOOL |
Tool name, arguments, results |
| Agent reasoning | AGENT |
Plans, decisions |
| Reranking results | RERANKING |
QUERY_TEXT, INPUT_CONTEXT_TEXTS, TOP_N |
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 13d ago First seen · 443 lines · 25 tokens per session scan A 1df6f95b19b9
trulens-instrumentation is a skill published in the GitHub repository truera/trulens (3,547 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 3,164 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
playground
Author, edit, or iterate on prompts in the Phoenix prompt playground, including running experiments over a dataset. Load before any playground ui. operation call, including single-shot prompt rewrites.
datasets
Understand what a Phoenix dataset is and reason well about its examples, outputs, splits, and how it feeds evaluators and experiments. Load this whenever a dataset is in view or the user asks what a dataset is, how splits work, what an output "means", or how datasets relate to experiments and evals. This skill governs…
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…
experiments
Run, read, and compare dataset-backed experiments to find evidence that a prompt or pipeline is improving. Trigger when the user wants to iterate over a dataset with experiments, compare experiment runs, read experiment quality/latency/cost, or decide whether a change actually helped. Running a prompt over a dataset…
ml-expert
Expert-level machine learning, deep learning, model training, and MLOps. Use when the user mentions machine learning, deep learning, neural networks, MLOps, or data science, or when the task involves Machine Learning Fundamentals, Data Preparation, or Model Training.
tracelet-instrument
Instrument an AI agent or LLM app with OpenTelemetry and watch its runs live in tracelet (local DevTools). Use when asked to add tracing/observability to an agent, or to debug what an agent actually did.