Skip to main content

Local-first agent tracing — opens in your browser in 5 seconds. No Docker, no signup, no cloud.

Project description

tracelense

Local-first agent tracing. Open in your browser in 5 seconds. No Docker, no signup, no cloud.

See screenshots, comparison table, and full docs on GitHub →

pipx install tracelense && tracelense

That's it. Browser opens. Traces appear as your agent runs. SQLite at ~/.tracelense/db.sqlite. Nothing leaves your machine.

Why this exists

Every agent tracer either makes you stand up Docker (Phoenix), funnel your prompts through a cloud service (Langfuse, LangSmith, Helicone), or look at a UI that feels like 2014 enterprise software. tracelense is what you reach for when you want to see your traces now, on your laptop, the same way you reach for console.log.

Install

pipx install tracelense          # recommended
uv tool install tracelense
pip install tracelense

Python 3.10 – 3.13.

Trace your agent in one line

OpenAI

from openai import OpenAI
from tracelense import trace

client = OpenAI()
trace(client)

Anthropic

from anthropic import Anthropic
from tracelense import trace

client = Anthropic()
trace(client)

LangChain / LangGraph

from tracelense.adapters.langchain import TracelenseCallbackHandler

agent.invoke({"input": "..."}, config={"callbacks": [TracelenseCallbackHandler()]})

LlamaIndex

from tracelense.adapters.llamaindex import install
install()

Anything OpenTelemetry-instrumented

export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
python your_agent.py

Killer features

  1. A trace detail view that looks like 2026, not 2014. Span tree, prompts, tool calls, costs. One-click Copy as curl / Copy as Python.
  2. Trace diff — the moat. Pick two runs. tracelense diffs the output text, tool-call sequence, request params, and cost/latency/token deltas.
  3. Replay with overrides. Click Replay on any LLM span. Edit the model or prompt. tracelense re-issues against the same provider and renders the diff inline. API keys live in your OS keychain.
  4. Your AI coding assistant can read your traces. A read-only MCP server (tracelense mcp) lets Claude Code / Cursor / Windsurf call find_failing_spans, get_trace, diff_traces while debugging the agent it's helping you write.
  5. Cost dashboard. Today vs yesterday. Top models. Top agents. One page.

How tracelense compares

tracelense Phoenix Langfuse Helicone
Time to first trace 5 sec ~3 min ~10 min signup
Runs without containers yes no (Docker) no (Docker) no (proxy)
Trace diff yes no partial no
Replay with overrides yes no playground only no
AI-assistant readable (MCP) yes no no no
Data leaves your machine never never depends on deploy always
Export to bigger tools yes (OTLP) n/a n/a n/a

This is an honest comparison written by an honest competitor. Phoenix and Langfuse are great when your team grows past one laptop. tracelense is the thing you reach for first. When you outgrow it, tracelense export phoenix ships your data over. No lock-in.

Wire your AI assistant (MCP)

Claude Code (~/.claude.json or project .claude/settings.json):

{
  "mcpServers": {
    "tracelense": { "command": "tracelense", "args": ["mcp"] }
  }
}

Cursor (~/.cursor/mcp.json): same shape.

Then ask your AI: "Find the latest failing trace and tell me which tool call broke it." It will. Read-only — it can't burn money behind your back.

License

MIT. See LICENSE on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracelense-0.0.1.tar.gz (288.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracelense-0.0.1-py3-none-any.whl (278.0 kB view details)

Uploaded Python 3

File details

Details for the file tracelense-0.0.1.tar.gz.

File metadata

  • Download URL: tracelense-0.0.1.tar.gz
  • Upload date:
  • Size: 288.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tracelense-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ede76e83447fc4a80f4e83770fb210c421b558dccd0e7e9d7b96ce6c045c1312
MD5 2b778883092c2cfa6348405a343f9d5d
BLAKE2b-256 11256de5d8b2cb0702a575704665ba5e336b9a9b46b1043d056e7cdb59596c62

See more details on using hashes here.

File details

Details for the file tracelense-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tracelense-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 278.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tracelense-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b797ff0689f2d2d5de2526142b86624e482eb44a80d49a2c4b3e7450032c3eb8
MD5 a2180965bd7083188dc419366057374e
BLAKE2b-256 53e3d555b86da49bba7ff1e4d39ece2fd25aea6e6674e0d715afa774cd5b88d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page