- 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.
- Added collectionExists(name) to Factory storage so a domain can tell whether a table already exists before registering it. Supported by LibSQLFactoryStorage and PgFactoryStorage.
- Added a workflow recovery loop. A default-engine workflow run whose instance crashed is now restarted without waiting for another instance to boot.
Mastra
A TypeScript framework for building agents and AI workflows, with memory, evals, retrieval and observability built in.
Use it in: API / SDK Works with: MCP Local models Multi-agent
On this page
Usage data: latest readings Nov 17 to Nov 19, 2026, last checked Nov 19, 06:26 UTC. Date of each number
What Mastra does
Mastra is a TypeScript agent framework from Mastra, first released in October 2024. You use it through a TypeScript library. Its documentation covers MCP servers, subagents or parallel agents and local models. It can run models from Anthropic, OpenAI, Google, xAI, Mistral and DeepSeek and others. It is used from TypeScript. It is free and open source (Apache-2.0 (enterprise features under a separate licence)); you pay only for the models it calls.
Key facts
| Maker | Mastra |
|---|---|
| Type | TypeScript agent framework |
| First released | October 2024 |
| License | Apache-2.0 (enterprise features under a separate licence) |
| Interfaces | TypeScript library |
| Main language | TypeScript |
| Open issues and PRs | 873 |
Pricing
Mastra is open source and free to use; you pay only for the models and infrastructure it runs on.
Checked Nov 9, 2026. Prices change often; confirm before you buy.
Quick answers
- Free to start?Yes
- Open source?Yes (Apache-2.0 (enterprise features under a separate licence))
- Where you use itTypeScript library
- Supports MCP?Yes
- Model providersanthropic, openai, google, xai, mistral, deepseek, qwen, meta, amazon, azure, openrouter, any OpenAI-compatible, local
- Subagents / multi-agent?Yes
- Feature comparisonAll agents
- Closest alternativeLangChain · all alternatives
What's new in Mastra: November 2026 so far
November brought significant API refinements across the platform, with a focus on cleaning up deprecated components and stabilizing core features. The month included breaking changes to observability, memory, and factory APIs alongside new capabilities for agent resumability and MCP server configuration.
- Agents now support resumable streams, allowing clients to reconnect after disconnection without losing message history.
- New MCP server configuration options let you control toolsets, features, OAuth settings, and read-only tool serving.
- Agents can now authenticate with websites via setCookies() on MastraBrowser, enabling access to login-protected content.
- Factory storage now supports collection existence checks before table registration.
4 releases this month · summarised from the official release notes · all months
AgentGid articles about Mastra
Best AI Agent Frameworks in 2026: LangGraph, CrewAI, OpenAI Agents SDK and More
The AI agent frameworks developers actually use, ranked on live downloads and GitHub data, with a plain guide to which one fits Python, TypeScript, multi-agent or Microsoft-stack work.
How to Build an AI Agent: No-Code Builders, Frameworks and SDKs
A practical guide to building your first AI agent: choosing between no-code builders, open-source frameworks and model vendors' SDKs, the core agent loop, tools, guardrails and testing, with live usage data for each option.
LangGraph vs CrewAI vs OpenAI Agents SDK: Which Agent Framework to Use (2026)
Three of the most used agent frameworks compared on design, control, multi-agent support, language support, adoption and release activity, with live data and a decision guide.
Get started with Mastra
| npm | npm install @mastra/core |
|---|
These commands use the packages tracked on this page. The vendor may recommend a different installer; see the official documentation.
What Mastra users report right now
Fixed in @mastra/core 1.69.0 Request Users asked Mastra for a first-class way to use evaluation models, which pick from fixed options instead of generating text, for routing and guardrail decisions. A maintainer marked it shipped, and @mastra/core gained a typed Classifier primitive.
Reported on GitHub · 7 👍
Fixed in @mastra/factory 0.16.0 Request Users asked for GitLab support in Mastra Factory alongside GitHub and Linear, so it can take GitLab issues and work them as merge requests. It was added by a merged pull request.
Reported on GitHub · 5 👍
Fixed in @mastra/core 1.72.0 Users report that from @mastra/core 1.62, recovering an interrupted durable or evented agent run after a process restart crashed with 'Cannot read properties of undefined (reading 'messages')', which made durable agents unusable for some of them.
Reported on GitHub · 2 👍
The most discussed problems in its GitHub repository, checked Nov 12, 2026. Written by AgentGid in its own words; statuses and fix versions come from the project's own pages. Reports are users' accounts, not AgentGid tests.
Add-ons for Mastra: save tokens, add memory and tools
LiteLLM
One gateway for 100+ models with spend tracking, budgets, rate limits and fallbacks.
Langfuse
Traces every model and tool call with its cost and latency, and runs evaluations.
Firecrawl
Turns websites into clean Markdown or structured data the agent can read.
E2B
Runs agent-written code in isolated cloud sandboxes instead of on your machine.
Composio
Connects the agent to 1,000+ apps and APIs with managed sign-in.
Mem0
Adds long-term memory, so the agent remembers users and past work across sessions.
Listed because each tool documents support for Mastra or for agent frameworks in general. Savings and results depend on your workload.
Mastra alternatives
Best Mastra alternatives compared · All agent frameworks and SDKs
| # | Agent | Gid Score | Downloads 7d | 7d | 30d | Stars | Latest release | Price | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 |
LangChainLangChain |
79 | 41.1M | up 5.7% | down 2.7% | 150K+76/day | 1.5.22d ago | Free (OSS) | |||
| 2 |
LangGraphLangChain |
75 | 20.1M | up 5.5% | up 29.2% | 45.1K+48/day | 1.2.23yesterday | Free (OSS) | |||
| 3 |
AI SDKVercel |
68 | 47.2M | up 3.9% | up 38.4% | 28.1K+30/day | 7.0.1772d ago | Free (OSS) | |||
| 4 |
Claude Agent SDKAnthropic |
64 | 29.3M | up 5.9% | up 37.6% | 8,588+9/day | 0.2.185yesterday | Free (OSS) | |||
| 6 |
OpenAI Agents SDKOpenAI |
62 | 7.2M | up 4.8% | up 38.9% | 30.8K+21/day | 0.25.02d ago | Free (OSS) | |||
| 7 |
Deep AgentsLangChain |
59 | 3.1M | up 4.9% | up 51.3% | 31.4K+29/day | 0.2.112d ago | Free (OSS) | |||
Head to head: Mastra vs LangChain · Mastra vs LangGraph · Mastra vs AI SDK · Mastra vs Claude Agent SDK
Tools used with Mastra
What 313 public GitHub projects that depend on Mastra use with it, from their dependency files.
- TypeScript95.5%
- Zod92.7%
- AI SDK66.1%
- tsx38.0%
- React36.4%
- Tailwind CSS32.3%
- dotenv30.0%
- ESLint28.1%
- Next.js27.5%
- Lucide React23.0%
Used far more often here than in AI-built projects overall: what sets Mastra projects apart.
- @openrouter/ai-sdk-provider7.7% · 17.1×
- libSQL Client11.2% · 15.2×
- Slack Web API5.1% · 12.3×
- Hono6.7% · 3.8×
- OpenTelemetry5.1% · 3.5×
- Nanoid (JavaScript)5.1% · 3.1×
- react-markdown10.9% · 2.7×
- Drizzle Kit8.9% · 2.3×
Ratings from people who use Mastra
No ratings yet. Used Mastra? Rate it and say what it is good and bad at.
Mastra news
-
Show HN: Mastra Factory, the open-source software factory we use to build Mastra
Mastra released an open-source software factory tool used to build the Mastra agent framework.
-
Mastra 1.84.0 released
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…
-
Mastra 1.83.0 released
Agent’s durable option now controls resumable streams only (not checkpoint-backed durable execution).; Added resumable streams to every Agent, not just durable agents. An agent registered on Mastra now publishes each run on its stream topic and keeps a…
What changed: recent Mastra releases
24 stable releases in the last 90 days · Monthly summary · Full changelog
- Agent’s durable option now controls resumable streams only (not checkpoint-backed durable execution).
- Added resumable streams to every Agent, not just durable agents. An agent registered on Mastra now publishes each run on its stream topic and keeps a replay cache, so a client can reconnect after…
- Avoid blocking the event loop while loading instruction files from a trusted Git ref and while discovering tool-result instruction reminders. Keep missing and untrusted-ref behavior unchanged.
- Add model and provider as span query sort fields.
- Added server.mcp.oauth (resource, requireAudience, authorizationServers, scopesSupported) to configure OAuth discovery and token audience checks for the built-in MCP server.
- Added the server.mcp option for configuring the built-in MCP server at /api/mcp: turn it on or off, change its path, choose toolsets, feature agents and workflows, serve only read-only tools, and…
Earlier releases
- @mastra/temporal@0.5.0: Steps now validate inputSchema and requestContextSchema before running (can fail runs that previously “succeeded” with wrong input); set validateInputs: false to opt out.
- Experimental memory changes: experimental_subconscious and Memory knowledge option are removed (now throw).
- knowledge.reindex() is removed; use upsertPage/note writes (and reindexLinks() for link indexing) instead.
- Factory (@mastra/factory@0.27.0): removes work-item claiming APIs (claimKey removed; related methods/types removed) as part of allowing the same external item to exist in multiple projects.
- An agent's scopes function can now narrow or replace a run's scopes. It receives the run's incoming scopes (from the call, defaultOptions and request context) and returns the run's final set.
- Added requestId, serviceName, and experimentId filters to advanced trace queries. Use them at trace scope or inside spans.some / spans.none with eq, ne, in, notIn, exists, and notExists.
- @mastra/playground-ui: Metrics chart card API cleanup (e.g., removed ChartCard description/summary, removed several MetricsCard.* components, changed related table/legend APIs).
- @mastra/playground-ui: Removed fluid-hover utilities (useFluidHover, FluidHoverHighlight) and CommandList.highlightClassName.
- @mastra/core: Removed runtime-importable subpaths @mastra/core/network/vNext and @mastra/core/telemetry/otel-vendor (they pointed to files that no longer ship).
- @mastra/factory: defineBoard() and MastraFactory boards/includeDefaultBoards are deprecated in favor of stored boards APIs.
- Added schemas for saved observability list views. Use savedViewStateSchema to validate a saved traces, spans, threads or logs view: its filters, time range, sort, columns and page options.
- Channel agents with a workspace can now open binary file attachments, such as ZIP and DOCX files, that need an authenticated download (for example Slack files).
- queryTraceThreads() thread rows no longer include model or provider, and page.limit is now capped at 100 (default 25); larger limits fail validation.
- @mastra/connect connect-session creation response changed: POST /connect/:provider/sessions now returns launchUrl (server-side verified launch route) instead of connectUrl.
- @mastra/code-sdk no longer registers built-in subagents by default; you must pass subagents: [...builtinSubagents] to keep prior behavior.
- @mastra/playground-ui TracesExplorer sorting API changed to a single { field, direction } object (replacing sortDirection / onSortDirectionChange).
- Added agentModel to dataset.startExperiment() and dataset.startExperimentAsync() so you can run an agent experiment against a different model without editing or versioning the agent.
- Channel formatError now receives the failed run's request context as a second argument, so the message posted to Slack, Discord, Teams or Telegram can link back to whatever the run belongs to.
- Agent controller sessions are keyed by sessionId (scope removed): core/controller APIs, server routes, and client-js controller.session()/session.create() signatures updated.
- Thread-row query contract changed: use timeRange.traces / timeRange.threads instead of traces.timeRange.
- querySpans() contract changed: removed model/provider filters and dropped cost, inputTruncated, outputTruncated, errorTruncated from responses (requires updated storage adapters).
- Channel resolveResourceId / resolveThreadId contexts now require requestContext (tests/manual calls must pass it).
- Breaking: Agent controller sessions are now addressed by their session id. Many sessions can share one resourceId, so resourceId only says whose threads and memory a session works on.
- Added controller.getSession(sessionId). Removed controller.getSessionByResource(resourceId, scope).
Mastra prices over time
Mastra popularity and usage data
Mastra was downloaded 3.7M times from npm in the week ending Nov 17, 2026, up 14.9% on the week before and up 49.9% over the last 30 days compared with the 30 before. The GitHub repository has 29.6K stars, 748 of them added in the last 30 days. The latest stable release is 1.84.0, published Nov 18, 2026; there were 6 stable releases in the past 30 days. It was mentioned in 18 Hacker News posts and comments over the last 30 days.
Download the raw daily series: mastra.csv
Gid Score breakdown
Gid Score shows public popularity and activity (usage, GitHub stars, mentions, growth), not the quality of the product. Each component is scored 0 to 100 from public signals; a dash means no data for it. How the Gid Score works.
How fresh these numbers are
| Number | Latest reading | Last checked |
|---|---|---|
| Package downloads | Nov 17, 2026 | Nov 19, 06:21 UTC |
| GitHub stars | Nov 19, 2026 | Nov 19, 06:26 UTC |
| Hacker News mentions | Nov 18, 2026 | Nov 19, 06:26 UTC |
We fetch every source once a day. Registries publish downloads and page views a day or two late, so their latest reading trails the check. A reading more than 4 days old is marked out of date; the Gid Score still uses it until a newer one arrives.
Mastra FAQ
How much does Mastra cost?
Mastra is open source and free to use; you pay only for the models and infrastructure it runs on.
Is Mastra open source?
Yes. Mastra is open source, released under the Apache-2.0 (enterprise features under a separate licence) license.
How popular is Mastra?
Mastra was downloaded 3.7M times from npm in the week ending Nov 17, 2026, up 14.9% on the week before and up 49.9% over the last 30 days compared with the 30 before. The GitHub repository has 29.6K stars, 748 of them added in the last 30 days. The latest stable release is 1.84.0, published Nov 18, 2026; there were 6 stable releases in the past 30 days.
What is the latest version of Mastra?
The latest stable release we track is 1.84.0, published on Nov 18, 2026.
What are the alternatives to Mastra?
The closest alternatives in the same category by Gid Score are LangChain, LangGraph, AI SDK, Claude Agent SDK.
For the makers of Mastra badges, corrections
Add a live badge to your README or site:
[](https://agentgid.com/agents/mastra/)
[](https://agentgid.com/agents/mastra/)
[](https://agentgid.com/agents/mastra/)
Something wrong or outdated on this page? Send a correction with a link to the official source. More for makers.
Where these numbers come from
npm: @mastra/core. GitHub: mastra-ai/mastra. See data sources for how each one is collected.