Skip to content

v0.1.0 — First public release

Choose a tag to compare

@kjgpta kjgpta released this 16 Jun 08:28
· 7 commits to main since this release
85af8ad

tracesage v0.1.0 — First public release 🎉

Production observability for LangChain & LangGraph multi-agent systems. Drop in two lines, see live execution traces in your browser. Zero infrastructure — no Docker, no Postgres, no external services.

pip install tracesage[langchain]
from tracesage import TraceSage

tracer = await TraceSage.create()                      # one-time setup
result = await graph.ainvoke(
    {"input": payload},
    config={"callbacks": [tracer.handler]},            # the only line you add
)
# open http://localhost:7842/ui to watch the trace live

Highlights

  • Two-line integration, never-raise safety. A LangChain BaseCallbackHandler captures chain / agent / tool / LLM / chat-model / retriever events. The handler never raises and the tracer never crashes your pipeline.
  • Embedded UI, zero infra. In-process FastAPI server with an interactive graph + timeline at http://localhost:7842/ui — run list, step drawer, dark/light themes, replay (1x/2x/5x), live WebSocket streaming. Storage is local SQLite + gzipped blobs.
  • MCP-aware. Tools loaded from MCP servers are attributed by source, so you can see which tools came from which server vs. which are hardcoded — surfaced in the topology, a "Tools by source" panel, and GET /api/tools.
  • Kill switch for production. TRACESAGE_ENABLED=false returns an inert tracer (no server, no DB/worker, no-op handler, near-zero overhead) — wire it in once, disable per-environment without touching your integration. TRACESAGE_START_SERVER=false captures traces in prod without running the in-process UI.
  • Developer ergonomics. with tracesage.trace() (sync), async with TraceSage.session(install=True), tracesage.start() background runner, a global LangChain handler (no callbacks= wiring needed), console + Jupyter renderers, and an auto-registered tracesage_capture pytest fixture.
  • CLI. serve, export, import, stats, runs, gc, version, doctor, plus developer commands demo, show, watch, diff, view, and serve --open.
  • 30-app before/after gallery. examples/showcase/ covers customer support, RAG, multi-agent, MCP, reasoning loops, and finance/legal/insurance verticals.

Production safety

  • Hard fail-stop when binding non-loopback addresses without an auth_token.
  • Bearer-token HTTP auth (constant-time comparison; /api/health exempt), CORS preflight handled correctly, WebSocket auth via query param or subprotocol.
  • Path-traversal guards on blob read and write, per-run event cap + root-level sampling, bounded LRU eviction on internal maps (no leaks in long runs), and queue.join() waits for full persistence.

Install

pip install tracesage[langchain]        # core + LangChain adapter
pip install 'tracesage[mcp]'            # + MCP tool-source attribution

Requires Python 3.11+. tracesage is provider-agnostic (OpenAI / Anthropic / local models all traced via LangChain's callback stream).

Known limitations

Centralized multi-producer mode, OpenInference / OpenTelemetry export, cost tracking + PII redaction, and CrewAI / AutoGen / LlamaIndex adapters are planned for future releases.

📖 Full docs: https://kjgpta.github.io/tracesage/ · 📋 Changelog