> ## 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.2.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>

The `braintrust-langchain` package provides seamless integration between Braintrust and LangChain for Python.

## Installation

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

## Quick start

```python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
from braintrust_langchain import BraintrustCallbackHandler
from langchain_openai import ChatOpenAI

# Create a callback handler
handler = BraintrustCallbackHandler()

# Use with any LangChain model
llm = ChatOpenAI(callbacks=[handler])
```

## API Reference

## Source Code

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