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
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.