LangChain architecture.
LangChain is a Python framework for building LLM applications and agents. Nodeway mapped the langchain-ai/langchain repository at commit fbe2695, from 28 November 2026, and found 1,811 source files, 7,408 functions, classes and components and 1 database table. This page is drawn from that map.
- Source files
- 1,811
- Functions and classes
- 7,408
- Confirmed calls
- 11,204
- Routes
- 0
- Tables
- 1
How the code is laid out
Most of it is Python: 1,788 files of 1,811, followed by Shell (22) and JavaScript (1).
The repository is split into 127 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are libs/langchain (1,312 files), libs/langchain/langchain_classic (1,310 files), libs/core (191 files), libs/core/langchain_core (188 files), libs/langchain/langchain_classic/tools (177 files) and libs/langchain/langchain_classic/document_loaders (166 files).
These are its top-level folders by number of source files. The biggest ones show their own largest folders underneath.
- libs/1,806 files1 table
- langchain/package1,312 files1 table
- partners/201 files
- core/package191 files
- langchain_v1/package60 files
- standard-tests/package23 files
- text-splitters/package15 files
- .github/scripts/5 files
Where the code starts
Nodeway looked for files that define a main function, and for files named like a starting point (main, server, app, cli and similar) that at most one other file imports, then for index files that nothing imports. Ranked that way, then by how many files each one reaches through its imports:
| File | Reaches |
|---|---|
| libs/langchain/langchain_classic/tools/ainetwork/app.py | 10 files |
| libs/model-profiles/langchain_model_profiles/cli.pydefines main | 2 files |
| .github/scripts/check_extras_sync.pydefines main | – |
| libs/core/scripts/check_version.pydefines main | – |
Data model
Nodeway found 1 database table, defined with SQLAlchemy. Code in the repository reads or writes 1 of them. The most used:
| Table | Used by |
|---|---|
| upsertion_record5 columns · libs/langchain/langchain_classic/indexes/_sql_record_manager.py | 5 read1 write |
The most-called code
Ranked by how many different functions call each one, counting only calls the analyzer could confirm from the code. These are often the helpers worth reading first.
| Function | Callers |
|---|---|
| create_importerfunction · libs/langchain/langchain_classic/_api/module_import.py | 830 |
| sandbox_pathmethod · libs/standard-tests/langchain_tests/integration_tests/sandboxes.py | 81 |
| deprecatedfunction · libs/core/langchain_core/_api/deprecation.py | 80 |
| run_in_executorfunction · libs/core/langchain_core/runnables/config.py | 65 |
| ensure_configfunction · libs/core/langchain_core/runnables/config.py | 63 |
| invokemethod · libs/core/langchain_core/language_models/chat_models.py | 58 |
| invokemethod · libs/core/langchain_core/retrievers.py | 50 |
| invokemethod · libs/langchain/langchain_classic/retrievers/ensemble.py | 49 |
Open this repo in Nodeway
Nodeway is a desktop app that draws this map on your own computer, so you can click into any folder, read the code beside the map and trace a request yourself. Clone the repository:
git clone https://github.com/langchain-ai/langchain.git- Install Nodeway for macOS, Windows or Linux: the getting started guide has every installer.
- Open the cloned folder. The first map is drawn on your machine and nothing is uploaded.
- Search for
create_importerand trace what it calls, or pick a route and follow it to the database.
New to reading a codebase this size? See how to understand a large codebase and how to read a call graph.
Questions
What language is LangChain written in?
Mostly Python: 1,788 of its 1,811 source files at commit fbe2695, then Shell with 22.
Where does the LangChain code start?
The entry point that reaches the most code is libs/langchain/langchain_classic/tools/ainetwork/app.py, which leads to 10 files through its imports.
What database tables does LangChain use?
1 table, defined with SQLAlchemy. The most used are upsertion_record.
How this page was made
Generated from a map Nodeway's analyzer (version 18) made of langchain-ai/langchain at commit fbe2695, committed on 28 November 2026. Tests, dependencies and build output are mostly left out. A call counts only when the analyzer could confirm its target from the code, so real totals are higher. The project will have changed since.