Skip to main content
The LangChain integration installs as a LangChain callback handler. Every chain invoke, every LangGraph node, every tool call inside an AgentExecutor or ReAct loop is captured automatically.

Install

pip install decimalai

Use

import decimalai
decimalai.init(api_key="dai_sk_...", langchain=True)

# Or manual install:
from decimalai.langchain import install
install(agent_name="my-chain")

# All LangChain chains and agents are now traced
chain.invoke({"input": "Hello!"})

What gets captured

  • Chain / agent execution with all intermediate steps
  • LLM calls with prompt templates fully resolved (not raw {variable} placeholders)
  • Tool calls from AgentExecutor, ReAct loops, or LangGraph nodes
  • Auto-detected manifest from tool schemas + model config

Framework noise filtering

LangGraph and LangChain emit a lot of internal spans (call_model, should_continue, Prompt, RunnableSequence, etc.). The trace UI auto-collapses these by default; toggle “Show internals” in the waterfall header to reveal them.

Overriding dynamic prompts

If your prompts are built at runtime (not stored in the chain config), pass them to install():
from decimalai.langchain import install

install(
    agent_name="my-chain",
    prompts={"system": "You are an assistant for ACME Corp."},
)

What’s next

Tracing guide

What gets captured at each layer and how to enrich a trace.

Manifests

Auto-detection caveats for LangGraph state graphs.