Skip to main content
The braintrust-langchain package has been deprecated. The LangChain integration is now included in the main braintrust package. Please use pip install braintrust instead.

Migration

Update your installation and imports:
pip install braintrust
# Before (deprecated)
from braintrust_langchain import BraintrustCallbackHandler, set_global_handler

# After (option 1: auto-instrument)
import braintrust
braintrust.auto_instrument()

# After (option 2: explicit)
from braintrust.integrations.langchain import BraintrustCallbackHandler, set_global_handler
For the full integration guide, see LangChain integration.

Source Code

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