Elestia Open Source Ratings
7.7

Mastra

A strong pick. 4th of 9 AI SDKs and agent frameworks.

Mastra is a full TypeScript agent framework built on the Vercel AI SDK. It bundles agents, workflows, memory, RAG, evals and a local studio. It is growing fast and is a strong pick when you want a batteries-included framework rather than a thin model-calling layer. Its June 2026 npm supply-chain compromise is a reason to pin versions and use lockfiles.

Best for: TypeScript teams that want agents, workflows, memory and observability in one integrated framework rather than assembling them on top of the AI SDK.

WebsiteGitHubnpm

Scores

Overall7.7

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

Mastra is the strongest batteries-included agent framework for TypeScript. It is very actively maintained and its adoption is growing fast. The AI SDK stays the safer default for teams that only need model calls, streaming and tools, and LangGraph.js suits complex stateful graphs. The June 2026 supply-chain compromise and the fast-moving API lower the score. Pin versions and commit lockfiles if you adopt it.

GPT-6.2 Sol: 7.9, likely 6.7 to 8.8

Mastra is a strong choice for a new TypeScript agent service that needs memory, approvals, and tracing together. Vercel AI SDK is a better default for simple model calls and streamed chat, and LangGraph.js is worth choosing when explicit graph checkpoints and replay are central. Funded maintenance and confirmed production use support the score, while the recent npm incident and short stable track record keep the range wide.

Needed by many5.4

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 common work in web apps. Mastra's take, a full framework with workflows and memory, serves a subset of that: teams building agents, not those that only need a model call. It runs on Node, serverless and edge-like runtimes, and it is not tied to one UI framework.

GPT-6.2 Sol: 4.8, likely 3.5 to 6.1

Mastra works across model providers and several JavaScript server frameworks. Its integrated stack is most useful when an application needs agent state, orchestration, and debugging. A small production survey found that most teams still call model APIs directly or build their own abstractions, leaving the size of Mastra's audience uncertain.

Helps a lot7.9

How well does it do the job for those who need it?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

Mastra is the most complete TypeScript-native agent framework. It has agents, graph-like workflows, thread-based memory, RAG, evals, tracing and a studio, with good types. Users praise the developer experience and quickstart. Some find its abstractions rigid, and an independent test found that the step limit fails silently. The constant API churn and extra setup compared with the plain AI SDK keep it from the top of the range.

GPT-6.2 Sol: 8.2, likely 7.1 to 9.2

Stable 1.85.0 combines typed tools, memory, resumable workflows, tracing, and evaluations. A hands-on comparison verified that approvals survive a restart with persistent storage, and it measured a larger install and slower imports than both peers tested. A user reported friction with rules-heavy branching. Embedded docs give coding agents a version-matched reference, though their effect on generated-code accuracy remains unmeasured here.

Holds up over time8.0

Will it still be a good choice in two years?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

Activity is very high: 12,453 commits, 98 releases and 702 contributors in a year, with about 7,000 closed issues against 503 open. A venture-funded company (YC) backs it, with a hosted cloud business. The team handled the June 2026 compromise the same day. The main risks are an API that changes very often and dependence on one startup's business model.

GPT-6.2 Sol: 8.0, likely 6.8 to 9.0

Mastra has a funded team and published 101 core versions over the past year. Maintainers closed a reported durable-agent resume bug within six days. The two-year outlook still depends on a young stable API, and the 1.0 migration and recent changes to experimental features show where upgrades can require work.

Used widely6.6

How many use it, and is that growing?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

@mastra/core had 13.4M downloads in 4 weeks, up from 0.92M a year before. That ratio of about 14.6x is far above the 4.1x median. Some downloads come from Mastra's own sub-packages and scaffolding, so real direct choices are lower than the raw count. Its 29.7k stars are the most in the category. It is still well behind the AI SDK and provider SDKs in raw installs, and close to LangChain.js and LangGraph.js.

  • npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 13.4M vs 0.92M a year earlier, about 14.6x growth.
  • medianDownloadsRatio: Median is 4.1x; Mastra is well above it.
  • github stars: 29,714 stars, the most among peers.
  • peers AI SDK downloadsLast4Weeks: AI SDK has about 180M per 4 weeks, an order of magnitude more.

GPT-6.2 Sol: 6.2, likely 4.7 to 7.6

