langchain-ai/langchain
By the numbers
Data collected on 2026-04-30 from the master branch at commit 04e7a55f0b.
Size
The repository contains roughly 355,000 lines of Python across the workspace, split between source and tests.
| Category | Lines | Files |
|---|---|---|
Source (libs/**/*.py excluding tests) |
~209,000 | 1,702 |
Tests (libs/**/tests/**/*.py) |
~145,000 | 768 |
| Total Python | ~354,000 | 2,470 |
The repo holds 21 pyproject.toml files, each defining an independently versioned package with its own uv.lock.
xychart-beta horizontal
title "Source files by package (top 12)"
x-axis ["langchain-classic", "langchain-openai", "langchain-core", "langchain-anthropic", "langchain-huggingface", "langchain-fireworks", "langchain-mistralai", "langchain-groq", "langchain-ollama", "langchain-qdrant", "langchain-perplexity", "langchain (v1)"]
y-axis "Files" 0 --> 1400
bar [1322, 21, 183, 17, 13, 9, 7, 8, 7, 7, 11, 33]Activity
The repo has 15,828 commits since the initial commit on 2022-10-24. 637 commits landed in the last 90 days — roughly 49 commits per week, with feat/, fix/, and chore/ types in roughly equal proportion thanks to dependabot and integration-test automation.
| Window | Commits |
|---|---|
| Total since 2022-10-24 | 15,828 |
| Last 90 days | 637 |
| Last 30 days | ~200 |
Recent monthly commit counts (last 12 months):
| Month | Commits |
|---|---|
| 2025-05 | 198 |
| 2025-06 | 167 |
| 2025-07 | 288 |
| 2025-08 | 163 |
| 2025-09 | 248 |
| 2025-10 | 347 |
| 2025-11 | 141 |
| 2025-12 | 199 |
| 2026-01 | 181 |
| 2026-02 | 195 |
| 2026-03 | 233 |
| 2026-04 | 199 |
Commits in the last 90 days, by package
| Path | Commits |
|---|---|
libs/core/ |
136 |
libs/langchain_v1/ |
100 |
libs/partners/openai/ |
92 |
libs/partners/anthropic/ |
66 |
libs/langchain/ (classic) |
62 |
libs/text-splitters/ |
52 |
libs/model-profiles/ |
44 |
libs/standard-tests/ |
37 |
langchain-core is the busiest area: every change there potentially affects every downstream package.
Bot-attributed commits
Roughly 35% of commits in the history have a noreply or bot author/committer signature (5,579 of 15,827). The bulk of these are dependabot and github-actions[bot] chores, so the figure is a lower bound on automation involvement and not a measure of AI-assisted human contributions.
Contributor diversity
| Metric | Value |
|---|---|
| Unique commit authors | ~3,572 |
| Median commits per author | 1 (long-tail of one-off contributions) |
This is consistent with a popular open-source library — most contributors land a single PR (typically a small integration fix or doc tweak), while a small core team handles the bulk of the framework code.
Complexity
The largest source files in the workspace are concentrated in two areas: the runnables core and partner chat-model implementations.
| File | Approx. lines |
|---|---|
libs/core/langchain_core/runnables/base.py |
~5,800 |
libs/partners/openai/langchain_openai/chat_models.py |
~2,400 |
libs/partners/anthropic/langchain_anthropic/chat_models.py |
~2,200 |
libs/core/langchain_core/messages/utils.py |
~2,200 |
libs/langchain_v1/langchain/agents/factory.py |
~1,875 |
libs/langchain_v1/langchain/agents/middleware/types.py |
~1,700 |
libs/core/langchain_core/messages/content.py |
~1,100 |
libs/langchain_v1/langchain/chat_models/base.py |
~1,000 |
libs/core/langchain_core/language_models/chat_models.py |
~2,500 |
libs/core/langchain_core/language_models/llms.py |
~1,400 |
Test-to-source ratio
Across the workspace:
| Package | Source files | Test files | Ratio |
|---|---|---|---|
langchain-core |
183 | many (tests/{unit,integration,benchmark}) | ~1:1 |
langchain-classic |
1,322 | many | ~0.5:1 |
langchain-openai |
21 | dozens of unit + cassette files | ~3:1 |
langchain-anthropic |
17 | many | ~3:1 |
Partner packages favor a high test-to-source ratio because every model release needs new behavioral tests.
Releases
The repository releases packages independently. Each package's tag namespace is <package>==<version>. The most recent tags include:
langchain==1.2.16
langchain-core==1.3.2
langchain-anthropic==1.4.2
langchain-openai==1.2.1
langchain-perplexity==1.2.0
langchain-fireworks==1.2.0
langchain-text-splitters==1.1.2
langchain-classic==1.0.4
langchain-tests==1.1.7
langchain-huggingface==1.2.2Releases are triggered manually via the _release.yml workflow with working-directory and release-version inputs.
Dependencies
Top runtime dependencies declared in libs/core/pyproject.toml:
langsmith>=0.3.45,<1.0.0pydantic>=2.7.4,<3.0.0tenacity!=8.4.0,>=8.1.0,<10.0.0jsonpatch>=1.33.0,<2.0.0PyYAML>=5.3.0,<7.0.0typing-extensions>=4.7.0,<5.0.0packaging>=23.2.0uuid-utils>=0.12.0,<1.0langchain-protocol>=0.0.10
libs/langchain_v1/pyproject.toml adds only:
langchain-core>=1.3.2,<2.0.0langgraph>=1.1.10,<1.2.0pydantic>=2.7.4,<3.0.0
That's the entire required dependency set for langchain itself — partner packages opt in via optional extras.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.