langgraph-agent). It creates one owned Lemma trace per graph invocation,
records graph nodes as nested child spans, model calls as generations, tools as
tool calls, extracts current-turn input from graph message state, and preserves
parent run IDs with orphan-safe fallback.
You do not need to wrap graph calls in lemma.trace(). Pass the callback
handler through the graph invoke config.
TypeScript
Install LangGraph and the Lemma SDK:langGraph() in the graph invoke config:
Python
Install the optional extra:langgraph() in the graph invoke config:
What Lemma records
langGraph() / langgraph() is an explicit LangChain-callback adapter — LangGraph
emits LangChain callback events; Lemma does not use a separate LangGraph tracer.
Prompts, tool inputs, outputs, model output text, and error messages are always
recorded. Redact secrets and sensitive user data before they reach the graph.