Skip to main content
@braintrust/langchain-js is deprecated as of v0.2.5 and will receive no further updates. Use auto-instrumentation to trace LangChain calls without changing your application code, or import BraintrustLangChainCallbackHandler from braintrust and attach it to each call yourself. See the LangChain integration guide for setup examples. setGlobalHandler has no direct replacement.
The @braintrust/langchain-js package provides integration between Braintrust and LangChain.js.

Installation

Quick start

API Reference

Functions

setGlobalHandler

setGlobalHandler function. Deprecated, with no direct replacement. Use auto-instrumentation or pass the callback handler explicitly.

Classes

BraintrustCallbackHandler

A Braintrust tracer for LangChain.js that logs LLM calls, chains, and tools.

Source Code

For the complete source code and additional examples, visit the Braintrust JavaScript SDK repository.