mrkeyoor.com_
Wed 16 Sept 23:54 UTC
AI Toolsevaluationupdated 26 Aug 2026

mastra review

Mastra is a TypeScript framework for building agents, tool-using assistants, graph workflows, and other model-backed applications. It bundles model routing, memory, retrieval, human approval, evaluation, observability, deployment, and Model Context Protocol support so JavaScript teams do not have to assemble each layer separately.

+266stars / 7d
Verdict

Our Mastra test command was still running when it hit 900 seconds, after a successful 645-second build, so adopting the full monorepo requires serious CI time. Mastra is a strong fit for TypeScript teams that want agents, controlled workflows, storage, Studio, and MCP in one framework. Use a smaller SDK when the application only needs a model call, a few tools, and streamed UI output.

We ran it

Lab card: what happened when we ran mastraScreenshot of mastra (mastra.ai)
Install✓ · 139s1 packages · 38 MB
Build✓ · 645s
Tests✗ timed out · 900sran, no count parsed
Repo14393 files~2,459,824 lines of source · 199.4 MB · 33 CI workflows

Answers from our run

Does mastra build from source?

Dependencies installed in 139 seconds (1 packages), and the build succeeded in 645 seconds. We cloned commit e8e299c into a clean Debian container with 3 CPUs and no project-specific setup.

Do mastra's tests pass?

We could not finish them: the suite was still running after 15 minutes in our container.

Who should not use mastra?

Python-first AI teams: Mastra's primary API, examples, tooling, and framework integrations are TypeScript-centric.

What are the alternatives to mastra?

LangGraph.js, Vercel AI SDK, LangChain.js. Our Mastra test command was still running when it hit 900 seconds, after a successful 645-second build, so adopting the full monorepo requires serious CI time.

Setup2/5139-second install, 645-second build, and tests exceeded 900 seconds
Docs5/5Detailed APIs for agents, workflows, storage, deploys, and MCP
Community5/527,488 stars and active issue and pull request work
Maturity3/5Core 1.61.0 is active, but the surface and change rate are large

Discussed on

  1. hnShow HN: Mastra – Open-source JS agent framework, by the developers of Gatsby442 points
  2. hnShow HN: Mastra 1.0, open-source JavaScript agent framework from the Gatsby devs213 points
  3. hnShow HN: A “Course” as an MCP Server213 points
  4. hnShow HN: Principles of Building AI Agents book [pdf]5 points
  5. hnMultiple mastra NPM packages compromised4 points

Who it’s for

TypeScript teams building agents inside Node, Next.js, React, or a standalone API server.
Products that need explicit workflows beside open-ended agents.
Developers who want local Studio tools for inspecting agents, runs, workflows, and traces.
Teams prepared to choose persistent storage, model providers, evaluation criteria, and production observability.
MCP server authors who want to expose Mastra agents and tools through a standard protocol.

Who it’s NOT for

Python-first AI teams: Mastra's primary API, examples, tooling, and framework integrations are TypeScript-centric.
Projects that need a small, slow-moving dependency surface: the measured monorepo has about 2.46 million source lines and its test command exceeded 900 seconds.
Builders expecting agents to work without external model access: the quickstart maps provider/model names to API-key environment variables.
Teams that need every visible feature under Apache-2.0: directories named ee/ use the Mastra Enterprise License for production.
Applications treating the default in-memory store as durable: the storage guide says it loses state when the process exits.

Setup reality

Our sandbox install succeeded in 139 seconds, adding 1 package and 38 MB in the measured pnpm workspace. The build succeeded in 645 seconds. Tests timed out at 900 seconds, so there is no overall pass count.

The log tail was still executing libSQL storage tests. It showed expected simulated backend outage messages inside tests that verify errors are re-thrown, followed by green files, including one with 638 tests and 18 skipped. The log does not establish why the full command missed the cap.

A real agent also needs Node 22.13 or later, a model provider API key, and production storage if memory or workflows must survive restarts. Deployment can use a standalone server, an existing web app, serverless providers, or dedicated workers.

Mastra combines agents with explicit graph workflows

Mastra supports two different kinds of model-backed behavior. Agents choose tools and iterate toward an answer, while workflows use declared steps, branches, parallel paths, and suspend or resume points. A support assistant can reason inside a bounded step, then hand account changes to an approval workflow. The framework also includes memory, retrieval, model routing, evaluation, tracing, and a local Studio interface.

The integration story is built around TypeScript. Mastra can sit inside React, Next.js, Node, Express, Astro, SvelteKit, or Hono, or run as its own Hono-based server. Its model router accepts provider/model strings and looks for the matching environment variable. Tools must be created through the framework helper with schemas and an execute function. Plain object tool definitions are documented as silently failing, which is exactly the kind of setup detail worth catching during a trial.

A 645-second build makes CI cost part of the decision

Our checkout at commit e8e299c contained 14,393 files and roughly 2,459,824 lines of source. It is a pnpm monorepo with 33 CI workflow files. That scale reflects the framework's range: core runtime, storage adapters, clients, deployment packages, Studio, evaluation, observability, and integrations move together. Application teams install a subset, but contributors and maintainers face the whole graph.

