Installation
Official releaseβ
To install LangChain run:
- npm
- Yarn
- pnpm
npm install langchain
yarn add langchain
pnpm add langchain
This will install the bare minimum requirements of LangChain. A lot of the value of LangChain comes when integrating it with various model providers, datastores, etc. By default, the dependencies needed to do that are NOT installed. You will need to install the dependencies for specific integrations separately.
LangChain coreβ
The @langchain/core
package contains base abstractions that the rest of the LangChain ecosystem uses, along with the LangChain Expression Language.
It is automatically installed by langchain
, but can also be used separately. Install with:
- npm
- Yarn
- pnpm
npm install @langchain/core
yarn add @langchain/core
pnpm add @langchain/core
LangChain communityβ
The @langchain/community
package contains third-party integrations.
It is automatically installed by langchain
, but can also be used separately. Install with:
- npm
- Yarn
- pnpm
npm install @langchain/community
yarn add @langchain/community
pnpm add @langchain/community
@langchain/community
will be removed as a dependency of langchain
in version 0.2.0
.
LangGraphβ
langgraph
is a library for building stateful, multi-actor applications with LLMs, built on top of (and intended to be used with) LangChain.
Install with:
- npm
- Yarn
- pnpm
npm install @langchain/langgraph
yarn add @langchain/langgraph
pnpm add @langchain/langgraph
LangSmith SDKβ
The LangSmith SDK is automatically installed by LangChain. If not using LangChain, install with:
- npm
- Yarn
- pnpm
npm install langsmith
yarn add langsmith
pnpm add langsmith