Architecture
LangChain as a framework consists of a number of packages.
langchain-coreβ
This package contains base abstractions of different components and ways to compose them together. The interfaces for core components like LLMs, vector stores, retrievers and more are defined here. No third party integrations are defined here. The dependencies are kept purposefully very lightweight.
langchainβ
The main langchain
package contains chains, agents, and retrieval strategies that make up an application's cognitive architecture.
These are NOT third party integrations.
All chains, agents, and retrieval strategies here are NOT specific to any one integration, but rather generic across all integrations.
langchain-communityβ
This package contains third party integrations that are maintained by the LangChain community. Key partner packages are separated out (see below). This contains all integrations for various components (LLMs, vector stores, retrievers). All dependencies in this package are optional to keep the package as lightweight as possible.
Partner packagesβ
While the long tail of integrations is in langchain-community
, we split popular integrations into their own packages (e.g. langchain-openai
, langchain-anthropic
, etc). This was done in order to improve support for these important integrations.
For more information see:
- A list LangChain integrations
- The LangChain API Reference where you can find detailed information about the API reference of each partner package.
LangGraphβ
langgraph
is an extension of langchain
aimed at building robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph.
LangGraph exposes high level interfaces for creating common types of agents, as well as a low-level API for composing custom flows.
LangServeβ
A package to deploy LangChain chains as REST APIs. Makes it easy to get a production ready API up and running.
LangServe is designed to primarily deploy simple Runnables and work with well-known primitives in langchain-core.
If you need a deployment option for LangGraph, you should instead be looking at LangGraph Cloud (beta) which will be better suited for deploying LangGraph applications.
For more information, see the LangServe documentation.
LangSmithβ
A developer platform that lets you debug, test, evaluate, and monitor LLM applications.
For more information, see the LangSmith documentation