Integrations / LangChain
To trace LangChain with Tracify, pass the Tracify callback handler in the callbacks list of your chain or agent. Every chain, model call and tool call becomes a span in one trace, with tokens and timing.
Your code
LangChain
Tracify
One run.
Setup
The callback handler lives in an optional part of the Python SDK, so LangChain stays your only extra dependency.
pip install "tracify-sdk[langgraph]"Create a project in Tracify, copy its API key and put it in the environment where your code runs. The SDK reads it from there, so nothing is hard-coded.
export TRACIFY_API_KEY="tracify_sk_live_..."Add it to the callbacks of any runnable: a chain, a retriever, an agent executor or a LangGraph graph. Child steps inherit it, so you only add it once at the top.
import tracify
handler = tracify.langgraph_callback()
result = agent_executor.invoke(
{"input": "Summarize today's failed runs"},
config={"callbacks": [handler]},
)The TypeScript SDK ships a matching handler. It needs no extra LangChain package of its own.
import { TracifyLangGraphHandler } from "tracify-sdk";
const result = await chain.invoke(
{ question: "What changed in the last release?" },
{ callbacks: [new TracifyLangGraphHandler()] },
);Run your code one time, then open the Tracing page of your project. Your chain shows up as a run with its steps in order, plus the tokens, time and any error for each call.
Good to know
LangChain and LangGraph use the same callback system, so this is the same handler as on the LangGraph page. Use that page if you build graphs with several nodes.
Good to know
If you call the chain from inside a Tracify run or step, the chain joins that run instead of starting a new one.
Full details in the documentation. All integrations are listed on the integrations page.
