Repository Structure
If you plan on contributing to LangChain code or documentation, it can be useful to understand the high level structure of the repository.
LangChain is organized as a monorepo that contains multiple packages. You can check out our installation guide for more on how they fit together.
Here's the structure visualized as a tree:
.
âââ cookbook # Tutorials and examples
âââ docs # Contains content for the documentation here: https://python.langchain.com/
âââ libs
â âââ langchain
â â âââ langchain
â â âââ tests/unit_tests # Unit tests (present in each package not shown for brevity)
â â âââ tests/integration_tests # Integration tests (present in each package not shown for brevity)
â âââ community # Third-party integrations
â â âââ langchain-community
â âââ core # Base interfaces for key abstractions
â â âââ langchain-core
â âââ experimental # Experimental components and chains
â â âââ langchain-experimental
| âââ cli # Command line interface
â â âââ langchain-cli
â âââ text-splitters
â â âââ langchain-text-splitters
â âââ standard-tests
â â âââ langchain-standard-tests
â âââ partners
â âââ langchain-partner-1
â âââ langchain-partner-2
â âââ ...
â
âââ templates # A collection of easily deployable reference architectures for a wide variety of tasks.
The root directory also contains the following files:
pyproject.toml
: Dependencies for building docs and linting docs, cookbook.Makefile
: A file that contains shortcuts for building, linting and docs and cookbook.
There are other files in the root directory level, but their presence should be self-explanatory. Feel free to browse around!
Documentationâ
The /docs
directory contains the content for the documentation that is shown
at python.langchain.com and the associated API Reference.
See the documentation guidelines to learn how to contribute to the documentation.
Codeâ
The /libs
directory contains the code for the LangChain packages.
To learn more about how to contribute code see the following guidelines:
- Code: Learn how to develop in the LangChain codebase.
- Integrations: Learn how to contribute to third-party integrations to
langchain-community
or to start a new partner package. - Testing: Guidelines to learn how to write tests for the packages.