> ## Documentation Index
> Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LangChain Python Integration

> Braintrust integration for LangChain Python v0.3.0 (deprecated)

<Warning>
  The `braintrust-langchain` package has been deprecated. The LangChain integration is now included in the main `braintrust` package. Please use `pip install braintrust` instead.
</Warning>

## Migration

Update your installation and imports:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
pip install braintrust
```

```python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
# 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](/integrations/sdk-integrations/langchain).

## Source Code

For the complete source code and additional examples, visit the [Braintrust Python SDK repository](https://github.com/braintrustdata/braintrust-sdk-python).
