# langchain-ai/langchain SLOC report

> As of 2026-09-21 (commit 4af7ab8fcb98), langchain-ai/langchain contains 248,136 total lines: 203,269 code, 15,054 comments, 29,813 blank, across 1,916 files in 9 languages (top: Python 97.8%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

langchain-ai/langchain has 203,269 source lines of code out of 248,136 total lines across 1,916 files, counted from the master ref at commit 4af7ab8fcb98 by the OctoCounts tokei engine on 2026-09-21. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving langchain-ai/langchain to commit 4af7ab8fcb98, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a large codebase by counted code lines. Code represents 81.9% of all lines, comments represent 6.1%, and the repository averages 106 code lines per file. Python accounts for 97.8% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Python | 1,773 | 232,067 | 198,710 | 7,787 | 25,570 |
| TOML | 30 | 3,367 | 2,904 | 45 | 418 |
| Makefile | 24 | 1,793 | 1,167 | 235 | 391 |
| Shell | 22 | 573 | 311 | 157 | 105 |
| XSL | 2 | 228 | 140 | 53 | 35 |
| Dockerfile | 1 | 43 | 27 | 6 | 10 |
| JSON | 1 | 10 | 10 | 0 | 0 |
| Markdown | 54 | 9,960 | 0 | 6,696 | 3,264 |
| Plain Text | 9 | 95 | 0 | 75 | 20 |

Top language (Python 97.8%). Generated at 2026-09-21T09:07:38.000815154+00:00. Canonical report: https://octocounts.com/github/langchain-ai/langchain

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/langchain-ai/langchain/commit/4af7ab8fcb98c2dc211d9e34cddedffa23eba4d9?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does langchain-ai/langchain have?

langchain-ai/langchain has 248,136 total lines, including 203,269 code lines, 15,054 comment lines, and 29,813 blank lines.

### How was the langchain-ai/langchain line count measured?

OctoCounts resolved the public GitHub repository to commit 4af7ab8fcb98, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for langchain-ai/langchain?

This OctoCounts report was generated from master at commit 4af7ab8fcb98 on 2026-09-21T09:07:38.000815154+00:00.

## Similar repository reports

- [rommapp/romm](https://octocounts.com/github/rommapp/romm) — Python, 203,247 code lines
- [HKUDS/CLI-Anything](https://octocounts.com/github/HKUDS/CLI-Anything) — Python, 204,046 code lines
- [gradio-app/gradio](https://octocounts.com/github/gradio-app/gradio) — Python, 204,933 code lines
- [gptme/gptme](https://octocounts.com/github/gptme/gptme) — Python, 200,777 code lines
- [cactus-compute/cactus](https://octocounts.com/github/cactus-compute/cactus) — Python, 205,897 code lines
- [dograh-hq/dograh](https://octocounts.com/github/dograh-hq/dograh) — Python, 199,995 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Django vs Ruby on Rails](https://octocounts.com/compare/django-vs-rails)
- [Laravel vs Django](https://octocounts.com/compare/laravel-vs-django)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
