Architecture of langchain-ai/langchain
langchain-ai/langchain is 2,965 source files holding 20,598 symbols across 2 modules, written mainly in Python, Makefile, Shell. The largest module is libs, with 2,669 files, and 23 files are entry points into the dependency graph.
How langchain fits together
Applications are assembled from components that LangChain provides, such as chat models, embeddings and vector stores, behind a shared interface. The core package is exposed through libs/core/langchain_core/__init__.py, which serves as its entry point, and its metadata is declared in libs/core/pyproject.toml. The libs/langchain_v1/langchain/__init__.py file is the entry point of the langchain package that the Quickstart imports from. Provider integrations live in separate packages, for example libs/partners/openai/langchain_openai/chat_models/base.py implements the OpenAI chat model integration. The libs/langchain/langchain_classic/__init__.py file is the entry point of the older langchain_classic package.
Largest modules
- libs: 2,669 files and 325,642 lines of code
- .github: 9 files and 1,448 lines of code
Languages
By file count: Python 2,630 files, Makefile 24 files, Shell 22 files, JavaScript 2 files.
Documentation
Repowise documents langchain in 2,182 pages generated from the source.
More on langchain: summary and FAQ, codebase overview, code health.