Four-week downloads rose 14.6× year over year, above the catalog's 4.1× median and faster than AI SDK, LangChain.js, and LangGraph.js. AI SDK still has a much larger install base, and Stack Overflow's orchestration survey puts Mastra at 3% versus 9% for Vercel AI SDK. Other Mastra packages and automated installs can drive core downloads, the stars and Bluesky posts cover the whole repository, and the missing dependent count leaves direct adoption hard to size.

  • npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio, and peers: 13.4 million downloads versus 921,257 a year earlier. AI SDK had 180.3 million.
  • dependents, github.stars, and bluesky.posts: No dependent count. About 29,700 stars and 60 Bluesky posts cover the repository.
  • survey.stackoverflow.co/2026/ai/data: 132 of 4,400 orchestration respondents reported using Mastra, versus 395 for Vercel AI SDK.
Vouched for7.1

Who stands behind it being good?

Claude Opus 5.5: 6.5, likely 5.0 to 8.0

Independent write-ups (LogRocket, dev.to comparisons) and well-received Show HN launches treat it as the main TypeScript agent framework. Users report production use, including Brex consolidating on it. Most production logos (PayPal, Adobe, Replit) come from Mastra's own marketing, and no developer survey reports satisfaction data for it yet.

GPT-6.2 Sol: 7.6, likely 6.4 to 8.6

Sanity confirms that its Content Agent uses Mastra, and Brex's CTO described its use in Brex's agent stack. An independent comparison verified that human approvals can resume after a restart with persistent storage. These reports cover specific deployments and tests, so long-term retention and reliability across workloads remain uncertain.

Safe5.3

How safe is it to depend on?

Claude Opus 5.5: 5.0, likely 3.5 to 6.5

On June 17, 2026, an attacker used a former contributor's unrevoked npm access to republish about 142 @mastra packages. The injected dependency's postinstall step dropped a credential stealer and a remote access trojan. Microsoft attributed the attack to a state actor. Mastra rolled clean releases forward within hours, but the incident shows that publish access was weakly controlled, and sources do not confirm that provenance is now required. The package pulls 30 dependencies, there is no Scorecard, and the licence is Apache-2.0, with some enterprise features planned under a separate licence.

GPT-6.2 Sol: 5.5, likely 4.1 to 7.0

A June npm account compromise put malicious code in core 1.42.1. Mastra published clean replacements within hours of detection and removed the ability for publishing tokens to bypass MFA. Core has 30 direct dependencies and uses Apache-2.0, while designated enterprise code requires the Mastra Enterprise License for production use. The missing OpenSSF Scorecard and unverified current count of accounts with publish access widen the range.

Good

  • Agents, workflows, memory, RAG, evals and a local dev studio come in one TypeScript-native package.
  • It is built on the AI SDK, so it works with any model provider and its streams plug into AI SDK UI hooks.
  • Development is very active: about 12,000 commits, 98 releases and 700+ contributors in the last year.
  • Adoption is growing fast: downloads rose about 14.6x year on year, against a 4.1x median.

Bad

  • In June 2026 an attacker republished the whole @mastra npm scope with a malicious dependency, using a stale contributor credential.
  • It is opinionated, so stepping outside its patterns can be clunky. Users mention workflows for non-LLM logic and custom server routes.
  • A very fast release cadence (100+ versions a year, now at 1.85) means frequent upgrades and API drift.
  • An independent comparison found that hitting the step limit fails silently unless you check finishReason yourself.

The numbers

npm downloads, 4 weeks
13M ×15 in a year
GitHub stars
30k
Commits, 12 months
12k
npm version
1.85.0 Nov 2026
Versions, 12 months
101
Advisories, 24 months
1 of 1 ever
OpenSSF Scorecard
None
Licence
Apache-2.0

Read on 21 November 2026 from GitHub (mastra-ai/mastra), npm (@mastra/core), OSV and the OpenSSF Scorecard.

AI SDKs and agent frameworks

  1. 9.0AI SDK
  2. 7.9OpenAI SDK
  3. 7.8Anthropic SDK
  4. 7.7Mastra
  5. 7.5LangGraph.js
  6. 7.4OpenAI Agents SDK
  7. 6.8LangChain.js
  8. 6.7Genkit
  9. 1.5LlamaIndex.TS
Compare all 9 on six scores