Agent frameworks · ranked 02
Mastra
TypeScript framework for agents, workflows, and evals.
Last reviewed
Last updated
Mastra is #2 of 7 in Agent frameworks. Editorial score 8.0: Ease 8, Power 8, Price 8, Vibe-coder fit 8. Initial editorial estimate. Not a measured benchmark.
Who it is for TypeScript agents you keep in your repo.Agent frameworks: The harness around a model.
Mastra is an open-source TypeScript framework for agents, tools, workflows, and evals. It is aimed at web developers who want those pieces in their own repo rather than a Python stack. Use it when a Next.js or Node app is growing an agent and the Vercel AI SDK is no longer the whole design.
Best use cases
- Agents inside a TypeScript product
- Workflows with tools and evals
- A step up from a single AI SDK route handler
Pros
- + TypeScript-native, which matches most indie web stacks
- + Open source
- + Agents, workflows, and evals are the product, not an afterthought
Who should skip it
Skip Mastra when one of these listed limits is the constraint.
- − Another framework to learn if the AI SDK already covers the feature
- − Hosted pieces, if you use them: check site
All comparisonsAll best-of lists
Pricing
Mastra is listed as Free. The framework is open source. Any hosted offering: check site.
Alternatives to Mastra
All alternatives to MastraListed alternatives: Vercel AI SDK, LangGraph, Pydantic AI. Vercel AI SDK is listed for “Streaming AI features in a TypeScript web app” (also AI SDK). LangGraph is listed for “Agents that are workflows, not a single loop”. Pydantic AI is listed for “Typed Python agents”.
Also in Agent frameworks: CrewAI, LlamaIndex, LangChain.
Agent frameworks
8.5
Vercel AI SDK
TypeScript toolkit for streaming, tool calls, and chat UI.
Best for Streaming AI features in a TypeScript web app
Agent frameworks
7.3
LangGraph
Graph-shaped agents with state, from the LangChain team.
Best for Agents that are workflows, not a single loop
Agent frameworks
7.6
Pydantic AI
Python agent framework from the Pydantic team, typed end to end.
Best for Typed Python agents
Release notes
Release historyMastra core 1.86.0
Released November 25, 2026. Experiments can run as durable evented workflows. Pass durable: true to startExperimentAsync(), or to the server and client trigger APIs, and a redeploy or a worker crash no longer leaves the run stuck at running. On a pubsub that redelivers events, such as Redis Streams, another worker picks up an item that was cut off, and each item still records one result. Knowledge adds an experimental importer contract, KnowledgeImporter, and knowledge.importers.run() to sync an external source, with batching, leases, replay protection, and settle and repair bookkeeping in the in-memory, LibSQL, and Postgres stores. Agents can run on the durable engines through durable.executionEngine, set on the agent or in Mastra.durable defaults, while the streaming and model-output APIs stay the same. The earlier prerelease value executionEngine: 'durable' is now executionEngine: 'default'. createChannelTools() reads and posts in the run's active chat thread. @mastra/slack adds createSlackTools() for Slack search, attachment download, and user and channel lookup, with the same access scoping. knowledge_activity reports what changed in Knowledge over a date range, and a host can run Knowledge tools outside an agent run with fixed principals and a recorded author. ask_user options can set recommended, a display hint that reaches the host and does not select a choice. A durable agent run that mastra.shutdown() stops mid-run is interrupted rather than failed, so recovery can finish the same run. Breaking changes: get_process_output no longer supports wait: true, so use waitSeconds from 1 to 300, and the old flag is ignored. The prerelease @mastra/connect package replaces EventsClient and connectEvents() with ConnectEvents. @mastra/mcp-apps-components renames the MCP boundary field projectId to project. @mastra/playground-ui trace components move to a slot-based ThreadTrace, a data-in TracesExplorer, and navigation callbacks.
Source for Mastra core 1.86.0 (opens in a new tab)Mastra core 1.84.0
Released November 18, 2026. The GitHub release is titled November 17, 2026. Agents created with createDurableAgent or createEventedAgent, and evented workflows, can opt into experimental storageVersion 2, which stores a run as a header plus per-step rows so long runs write only deltas. Mastra's example is 98 MB down to 11 MB published, and 75 MB down to 3.1 MB written. result.steps() is async and getState() is standardized. startWorkers() starts a workflow recovery loop that restarts crashed default-engine runs without waiting for another instance to boot, using a leader-election lease. Recovery is broker-aware: on Redis or Valkey Streams and Google Cloud Pub/Sub, instances no longer restart every run on boot and instead let the broker redeliver unacked step messages. knowledge.movePage() moves a page and its descendants without losing ids, embeddings, or links. knowledge.reembed() re-embeds existing pages and notes in resumable batches. @mastra/platform adds hosted Platform Memory and Knowledge clients, Platform Workspace re-exports, and PlatformBrowser for Stagehand sessions backed by Platform browser sessions. The built-in MCP server can render observability results as Studio-based MCP Apps, a Trace Viewer and an Observability Explorer, in clients that support MCP Apps. Compact text goes to the model and the full rows go to the app. Breaking changes: in knowledge alpha scope matching, $param matches exactly one segment and a raw colon is no longer allowed inside a scope segment, so some existing scopes can read as empty until ids are updated. newestOpenPullRequestNumber is no longer exported from @mastra/factory/boards. @mastra/playground-ui removes ListSearch, SearchFieldBlock, SectionCard, and CardHeading. MastraFactory no longer accepts intake.evaluator and throws at startup if it is passed. @mastra/core 1.84.0 also adds collectionExists(name) on Factory storage, supported by LibSQL and Postgres.
Source for Mastra core 1.84.0 (opens in a new tab)
Newsletter
Get the weekly AI tool shortlist
One email when rankings change or a tool ships something that matters. No spam, unsubscribe anytime.