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.

