LangChain vs Mastra
LangChain (LangChain) and Mastra (Mastra) side by side on public data, as of Nov 20, 2026.
LangChain has 11.0x the weekly package downloads of Mastra (41.1M against 3.7M). LangChain has 5.1x the GitHub stars of Mastra (150K against 29.6K). Over the last 30 days downloads moved -3% for LangChain and +50% for Mastra. LangChain shipped 19 stable releases in the past 90 days. Mastra shipped 24 stable releases in the past 90 days.
Which should you choose?
Choose LangChain if
- you prefer the more widely used tool, with more docs and answers around (Gid Score 79 against 63)
Choose Mastra if
- you want the one gaining users faster (downloads up 50% in 30 days, +15% in the last 7)
Built from documented features, official prices, status pages and usage data on this page; it does not judge output quality.
Side-by-side numbers
| Metric | LangChain | Mastra |
|---|---|---|
| Gid Score | 79 | 63 |
| Usage data as of | Nov 19 | Nov 19 |
| Rank by Gid Score | #1 | #5 |
| Downloads, last 7 days | 41.1M | 3.7M |
| Downloads, 7-day change | up 5.7% | up 14.9% |
| Downloads, 30-day change | down 2.7% | up 49.9% |
| VS Code installs | — | — |
| Marketplace rating | — | — |
| GitHub stars | 150K | 29.6K |
| Homebrew installs, 30 days | — | — |
| Hacker News mentions, 30 days | 66 | 18 |
| Latest stable release | 1.5.2 · 2d ago | 1.84.0 · 2d ago |
| Stable releases, 90 days | 19 | 24 |
| Terminal-Bench (best run) | — | — |
| Price | Free (OSS) | Free (OSS) |
| License | MIT | Apache-2.0 (enterprise features under a separate licence) |
| First released | October 2022 | October 2024 |
| Interfaces | Python library, JavaScript library | TypeScript library |
| Models | — | — |
A dash means there is no public data for that metric as of Nov 20, 2026.
Trends
LangChain
A framework for building LLM applications and agents from composable parts: model integrations, tools, retrievers and prebuilt agent abstractions. Available for Python and JavaScript.
Pricing: LangChain is open source and free to use; you pay only for the models and infrastructure it runs on.
Latest release 1.5.2:
- Changes since langchain==1.5.1
- release(langchain): 1.5.2 feat(langchain): tag synthetic HITL tool messages with source metadata
Mastra
A TypeScript framework for building agents and AI workflows, with memory, evals, retrieval and observability built in.
Pricing: Mastra is open source and free to use; you pay only for the models and infrastructure it runs on.
Latest release 1.84.0:
- Knowledge alpha scope matching changed: $param now matches exactly one segment; raw : is no longer allowed inside a scope segment, requiring canonical encoding via encodeKnowledgeScopeId /…
- @mastra/factory: newestOpenPullRequestNumber is no longer exported from @mastra/factory/boards; use workingPullRequest(item) + pullRequestSourceNumber.
- @mastra/playground-ui: ListSearch and SearchFieldBlock are removed; migrate to SearchInput. Also removed SectionCard and CardHeading in favor of settings components.
- @mastra/factory: MastraFactory no longer accepts intake: { evaluator } (set via env/project config instead); passing it now throws at startup.
LangChain vs Mastra: common questions
Which is more popular, LangChain or Mastra?
LangChain has a Gid Score of 79 against 63 for Mastra. The score combines package downloads, editor installs, GitHub activity and attention, updated daily.