The latest core release was @mastra/core@1.61.0, published August 24, 2026. It added external experiment control, HTTP drain settings, message delivery state, safer concurrent workflow resume, and multi-turn evaluation. Those are production concerns rather than tutorial flourishes. They also show a young framework still filling in runtime semantics that matter under retries, shutdowns, and multiple workers. Pin versions and read package changelogs before upgrades.

What happened when we ran it

Our sandbox installed the measured workspace in 139 seconds, adding 1 package and using 38 MB. The build succeeded but took 645 seconds. We ran the command in an unprivileged Node 22 container with 3 CPUs, 8 GB of RAM, and no secrets. Installation size looks small because of the particular workspace resolution measured by the lab; the 14,393-file repository is still a large codebase.

The test command did not finish within 900 seconds. Its last output showed libSQL storage tests continuing to complete, including a file reporting 638 tests with 18 skipped, followed by smaller green files. Messages saying simulated backend outage came from cases that check whether storage failures are re-thrown. The tail does not show an ordinary assertion failure or reveal why the overall command exceeded the cap, so the defensible result is timeout, not failed tests.

Persistent storage is required for durable behavior

The default in-memory store is suitable for tests and short experiments, but the documentation says it loses data when the process exits. Persistent adapters hold conversation memory, workflow snapshots, traces, evaluation results, schedules, and long-running task state. A file-backed libSQL database is the easy local path. PostgreSQL, MongoDB, and other adapters fit shared production processes, with support varying by storage domain.

Production storage is architecture, not a checkbox. The guide recommends managed databases with backups, monitoring, connection pooling, and retention jobs. High-volume observability data may belong in a separate analytical store, while workflows need reliable transactional snapshots. Relative file paths can even cause Studio and the application to open different local databases. A team should decide which state must survive, who can read it, and how deletion works before enabling memory everywhere.

Model access and tool permissions remain application responsibilities

A starter agent needs a provider choice and the matching secret, such as OPENAI_API_KEY, ANTHROPIC_API_KEY, or GOOGLE_API_KEY. Mastra's common interface makes changing models easier, but providers still differ in tool calling, structured output, context limits, and billing. Evaluation results from one provider should not be assumed to transfer unchanged to another. The application also owns rate limits, fallbacks, and what user data leaves its boundary.

Tools deserve stricter review than prompts. A schema validates shape, but it does not decide whether an agent should send email, write a file, or mutate a production record. Mastra supports suspension and human approval, which should be used around consequential actions. Logs and traces can contain prompt or tool data, so observability storage needs the same access controls and retention policy as other sensitive application records.

MCP support is useful when Mastra already owns the tools

Mastra can publish agents, tools, and structured resources through Model Context Protocol. That gives external MCP clients a standard connection to capabilities already registered in the framework. It can reduce duplicate wrappers when the same tool serves an internal agent, Studio, and another client. The mcp label belongs here because the README presents server authoring as a first-class feature.

An MCP endpoint also creates a new trust boundary. Authentication, tool allowlists, input limits, cancellation, and audit logs must be designed for the client population. Open issue 22376 reports that the Unix-socket pub-sub implementation accepts inbound newline-delimited frames without a maximum buffer size. That report is new and specific; operators exposing local multi-process communication should track its resolution rather than generalizing it to every server route.

Current activity is high, and enterprise code has separate terms

GitHub recorded 27,488 stars, 471 combined issues and pull requests, and a last push on August 26, 2026. Fresh changes were landing across core runtime, observability, durable agents, and the Factory interface. That level of activity improves the odds of fixes and integrations, while raising the cost of following main or upgrading without regression tests. Our 900-second timeout makes targeted package tests more practical than an all-repository gate for ordinary adopters.

Most of Mastra uses Apache-2.0. Code in directories named ee/ is source-available under the Mastra Enterprise License and needs a valid license in production. Check the exact packages used by a deployment rather than assuming one license covers the repository. For a TypeScript platform team, the framework deserves a prototype. For a small chat feature, its storage, evaluation, deployment, and agent machinery may be more system than the product needs.

Alternatives

ProjectWhat it isPick it when
LangGraph.jsA TypeScript library for stateful agent graphs and durable execution.pick this instead when graph control is the center of the design and you do not need Mastra's wider Studio and deployment system.
Vercel AI SDK gh↗A TypeScript toolkit for model calls, streaming, tools, and AI user interfaces.pick this instead when the product mainly needs model and UI primitives rather than a full agent runtime.
LangChain.jsA broad JavaScript framework for model, retrieval, tool, and agent integrations.pick this instead when its integration catalog matters more than Mastra's opinionated server and Studio workflow.

What people are saying

  1. [github-trending] mastra-ai/mastra

Sources

  1. Mastra README
  2. Mastra quickstart
  3. Mastra deployment overview
  4. Mastra storage guide
  5. Mastra core 1.61.0 release
  6. Unix socket frame limit issue 22376

More ai tools reviews

eve · MemOS · LongCat-Video · Concat · DLSS5-Feeder · Concat · the whole board →