Introduction
LangChain is a framework for developing applications powered by large language models (LLMs).
LangChain simplifies every stage of the LLM application lifecycle:
- Development: Build your applications using LangChain's open-source building blocks and components. Hit the ground running using third-party integrations and Templates.
- Productionization: Use LangSmith to inspect, monitor and evaluate your chains, so that you can continuously optimize and deploy with confidence.
- Deployment: Turn any chain into an API with LangServe.
Concretely, the framework consists of the following open-source libraries:
langchain-core
: Base abstractions and LangChain Expression Language.langchain-community
: Third party integrations.- Partner packages (e.g.
langchain-openai
,langchain-anthropic
, etc.): Some integrations have been further split into their own lightweight packages that only depend onlangchain-core
.
- Partner packages (e.g.
langchain
: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.- langgraph: Build robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph.
- langserve: Deploy LangChain chains as REST APIs.
- LangSmith: A developer platform that lets you debug, test, evaluate, and monitor LLM applications.
These docs focus on the Python LangChain library. Head here for docs on the JavaScript LangChain library.
Tutorialsโ
If you're looking to build something specific or are more of a hands-on learner, check out our tutorials. This is the best place to get started.
These are the best ones to get started with:
Explore the full list of tutorials here.
How-To Guidesโ
Here youโll find short answers to โHow do Iโฆ.?โ types of questions. These how-to guides donโt cover topics in depth โ youโll find that material in the Tutorials and the API Reference. However, these guides will help you quickly accomplish common tasks.
Conceptual Guideโ
Introductions to all the key parts of LangChain youโll need to know! Here you'll find high level explanations of all LangChain concepts.
API referenceโ
Head to the reference section for full documentation of all classes and methods in the LangChain Python packages.
Ecosystemโ
๐ฆ๐ ๏ธ LangSmithโ
Trace and evaluate your language model applications and intelligent agents to help you move from prototype to production.
๐ฆ๐ธ๏ธ LangGraphโ
Build stateful, multi-actor applications with LLMs, built on top of (and intended to be used with) LangChain primitives.
๐ฆ๐ LangServeโ
Deploy LangChain runnables and chains as REST APIs.
Additional resourcesโ
Securityโ
Read up on our Security best practices to make sure you're developing safely with LangChain.
Integrationsโ
LangChain is part of a rich ecosystem of tools that integrate with our framework and build on top of it. Check out our growing list of integrations.
Contributingโ
Check out the developer's guide for guidelines on contributing and help getting your dev environment set up.