Mastra vs AI SDK
Mastra (Mastra) and AI SDK (Vercel) side by side on public data, as of Nov 20, 2026.
AI SDK has 12.6x the weekly package downloads of Mastra (47.2M against 3.7M). Mastra and AI SDK are close on GitHub stars (29.6K and 28.1K). Over the last 30 days downloads moved +50% for Mastra and +38% for AI SDK. Mastra shipped 24 stable releases in the past 90 days.
Which should you choose?
Choose Mastra if
- you want to switch between model providers (12 documented against 8)
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 | Mastra | AI SDK |
|---|---|---|
| Gid Score | 63 | 68 |
| Usage data as of | Nov 19 | Nov 19 |
| Rank by Gid Score | #5 | #3 |
| Downloads, last 7 days | 3.7M | 47.2M |
| Downloads, 7-day change | up 14.9% | up 3.9% |
| Downloads, 30-day change | up 49.9% | up 38.4% |
| VS Code installs | — | — |
| Marketplace rating | — | — |
| GitHub stars | 29.6K | 28.1K |
| Homebrew installs, 30 days | — | — |
| Hacker News mentions, 30 days | 18 | 4 |
| Latest stable release | 1.84.0 · 2d ago | 7.0.177 · 2d ago |
| Stable releases, 90 days | 24 | — |
| Terminal-Bench (best run) | — | — |
| Price | Free (OSS) | Free (OSS) |
| License | Apache-2.0 (enterprise features under a separate licence) | Apache-2.0 |
| First released | October 2024 | May 2023 |
| Interfaces | TypeScript library | TypeScript library |
| Models | — | — |
A dash means there is no public data for that metric as of Nov 20, 2026.
Trends
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.
AI SDK
Vercel's TypeScript toolkit for building AI applications and agents, with one API across model providers and UI helpers for streaming.
Pricing: AI SDK is open source and free to use; you pay only for the models and infrastructure it runs on.
Latest release 7.0.177:
- e403988: add an interrupt option to steering so a steer can cancel a model call that has not produced output yet
- b792b56: feat(ai): ship the AI SDK skill in the package at skills/ai-sdk for pnpm agent skills
- Updated dependencies [700089c]
- @ai-sdk/gateway@4.0.150
Mastra vs AI SDK: common questions
Which is more popular, Mastra or AI SDK?
AI SDK has a Gid Score of 68 against 63 for Mastra. The score combines package downloads, editor installs, GitHub activity and attention, updated daily.