Skip to main content
Veritrix plugs directly into LangChain and LangGraph with a single initialization call, giving you deep visibility into chains, agents, and stateful graphs without touching your existing application logic. Every LLM invocation, tool call, retriever lookup, and LangGraph node transition is captured as a structured trace and surfaced in the Veritrix dashboard — so you can debug failures, measure latency, and understand exactly how your graph executes at runtime.

Prerequisites

  • Python 3.9 or higher
  • An active Veritrix account and API key
  • LangChain and/or LangGraph installed

Installation & Setup

1

Install Veritrix alongside LangChain

If you are using LangGraph, install it as well:
2

Initialize Veritrix tracing

Call trace.init() once at application startup, before you instantiate any LLM or chain.
3

Use LangChain and LangGraph as normal

Veritrix automatically instruments the LangChain callback system after trace.init(). No custom callbacks or wrappers are required.

Example: LangChain Chain

The following example builds a simple prompt-and-response chain. Veritrix traces the entire chain execution, including each LLM call and its token usage.

Example: LangGraph Stateful Graph

For LangGraph workflows, Veritrix traces each node invocation and the edges traversed between them, giving you a step-by-step view of graph execution.

What Gets Captured Automatically

Veritrix hooks into LangChain’s native callback system under the hood. If you already use custom callbacks (for logging, streaming, etc.), they continue to work alongside Veritrix without conflict.

OpenTelemetry Compatibility

Veritrix is built on OpenTelemetry. Every span generated for your LangChain or LangGraph execution is a standards-compliant OTel span, exportable to any OTel-compatible backend — including collectors you already operate.
To send traces to your own OTel collector or a third-party observability platform, see the OpenTelemetry integration page.