Introduction
LangChain is a framework for developing applications powered by language models. It enables applications that are:
- Data-aware: connect a language model to other sources of data
- Agentic: allow a language model to interact with its environment
The main value props of LangChain are:
- Components: abstractions for working with language models, along with a collection of implementations for each abstraction. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not
- Off-the-shelf chains: a structured assembly of components for accomplishing specific higher-level tasks
Off-the-shelf chains make it easy to get started. For more complex applications and nuanced use-cases, components make it easy to customize existing chains or build new ones.
Get startedβ
Hereβs how to install LangChain, set up your environment, and start building.
We recommend following our Quickstart guide to familiarize yourself with the framework by building your first LangChain application.
Note: These docs are for the LangChain JS/TS package. For documentation on the Python version, head here.
Modulesβ
LangChain provides standard, extendable interfaces and external integrations for the following modules, listed from least to most complex:
Model I/Oβ
Interface with language models
Data connectionβ
Interface with application-specific data
Chainsβ
Construct sequences of calls
Agentsβ
Let chains choose which tools to use given high-level directives
Memoryβ
Persist application state between runs of a chain
Callbacksβ
Log and stream intermediate steps of any chain
Examples, ecosystem, and resourcesβ
Use casesβ
Walkthroughs and best-practices for common end-to-end use cases, like:
Additional resourcesβ
Our community is full of prolific developers, creative builders, and fantastic teachers. Check out the Gallery for a list of awesome LangChain projects, compiled by the folks at KyroLabs.
Support
Join us on GitHub or Discord to ask questions, share feedback, meet other developers building with LangChain, and dream about the future of LLMβs.