“Mastra powers our chat infrastructure and makes developing a coding agent seamless”
AI SDK & Agent FrameworkMaker says so · source ↗
Mastra
TypeScript framework for building AI agents, workflows, and RAG applications with memory and observability built in.
Works with AI agents:llms.txtCLIMastra is an open-source TypeScript framework for building AI agents and multi-step workflows inside a JavaScript or TypeScript codebase. It covers what an agent feature needs beyond a model call: tools, memory, workflows, evals and tracing.
You register agents, tools and workflows on one Mastra instance. An agent is instructions plus a model, given as a provider/model string that Mastra's model router resolves using the matching API key from the environment, plus tools and optional memory. Workflows are typed steps with branching, parallel runs, loops, and suspend and resume backed by saved snapshots. State lives in pluggable storage adapters. Mastra runs on Node.js 22.13 or later, Bun, Deno and Cloudflare, either inside Next.js or Astro or as its own Hono-based server.
Running mastra dev opens Studio, a local UI for chatting with agents, running workflows and reading traces. Memory covers message history, semantic recall and working memory; agents can call MCP servers or expose tools to MCP clients; and @mastra/ai-sdk streams agents into AI SDK UI hooks such as useChat. You deploy with mastra build to any VM, container or PaaS, through built-in deployers for Vercel, Netlify and Cloudflare, or on the hosted Mastra platform.
It is TypeScript only. Persistent memory and resumable workflows need a database you choose and run, the default in-memory store loses data on exit, and the file-based libSQL store does not work on serverless hosts. Code under the repository's ee/ directories (auth, agent builder, editor) is under a separate license, not Apache 2.0.
Where it fits
How Mastra itself is built
53 tools, from its own code, website and Product Hunt page.
Who uses it
24 makers' products, each linked to the source that shows it, and 13 open-source projects that declare it in their code.
“Mastra, the agent framework that let us go from idea to shipping agents fast.”
AI SDK & Agent FrameworkMaker says so · source ↗“We use Mastra as our foundational agent framework.”
AI SDK & Agent FrameworkMaker says so · source ↗“Shoutout to the team at Mastra for building an excellent agent orchestration layer. Mastra is a key part of Imagine.dev’s agentic architecture, helping us coordinate specialized agents and reliably turn high-level intent into structured execution. Their focus on developer experience and composability made it possible for us to move fast without sacrificing correctness.”
AI SDK & Agent FrameworkMaker says so · source ↗“Revolte runs a harness of specialized agents across the full dev lifecycle, so the framework underneath had to be production-grade, not a prototyping toy. Mastra's modern TypeScript stack gave us type safety, real workflow control, and structure we could actually build a platform on, without the sprawl and glue code that slows other frameworks down. A serious TypeScript foundation with clean agent orchestration is what set it apart.”
AI SDK & Agent FrameworkMaker says so · source ↗“Really like the depth of product here, very hard to make a product of this scale high quality, impressed!”
AI SDK & Agent FrameworkMaker says so · source ↗Open source: a project that declares Mastra as a dependency in its public code — verifiable, but not necessarily a live product.
What makers say
5 makers on why they use Mastra, in their own words on Product Hunt.
Revolte runs a harness of specialized agents across the full dev lifecycle, so the framework underneath had to be production-grade, not a prototyping toy. Mastra's modern TypeScript stack gave us type safety, real workflow control, and structure we could actually build a platform on, without the sprawl and glue code that slows other frameworks down. A serious TypeScript foundation with clean agent orchestration is what set it apart.
RevolteSep 2026 ↗Shoutout to the team at Mastra for building an excellent agent orchestration layer. Mastra is a key part of Imagine.dev’s agentic architecture, helping us coordinate specialized agents and reliably turn high-level intent into structured execution. Their focus on developer experience and composability made it possible for us to move fast without sacrificing correctness.
ImagineSep 2026 ↗Really like the depth of product here, very hard to make a product of this scale high quality, impressed!
Mastra powers our chat infrastructure and makes developing a coding agent seamless
supersetSep 2026 ↗Mastra, the agent framework that let us go from idea to shipping agents fast.
@OSep 2026 ↗Loved and watch-outs
Themes that recur in makers' words and Hacker News comments, each linked to what it summarises, with how Product Hunt tags its reviews.
- TypeScript-first with type safety, so it fits teams whose product stack is already TypeScript. mastra.aiPHmastra.ai 2HN
- Workflows, agents, memory, RAG and evals come in one package, replacing half-built in-house frameworks. mastra.aimastra.ai 2mastra.ai 3HN
- Multi-agent setups such as supervisor agents and runtime routing networks are supported out of the box. mastra.aimastra.ai 2mastra.ai 3HN
- Good docs and developer experience make it a practical way to learn how agents work. HNHN 2HN 3
Who switches
Public pull requests on GitHub since Oct 2024 whose title says "X to Y" — real code changes moving a project from one tool to another, by developers in general. Open a row to see the pull requests.
LangGraph → Mastra5 PRs
- feat(mastra): migrate v2 LangGraph chat extension to Mastra v3sourcefuse/loopback4-llm-chat-extension · 2026-05-22
- feat(migration): migrate lb4-llm-chat-extension from LangGraph to Mastra sourcefuse/loopback4-llm-chat-extension · 2026-05-13
- Migrate agent from LangGraph to MastraQuenumGerald/NudgeBot · 2026-05-07
- feat(migration): migrate lb4-llm-chat-extension from LangGraph to Mastra [WIP]sourcefuse/loopback4-llm-chat-extension · 2026-05-04
- Plan langgraph to mastra migrationConnorbelez/open-canvas · 2025-09-01
Alternatives to Mastra
All alternatives by situation →On Product Hunt, people weigh it against: OpenAI API, LangChain, Trigger.dev.
Questions makers ask about Mastra
Does it work inside a Next.js app?
Yes. Mastra can live in a Next.js or Astro project and deploy with it; on Vercel you add @mastra/* to serverExternalPackages and drop the file-based LibSQLStore, which needs a filesystem. source ↗
Where can I deploy it?
Anywhere that runs Node.js 22.13 or later, Bun, Deno or Cloudflare. mastra build produces a standalone server for a VM, container or PaaS, and optional deployers handle Vercel, Netlify and Cloudflare. source ↗
What database does agent memory need?
A persistent storage adapter whenever state must survive restarts, such as libSQL, PostgreSQL or MongoDB for memory. The default in-memory store is for tests; a file-backed libSQL database works for local development. source ↗
Which model providers can I use?
Any provider in its model router, addressed as a provider/model string with the API key read from the environment. You can mix models across agents and configure fallbacks if a provider goes down. source ↗
Can I use it with AI SDK UI hooks like useChat?
Yes. The @mastra/ai-sdk package provides route handlers that stream Mastra agents and workflows in the format useChat, useCompletion and useObject expect. source ↗
Do I need the hosted platform to test agents and see traces?
No. Studio runs locally at localhost:4111 when you start mastra dev, and you can also deploy it yourself behind your own authentication. source ↗
Is Mastra free?
Yes — there is a free tier a small product can run on; paid use starts at $250/mo. source ↗
Is Mastra open source or self-hostable?
Open source, and you can self-host it. source ↗
Can AI coding agents work with Mastra?
It serves an llms.txt docs index; it has an official CLI (mastra).
Who uses Mastra?
24 makers' products we track, each with a source, and 13 open-source projects declare it in their code. source ↗