LangGraph.js vs Mastra
LangGraph.js and Mastra are both agent frameworks. LangGraph.js is published by LangChain and Mastra by Mastra. On GitHub, Mastra has 29,050 stars and LangGraph.js has 3,370. Both were last active in Oct 2026. The table lines up where they differ (publisher, GitHub stars and weekly downloads) and has the install commands for both. Everything here comes from the listings' public sources and is refreshed daily. LangGraph.js describes itself as: Open-source agent harness from LangChain for building agents with code, with LangSmith for testing and monitoring. Mastra: TypeScript framework for AI agents and apps with graph-based workflows, memory, suspend-and-resume approvals, MCP servers and model routing. Licenses: LangGraph.js MIT, Mastra unknown.
Updated Oct 26, 2026 · Built from catalog data; how we rank and grade
LangGraph.js
LangChain
Open-source agent harness from LangChain for building agents with code, with LangSmith for testing and monitoring.
Mastra
Mastra
TypeScript framework for AI agents and apps with graph-based workflows, memory, suspend-and-resume approvals, MCP servers and model routing.
Who should pick which
- Pick Mastra if you want MCP support built in.
- Mastra has the larger community: 29,050 GitHub stars against 3,370.
From listing data only. We don't pick a winner on security beyond the grades; read how grades work.
Side by side
| Fact | LangGraph.js | Mastra |
|---|---|---|
| Type | Harness | Harness |
| Publisher | LangChain | Mastra |
| License | MIT | License unknown |
| Pricing | Not stated | Not stated |
| Runs | Not stated | Not stated |
| Auth | Not stated | Not stated |
| Hosts supported | Not stated | Not stated |
| Tools | Not listed yet | Not listed yet |
| Security grade | –Security: not graded yet | –Security: not graded yet |
| Freshness grade | AFreshness: A | AFreshness: A |
| GitHub stars | 3,370 | 29,050 |
| Weekly downloads | 2,326,897 | 1,442,185 |
| Last release | Oct 22, 2026 | Oct 21, 2026 |
| Last activity | Oct 22, 2026 | Oct 24, 2026 |
Facts from each listing's public sources, checked daily. Tool lists arrive with tool scans.
Install
LangGraph.js
npm install @langchain/langgraph
Mastra
npm install @mastra/core
Also consider
- 0.867score
Pi Agent Core
Earendil
Minimal TypeScript agent harness with an agent runtime, multi-provider LLM API, terminal UI and coding agent CLI that users extend themselves.
HarnessAFreshness: A★ 117.6K↓ 5.1M/wk - 0.831score
CopilotKit
CopilotKit
Open-source SDK that connects AI agents to app front ends with chat UI, generative UI, shared state and human approvals; creator of the AG-UI protocol.
HarnessAFreshness: A★ 38.2K↓ 286.2K/wk - 0.740score
Deep Agents
LangChain
Opinionated agent harness on LangGraph with sub-agents, filesystem access, context management, persistent memory and approval of tool calls.
HarnessAFreshness: A★ 30.6K↓ 1.9M/wk
Questions
- Is LangGraph.js or Mastra more popular?
- Mastra has more GitHub stars (29,050 against 3,370). Stars measure attention, not quality, so check freshness and docs too.
- Are LangGraph.js and Mastra open source?
- LangGraph.js is open source (MIT); the other is unknown.
Related
- AlternativesAlternatives to LangGraph.js
- AlternativesAlternatives to Mastra
- Best ofBest agent frameworks for building AI agents
- Best ofBest agent frameworks for TypeScript
- ComparisonLangGraph.js vs Pi Agent Core
- ComparisonCopilotKit vs LangGraph.js
- ComparisonDeep Agents vs LangGraph.js
- ComparisonMastra vs Pi Agent Core
- ComparisonCopilotKit vs Mastra
- ComparisonLetta vs Mastra
Cite this page
LangGraph.js vs Mastra. Agent Mart. https://agentmart.dev/compare/langgraph-js-vs-mastra (last updated 2026-10-26)