LangChain.js
Reasonable, with limits. 7th of 9 AI SDKs and agent frameworks.
LangChain.js is the TypeScript version of LangChain. Since v1 it centres on `createAgent`, which runs on LangGraph and supports middleware, and it has hundreds of provider and vector-store integrations. It is well funded and very active. However, its downloads are growing more slowly than the category, and independent reviewers usually point TypeScript teams to the AI SDK or Mastra first.
Best for: Teams already on the LangChain/LangGraph/LangSmith stack, or teams that need its wide range of model, retriever and vector-store integrations in TypeScript.
Scores
Overall6.8
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is a capable, well-funded and very active framework, and its integrations are the best in JS. For most new TypeScript projects, though, the AI SDK (or Mastra for agents) is simpler and growing faster. Teams that want LangChain's agent runtime can also use LangGraph.js directly. LangChain.js is a reasonable choice for teams invested in the LangChain stack, but not the category default. The range reflects how much v1 improves things and the TS-versus-Python lag.
- npm downloads ratio: about 3.3x growth, below the 4.1 median and well below its peers
- andrew.ooo/answers/mastra-vs-langchain-vs-vercel-ai-sdk-typescript-agent-frameworks-2026: 2026 comparison: AI SDK for apps, Mastra for TS agents, LangChain for ecosystem depth
- docs.langchain.com/oss/javascript/releases/langchain-v1: v1 createAgent and middleware modernise the API
- github commitsLastYear: very active maintenance
GPT-6.2 Sol: 7.6, likely 6.5 to 8.6
LangChain.js is a strong pick for a new TypeScript agent that needs provider choice, custom middleware, and a path to persistent state. Vercel AI SDK is easier for straightforward model calls and streaming UI, while Mastra offers a cleaner setup for common agent tasks. Active maintenance and downstream use support the recommendation. Slower relative adoption and uneven behavior across provider integrations keep it from being the default for the whole category.
- docs.langchain.com/oss/javascript/langchain/agents: Documents the agent loop, middleware, provider support, and checkpointing.
- komelin.com/blog/ai-framework-comparison: Current-version comparison favors AI SDK for simple calls and Mastra for tool setup.
- github.com/langchain-ai/langchainjs/releases/tag/langchain@1.6.7: Current stable release shows ongoing fixes in the main package.
- github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/package.json: An established automation platform ships the JavaScript package.
- github.com/langchain-ai/langchainjs/issues/11074: User report illustrates a remaining streaming compatibility concern.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, and medianDownloadsRatio: Download growth of 3.3× falls below the catalog's 4.1× baseline.
Needed by many5.6
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Calling models and building agents is now a common job in JS/TS apps, so the category is broad. LangChain.js covers the full range, from model calls to RAG to agents, on Node and other runtimes. Its heavier, framework-style approach fits fewer projects than a thin SDK does.
- wearedevelopers.com/magazine/581-the-state-of-webdev-ai-2025-results-what-can-we-learn: JS/TS are the most popular languages web developers use to work with AI
- docs.langchain.com/oss/javascript/releases/langchain-v1: v1 covers models, tools, agents and middleware in one package
GPT-6.2 Sol: 5.2, likely 4.0 to 6.4
The framework supports multiple model providers and works without tying an application to one web framework. Its middleware and integrations are most valuable to teams shipping AI features with tools, retrieval, or state. Developer surveys give a sense of demand for agent tooling, but they do not measure how many JavaScript projects need a framework of this size.
- docs.langchain.com/oss/javascript/langchain/overview: Shows the provider range and configurable agent API.
- survey.stackoverflow.co/2026/ai/data/ai-select: 26.2% of respondents use agents or automated workflows at work. The question covers use across languages.
Helps a lot6.9
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.5
Version 1 cleaned up the API around createAgent and middleware, and the integration catalogue is unmatched in JS. Reviewers still describe a steep learning curve and a TypeScript port that lags Python. For typical web-app work, the AI SDK and Mastra offer simpler, more TypeScript-native ergonomics. The range is wide because v1 is recent, and opinions about it vary.
- docs.langchain.com/oss/javascript/migrate/langchain-v1: createAgent replaces createReactAgent; legacy code moved to @langchain/classic; Node 22 required
- dev.to/alexcloudstar/ai-agent-frameworks-in-2026-langgraph-vs-mastra-vs-vercel-ai-sdk-vs-openai-agents-sdk-vs-pydantic-539b: TS port works but lags Python on features and docs; steep learning curve; points TS teams to AI SDK or Mastra
- forum.langchain.com/t/langchain-1-0-feedback-wanted/605?page=2: newcomer hit errors following the v1 quickstart
- npm hasTypes: ships its own TypeScript types
GPT-6.2 Sol: 7.8, likely 6.7 to 8.8
Version 1.6.7 has typed tools, structured output, streaming, and middleware, with documented examples for checkpointing. A November comparison found that Vercel AI SDK took less code for simple calls and Mastra made tool setup cleaner. An October benchmark measured higher import overhead than AI SDK on one machine, and users report provider-specific streaming problems. Current TypeScript examples give coding agents a clear starting point, though their implementation accuracy remains unmeasured.
- github.com/langchain-ai/langchainjs/releases/tag/langchain@1.6.7: Confirms the stable version and recent fixes to model configuration and approval middleware.
- docs.langchain.com/oss/javascript/langchain/agents: Documents typed tools, structured output, middleware, streaming, and state.
- komelin.com/blog/ai-framework-comparison: November tests of LangChain.js 1.6 found more boilerplate and result processing.
- devtoollab.com/blog/langchain-alternatives: One October test measured 298 ms of import CPU for LangChain.js 1.5.16 and 57 ms for AI SDK.
- github.com/langchain-ai/langchainjs/issues/11074: Open user report describes tool calls dropped during OpenAI-compatible streaming.
Holds up over time7.9
Will it still be a good choice in two years?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
The project is very active, with 1,301 commits, 962 releases and 88 versions of the main package in a year. It is funded by LangChain Inc. and has more than 1,100 contributors. The main risks are its record of large breaking reorganisations, and an ecosystem that is shifting toward the AI SDK and Mastra for TypeScript. 528 open pull requests also point to a review backlog.
- github commitsLastYear: 1,301 commits in the last year
- github releasesLastYear: 962 releases across packages
- github openPullRequests: 528 open PRs
- LangChain Inc. funding: venture-funded company that maintains LangChain, LangGraph and LangSmith
GPT-6.2 Sol: 8.2, likely 7.0 to 9.2
The main package published 88 versions in the past year, and recent releases credit several contributors. LangChain announced a $300 million funding round in November and still names the framework as part of its agent runtime strategy. The v1 migration moved legacy APIs, and the latest patch changed implicit model switching. Open reports with pending fixes and limited visibility into release permissions leave some uncertainty about support over two years.
- npm versionsLastYear: 88 versions of the main package in the last year.
- github commitsLastYear and releasesLastYear: 1,301 commits and 962 releases across the monorepo.
- langchain.com/blog/series-c: November funding announcement includes LangChain in the runtime strategy.
- docs.langchain.com/oss/javascript/migrate/langchain-v1: Documents changed hooks and imports, the legacy package, and the new Node.js minimum.
- github.com/langchain-ai/langchainjs/releases/tag/langchain@1.6.7: Automated release credits two contributors and changes the default for model overrides.
- github.com/langchain-ai/langchainjs/issues/11762: A late September Azure streaming report remains open with a linked fix.
Used widely5.9
How many use it, and is that growing?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
The package had 16.4M downloads in the last 4 weeks, and ecosyste.ms counts 2,970 dependent repos, more than the AI SDK's count. But its growth ratio of about 3.3x is below the 4.1 median. LangGraph.js (7.2x), the AI SDK (10x) and Mastra (14.6x) are growing much faster, so LangChain.js is losing share. Bluesky attention is very low next to its peers.
- npm downloadsLast4Weeks: 16.4M now vs 5.0M a year ago, a ratio of about 3.3, below the 4.1 median
- dependents repos: 2,970 repos and 216 packages depend on it
- peers downloadsLast4Weeks: AI SDK 180M (10x growth); Mastra 13.4M (14.6x growth)
- bluesky posts: only 4 posts vs 43 for the AI SDK and 60 for Mastra
GPT-6.2 Sol: 5.3, likely 4.0 to 6.7
The collector found 2,970 dependent repositories and 216 packages, with more tracked repositories than Vercel AI SDK. Downloads grew from 5.0 million to 16.4 million over comparable four-week periods, but 3.3× growth fell below the 4.1× catalog baseline and trailed AI SDK, Mastra, and LangGraph.js. The stars cover the whole monorepo, and products such as n8n install LangChain for their users, so the number of projects choosing it directly is uncertain.
- dependents and peers dependentRepos: 2,970 tracked repositories and 216 packages. AI SDK has 2,455 tracked repositories.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio, and peers: 3.30× annual growth versus a 4.1× baseline. AI SDK, Mastra, and LangGraph.js grew faster.
- github stars and bluesky posts: 18,354 monorepo stars and four Bluesky posts linking to the repository.
- github.com/langchain-ai/langchainjs/blob/main/CONTRIBUTING.md: The repository contains the main package, core, provider adapters, and other packages.
- github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/package.json: n8n's AI nodes install the main package and several LangChain integrations.
Vouched for6.8
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
The LangChain brand has wide production use and a large third-party ecosystem, but much of that validation comes from the Python version. Independent 2026 comparisons cite its ecosystem for RAG and agents, but do not make it the default pick for TypeScript. No survey data specific to LangChain.js was found.
- dzone.com/articles/top-js-ts-genai-frameworks-2026: independent 2026 roundup of JS/TS GenAI frameworks
- dev.to/alexcloudstar/ai-agent-frameworks-in-2026-langgraph-vs-mastra-vs-vercel-ai-sdk-vs-openai-agents-sdk-vs-pydantic-539b: credits its ecosystem but recommends other tools for TS
- langchain.com/blog/langchain-state-of-ai-2024: vendor data: JS SDK made up about 15% of LangSmith usage
- hackerNews stories: 106 HN stories; much discussion, including criticism
GPT-6.2 Sol: 7.5, likely 6.4 to 8.6
n8n and Flowise ship LangChain.js in their AI tooling, and Vercel maintains an adapter for using it with AI SDK UI. The 2026 Stack Overflow survey shows strong LangChain use among respondents who answered the orchestration question, but combines languages and measures use. Independent tests confirm that the JavaScript framework handles model and tool calls, with mixed results on ease of use and overhead.
- github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/package.json: n8n declares the main package, core, and provider dependencies.
- github.com/FlowiseAI/Flowise/blob/main/packages/components/package.json: Flowise ships the main package and a broad set of integrations.
- ai-sdk.dev/providers/adapters/langchain: Vercel maintains an official streaming adapter for the JavaScript ecosystem.
- survey.stackoverflow.co/2026/ai/data#ai-agent-orchestration-tools: 30.2% of 4,400 respondents to the orchestration question reported using LangChain across languages.
- komelin.com/blog/ai-framework-comparison: Hands-on testing found that the tool loop worked, with more result handling than peers.
Safe6.9
How safe is it to depend on?
Claude Opus 5.5: 6.5, likely 5.5 to 7.5
The project has two advisories: a moderate path traversal in 2024 and a high-severity serialization injection in December 2025 that could leak secrets. The 2025 issue was patched in coordinated releases (@langchain/core 1.1.8, langchain 1.2.3). It has only 4 direct dependencies and an MIT licence. But it has no OpenSSF Scorecard, many packages are published from one monorepo, and agent frameworks carry a large attack surface through prompt-driven tools.
- advisories recent: GHSA-r399-636x-v7f6 HIGH (Dec 2025); GHSA-hc5w-c9f8-9cc4 MODERATE (2024)
- nvd.nist.gov/vuln/detail/CVE-2025-68665: JS serialization injection fixed in @langchain/core 1.1.8 and langchain 1.2.3
- scorecard: no OpenSSF Scorecard available
- npm dependencies: 4 direct dependencies; MIT licence
GPT-6.2 Sol: 7.2, likely 6.0 to 8.4
The MIT-licensed package has four direct dependencies, plus a required core peer and the dependencies of any integrations you install. Both listed main-package vulnerabilities have fixes, and the high-severity serialization fix shipped by public disclosure. GitHub Actions automates releases, and the workflow enables npm provenance while retaining a token-based authentication step. The missing Scorecard and unverified number of authorized publishers widen the range.
- github.com/langchain-ai/langchainjs/blob/langchain@1.6.7/libs/langchain/package.json: MIT license, four direct dependencies, and a required `@langchain/core` peer.
- github.com/advisories/GHSA-r399-636x-v7f6: High-severity JavaScript serialization issue fixed on both the 1.x and 0.3 branches.
- github.com/langchain-ai/langchainjs/releases/tag/langchain@1.2.3: Patch shipped before the December 23, 2025 public advisory.
- github.com/advisories/GHSA-hc5w-c9f8-9cc4: Moderate path traversal issue fixed in 0.2.19.
- github.com/langchain-ai/langchainjs/blob/langchain@1.6.7/.github/workflows/publish.yml: Changesets workflow enables provenance and includes npm token authentication.
- scorecard: No OpenSSF Scorecard result in the bundle.
Good
- It has the widest set of integrations in JS: model providers, vector stores, retrievers and document loaders, all behind shared interfaces.
- The v1 createAgent API with middleware (summarization, human-in-the-loop, PII redaction) is simpler than the older chains and runs on durable LangGraph execution.
- It is backed by a funded company, with about 1,300 commits and hundreds of package releases in the last year.
- It plugs straight into LangSmith for tracing and evals, and into LangGraph for more complex agent graphs.
Bad
- Its layers of abstraction and its own mental model make it heavier than the AI SDK for simple model calls and streaming UIs.
- The TypeScript port is widely reported to lag the Python version in features and documentation.
- It has a history of breaking reorganisations (0.x to 1.0, legacy code moved to @langchain/classic), and v1 requires Node 22 or newer.
- A high-severity serialization injection advisory (CVE-2025-68665) was published in December 2025, and the project has no OpenSSF Scorecard.
The numbers
- npm downloads, 4 weeks
- 16M ×3.3 in a year
- GitHub stars
- 18k
- Commits, 12 months
- 1.3k
- npm version
- 1.6.7 Nov 2026
- Versions, 12 months
- 88
- Advisories, 24 months
- 1 of 2 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (langchain-ai/langchainjs), npm (langchain), OSV and the OpenSSF Scorecard.
AI SDKs and agent frameworks
- 9.0AI SDK
- 7.9OpenAI SDK
- 7.8Anthropic SDK
- 7.7Mastra
- 7.5LangGraph.js
- 7.4OpenAI Agents SDK
- 6.8LangChain.js
- 6.7Genkit
- 1.5LlamaIndex.TS