Welcome to the LangChain Ecosystem
The LangChain ecosystem provides a modular framework for building applications powered by large language models (LLMs). This guide provides a comprehensive overview of the different packages, integrations, and installation methods available, allowing you to choose exactly which pieces of functionality to install for your specific needs.
Whether you're a seasoned developer or just starting out, LangChain offers flexibility and power. This guide will help you navigate the ecosystem, integrate with your favorite LLM providers like OpenAI and Anthropic, and explore experimental features to stay ahead of the curve.
Core LangChain Packages: Building Blocks
The LangChain ecosystem is structured into distinct packages, allowing you to select and install only the dependencies you need. The main package acts as a starting point. However, the true power of LangChain lies in its integrations with various model providers, datastores, and other tools.
The core package, langchain, provides the base abstractions that the rest of the LangChain ecosystem uses, along with the LangChain Expression Language (LCEL). Install it using pip install langchain.
Integrations Connecting with Providers
To leverage the power of LangChain, you will need to install packages for specific integrations, such as OpenAI, Anthropic, and others. These packages are often maintained separately and offer specialized functionality for each provider.
You can find a list of all integration packages in the API reference under the 'Partner libs' dropdown. Install them using pip install [package-name]. For instance, install the OpenAI integration with pip install langchain-openai.
Experimental Pushing the Boundaries
The langchain-experimental package houses cutting-edge, experimental code, designed for research and experimentation. Install it using pip install langchain-experimental to explore new features and contribute to the LangChain ecosystem.
Be aware that experimental packages may be subject to change.
“LangChain empowers developers to build sophisticated LLM-powered applications with modularity and ease.
LangChain Team
Explore LangChain's Power
Get hands-on with the LangChain ecosystem!
Interactive Installation Demo
Step-by-step installation guide with code examples.
Code Examples
Explore code snippets for common use cases like OpenAI integration and building agents.
Ecosystem Map
Visualize the dependencies between packages for clarity.
Other Essential LangChain Components
Beyond the core and integration packages, several other components play a crucial role in the LangChain ecosystem:
- LangGraph: a library for building stateful, multi-actor applications with LLMs. Install with pip install langgraph.
- LangServe: Helps deploy LangChain runnables and chains as a REST API. Install client and server dependencies with pip install 'langchain[serve]' or use the LangChain CLI.
- LangChain CLI: Useful for working with LangChain templates and other LangServe projects. Install with pip install langchain-cli.
- LangSmith SDK: Automatically installed by LangChain, but can be used independently. Install with pip install langsmith.
From Source Installation
To install a package from source, clone the main LangChain repository, navigate to the package's directory, and run the installation command.
For instance: git clone https://github.com/langchain-ai/langchain.git && cd langchain/libs/langchain && pip install -e .. Note that some packages like LangGraph and LangSmith SDK live outside the main LangChain repo; find their respective repositories for source installation instructions.