LangChain is a Python library for building applications and agents on top of language models. Its core is a set of standard interfaces: a chat model, an embedding model, a vector store, a retriever, a tool, so that switching from OpenAI to Anthropic to a local Ollama model is a one-line change (init_chat_model("provider:model")). Around that sit a create_agent helper, middleware, structured output, and separate partner packages for each provider that are released on their own schedule.
It earns its place as the reference point everything else is measured against: most tutorials, most agent frameworks and many of the tools on this list either use LangChain or explain how they differ from it. The repository is a monorepo of the core, the main langchain package, text splitters, a shared test suite and more than a dozen partner integrations. It is MIT-licensed, built by LangChain Inc. with more than 3,700 contributors, and sits next to LangGraph (low-level agent orchestration) and LangSmith (paid tracing and evaluation).
- Repository: github.com/langchain-ai/langchain
- Licence: MIT (MIT License)
- Language: Python. Stars: 147.1K. Forks: 24.6K. Last push: Sep 26, 2026.
- Scan: safe, Sep 25, 2026, commit 80b7409
Who it is for
Python developers building LLM features who want to stay free to swap models, teams standardizing how several apps call models and tools, and anyone following a tutorial that assumes it.
Getting started
1. Add LangChain to a project (pip install langchain also works)
uv add langchain2. Add the provider package for the model you will call, OpenAI here
uv add langchain-openai3. Call a model through the common interface (set OPENAI_API_KEY first)
uv run python -c "from langchain.chat_models import init_chat_model; print(init_chat_model('openai:gpt-5.5').invoke('Hello, world!').content)"Safety scan
We cloned langchain-ai/langchain at commit 80b7409 on Sep 25, 2026 and ran the checks described on the GitHub Tools page: credential patterns, decode-and-execute code, install-time scripts, committed binaries, risky CI workflows, every host the code talks to, known vulnerabilities in pinned dependencies, and project hygiene. A person read every hit. This is what we found.
- One secret-shaped string, a placeholder Slack webhook (XXX in place of the token) in the SSRF-protection tests. No self-decoding code and no bare-IP URLs.
- Three pattern hits, all tests: webhook.site URLs used to check that outbound requests are validated, and a long recorded response in the Anthropic integration tests.
- No install hooks, no installer scripts. The one binary is fake.odt, an 8.9 KB OpenDocument file used as a test input for a document loader; the scanner calls it a JAR because both are zip archives.
- Known advisories: 8 across 677 packages in 22 lockfiles, which pin each package's development environment. The two criticals and two of the highs are chromadb in the Chroma partner package, and they concern Chroma's HTTP server, which you only run if you choose Chroma and host it yourself. Core has one high.
- 27 workflows, all 14 third-party actions pinned to a commit. Three use pull_request_target (fork guard, labeler, issue-link check) and none checks out the pull request. Dependabot on; no security policy file or CodeQL in the repository. OpenSSF Scorecard 5.6 of 10.
What the scanner counted
| Check | Result |
|---|---|
| Secrets | 1 candidate found and read; see the notes above. |
| Suspicious code | 3 pattern hits found and read; every one is listed under the raw findings. |
| Install-time code | None: nothing runs at install beyond the package manager itself. |
| Committed binaries | 1 executable or compiled object committed; listed under the raw findings. |
| CI workflows | 27 workflows. 3 use pull_request_target, none check out the pull request head. 0 of 14 third-party actions pinned to a tag rather than a commit. |
| Network hosts | 40 distinct hosts referenced from source; most often docs.langchain.com, github.com, foobar.com, platform.openai.com. No URLs to bare IP addresses. |
| Known vulnerabilities | 8 advisories across 677 pinned packages: 2 critical, 6 high, 0 moderate, 0 low. libs/core/uv.lock: 160 packages, 1 advisories; libs/langchain/uv.lock: 283 packages, 2 advisories; libs/langchain_v1/uv.lock: 231 packages, 0 advisories; libs/model-profiles/uv.lock: 69 packages, 0 advisories; libs/partners/anthropic/uv.lock: 89 packages, 0 advisories; libs/partners/chroma/uv.lock: 130 packages, 5 advisories; libs/partners/deepseek/uv.lock: 75 packages, 0 advisories; libs/partners/exa/uv.lock: 74 packages, 0 advisories; libs/partners/fireworks/uv.lock: 90 packages, 0 advisories; libs/partners/groq/uv.lock: 69 packages, 0 advisories; libs/partners/huggingface/uv.lock: 170 packages, 1 advisories; libs/partners/mistralai/uv.lock: 72 packages, 0 advisories; libs/partners/nomic/uv.lock: 85 packages, 1 advisories; libs/partners/ollama/uv.lock: 61 packages, 0 advisories; libs/partners/openai/uv.lock: 105 packages, 0 advisories; libs/partners/openrouter/uv.lock: 67 packages, 0 advisories; libs/partners/perplexity/uv.lock: 78 packages, 0 advisories; libs/partners/qdrant/uv.lock: 96 packages, 0 advisories; libs/partners/typesafe/uv.lock: 75 packages, 0 advisories; libs/partners/xai/uv.lock: 90 packages, 0 advisories; libs/standard-tests/uv.lock: 60 packages, 0 advisories; libs/text-splitters/uv.lock: 206 packages, 3 advisories. |
| Project hygiene | Has automated dependency updates, licence file. Missing security policy, CodeQL, contributing guide. |
| OpenSSF Scorecard | 5.6 out of 10, as of Sep 21, 2026. |
The raw findings
Every hit the scanner wrote out, with a link to the exact line at the scanned commit. Secrets candidates are redacted.
Secret candidates (1, redacted)
| Where | Rule | Match |
|---|---|---|
| libs/core/tests/unit_tests/test_ssrf_protection.py:221 | slack-webhook | hooks.…XXX (65 chars) |
Pattern hits (3)
| Where | Rule | Match |
|---|---|---|
| libs/core/tests/unit_tests/test_ssrf_protection.py:232 | exfil-host (test/example) | url = "https://webhook.site/unique-id" |
| libs/core/tests/unit_tests/test_ssrf_protection.py:237 | exfil-host (test/example) | url = "https://abc123.ngrok.io/webhook" |
| libs/partners/anthropic/tests/integration_tests/test_chat_models.py:418 | very-long-line | 8159 chars |
Committed binaries (1)
libs/langchain/tests/integration_tests/examples/fake.odt: JAR, 9 KB
Worst known vulnerabilities (8 of 8)
| Advisory | Severity | Package | Summary |
|---|---|---|---|
| GHSA-36p7-vc44-83pf | critical | chromadb@1.5.9 | ChromaDB has a code injection vulnerability |
| GHSA-f4j7-r4q5-qw2c | critical | chromadb@1.5.9 | ChromaDB Python project has a pre-authentication code injection vulnerability |
| GHSA-c3mw-737p-c7g2 | high | jupyter-server@2.20.0 | Jupyter Server: 5xx request logging leaks token-bearing Referer header values |
| GHSA-47fr-3ffg-hgmw | high | click@8.3.0 | |
| GHSA-2wm9-hf6c-p5cr | high | chromadb@1.5.9 | ChromaDB allows any authenticated users to arbitrarily read, write, update, or delete data in any tenant's collection |
| GHSA-xph7-9rjv-w5fr | high | chromadb@1.5.9 | ChromaDB's SimpleRBACAuthorizationProvider doesn't check which tenant, database, or collection a permission applies to |
| GHSA-47fr-3ffg-hgmw | high | click@8.3.1 | |
| GHSA-8mgp-746c-j5xp | high | nltk@3.10.3 | NLTK: Model-artifact APIs bypass pathsec and touch files outside allowed roots |
Workflows worth a look
- .github/workflows/block_fork_main_prs.yml: pull_request_target
- .github/workflows/pr_labeler.yml: pull_request_target
- .github/workflows/require_issue_link.yml: pull_request_target
By the numbers
| Stars | 147.1K |
|---|---|
| Forks | 24.6K |
| Contributors | 3,741 |
| Commits | 16.9K |
| Open issues | 467 |
| Open pull requests | 101 |
| Releases | 1,372 |
| Latest release | langchain-core==1.6.5 |
| Licence | MIT |
| Main language | Python |
| Project age | 3 years |
| Last push | Sep 26, 2026 |
| Tracked files | 3,165 |
| Lines of code | 452.8K |
| Checkout size | 44 MB |
Lines by language: Python 416.2K, Markdown 14.8K, JSON 10.6K, YAML 6,891, TOML 3,417, Shell 595.
Questions
Is LangChain free?
Yes. LangChain is MIT-licensed and free for any use, including commercial products. The company's paid products sit beside it rather than inside it: LangSmith for tracing, evaluation and deployment. Nothing in the library requires a LangSmith account, and tracing stays off unless you set its environment variables.
What is the difference between LangChain and LangGraph?
LangChain gives you the building blocks and a ready-made agent loop; LangGraph is the lower-level runtime for agents as explicit graphs, with durable state, branching, human approval steps and resumable runs. LangChain's create_agent is built on LangGraph, so you can start with LangChain and drop down to LangGraph when you need precise control.
Does LangChain work with local models?
Yes. The langchain-ollama partner package lives in this repository, and any OpenAI-compatible server (llama.cpp, vLLM, LM Studio) works through langchain-openai with a custom base URL. The same agent code then runs against a local or hosted model by changing only the model string.
This post is part of GitHub Tools, where every repository is cloned and scanned before it is written up. The scan is a snapshot of one commit on one day; the repository has moved on since, so check it before you install.
