Mastra
YC W25San Francisco, US Β· Founded 2024 Β· 30 employees Β· 34 known investors
Mastra is an open-source TypeScript framework for building AI agents. The platform serves developers and teams building agent-based applications.
Also known as Mastra AI Β· mastra-ai
Founders & leadershipΒ· Y Combinator alumni (W25)
Mastra was founded in 2024 by Sam Bhagwat, Abhi Aiyer, and Shane Thomas.
Investors Β· 34
Also in the syndicate Β· 24
Funding
SEC filings, press & company announcements- Undisclosed amountSeries AApr 2026
Spark Capital (lead)
Source β - Undisclosed amountSeedOct 2025 Β· 2 sources
YC (lead)
Source β
Source: company announcements and press reports β follow each round's link for the claim.
Company profile
researched Aug 2026Mastra develops an open-source TypeScript framework for building AI agents and AI-powered applications. The framework bundles the primitives teams need to move from prototype to production: agents defined with instructions, models and tools; a graph-based workflow engine with sequential steps, parallel branches, conditional logic and loops; memory (message persistence, semantic recall and "observational memory"); tool definitions shareable across agents via MCP; human-in-the-loop suspension and tool approval; supervisor agents; and workspaces providing filesystem access, sandboxed code execution and reusable skill files. A unified model router connects to models from OpenAI, Anthropic, Google, xAI and other providers through one interface, with the company citing 40+ providers and more than 1,000 models. Mastra integrates with Next.js, React, Astro, Express, SvelteKit and Hono, or can be deployed as a standalone server.
The project ships production tooling alongside the framework: evals and scorers, tracing, logs, metrics on latency, cost, model calls and tool usage, versioned datasets built from traces and user feedback, and guardrails/processors intended to sanitize outputs and mitigate prompt injection. Mastra Studio is an interactive UI (locally at port 4111 or cloud-based) for running agents and workflows, swapping models, inspecting traces, editing prompts and creating datasets, including by non-engineering domain experts. In April 2026 the company announced that Mastra is also a platform, comprising cloud and self-hosted Mastra Studio, Mastra Server for deploying agents and workflows, and a Memory Gateway that can supply agent memory to projects using other frameworks as well.
The GitHub monorepo (mastra-ai/mastra) uses a dual-license model with the core framework and the majority of the repository under Apache License 2.0. The project maintains a public Discord community, documentation, templates, a course and YouTube material, and the CLI entry point is `npm create mastra@latest`.
Founding story
Founders Sam Bhagwat, Abhi Aiyer and Shane Thomas previously worked together on Gatsby, an early frontend framework for modern web apps, where Bhagwat was a co-founder, Aiyer principal engineer and Thomas staff engineer and head of product. In October 2024, while struggling to build sales agents with existing tooling, they returned from a weekend AI hackathon (described in the Series A post as an NYC AI hackathon) and decided to build better agent tooling instead. They joined Y Combinator in January 2025, saw usage take off around mid-February, and raised a seed round in March after YC.
Business model
Open-source framework distributed via npm and GitHub under a dual license (Apache 2.0 core), monetized through a commercial platform layer. Self-hosting of Mastra projects is offered at $0/month, with an enterprise tier sold on custom pricing that adds RBAC, SSO, IAM and network policy integration, deployment keeping traces, prompts and outputs inside the customer VPC, and a single flat annual fee rather than per-trace or per-seat metering.
Free self-hosted open-source tier plus a custom-priced enterprise offering billed as one flat annual fee (no per-trace or per-seat metering), covering enterprise controls and in-VPC data residency. Hosted components include Mastra Cloud/Studio and Mastra Server.
Traction
As of the 2025 seed announcement, Mastra reported roughly 190k weekly npm downloads one year after launch β a level Gatsby took four years to reach β and 'millions of downloads each month' per the about page. The GitHub repository shows 27.4k stars, 2.7k forks and 18,331 commits. Publicly cited deployments include Replit Agent 3 creating thousands of Mastra agents/sandboxes daily, Salesforce's agentic IDE running on a Mastra harness for non-Claude models (100K developers), Marsh McLennan enterprise agentic search used by 100k+ people daily, a Sanity content agent scaled to 30K+ organizations, ~50K agent runs per month inside MongoDB infrastructure, and use at SoftBank, Brex, Factorial, Indeed, Workday, PayPal, Adobe, PLAID, Elastic and Docker.
Latest developments
On 2026-04-09 Mastra announced a $22M Series A led by Spark Capital, bringing total capital raised to $35M, and simultaneously launched the Mastra platform: cloud-based and self-hosted Mastra Studio (evals, logs, traces, datasets, annotations), Mastra Server for deploying agents and workflows, and a Memory Gateway providing agent memory to Mastra and non-Mastra projects. The company said it had recently shipped parallel tool calls, subagents, sandboxes, filesystems and skills as agent primitives, along with auth and RBAC in Studio, and was working on heartbeat, channels, browser access, web data and annotations.
βΈFull profile β market position, technology, go-to-market, geography, history, risks & controversies
Market position
Positions itself as the leading open-source TypeScript agent framework, contrasting a single unified framework (agents, memory, tools, workflows, evals) against assembling separate libraries, and against Python-centric workflows. The company states it is the third-fastest-growing JavaScript framework measured by npm growth from 10k to sustained 150k weekly downloads across a sample of 100 well-known packages.
A single TypeScript-native framework covering agents, memory, tools, workflows, evals and observability rather than stitched-together libraries; provider-agnostic model routing via a simple provider/model string; durable workflow state supporting suspend, resume and time-travel replay; observational memory that accumulates user context automatically; a Studio UI that lets non-technical domain experts annotate traces, build datasets and edit prompts; a Memory Gateway usable from non-Mastra frameworks; and self-hosting with data remaining in the customer's VPC under flat annual enterprise pricing. The founding team's prior decade building Gatsby is cited as open-source framework experience.
Technology
TypeScript-first framework distributed as npm packages (@mastra/core, @mastra/memory and related modules) with zod-based schemas for tool input/output validation. Core building blocks include Agent, createWorkflow with .then()/.branch()/.parallel() control flow, a Harness for coordinating multi-mode agents with shared state, threads and storage, a Memory module with lastMessages, semantic recall and observational memory, and a Mastra server that registers agents and workflows (default port 4111). A model router addresses models via a provider/model string format and auto-detects provider API keys from environment variables. The stack also supports authoring MCP servers, pluggable storage (e.g. LibSQLStore), signals that route webhook or polling events into agent threads, and built-in observability covering traces, metrics, logs, evals and datasets.
Go-to-market
Developer-led distribution: open-source repository and npm CLI, documentation, templates, integration guides, a community Discord, a free course and YouTube content, plus AI-assistant-oriented docs and skills installed into detected coding assistants. The company reports distributing over 70,000 physical and more than 100,000 digital copies of its book 'Principles of Building AI Agents', appearing at meetups and conferences, publishing customer case studies, and organizing TS AI Conf in San Francisco in November 2025 with 300+ expected attendees. Enterprise deals are handled through a contact-sales motion.
TypeScript and JavaScript developers and engineering teams building AI agents, ranging from first-time AI engineers to platform teams at large enterprises. Named users span startups and scale-ups (Replit, Sanity, Brex, Factorial, Medusa, Fireworks) and large organizations (SoftBank, Salesforce, MongoDB, Workday, PayPal, Adobe, Marsh McLennan, Indeed, PLAID, Elastic, Docker).
Geography
Headquartered in San Francisco with a distributed, remote team spread across the globe; customers referenced include organizations in the United States and Japan (SoftBank, PLAID, Satto).
History
Mastra started in 2024 and entered Y Combinator in January 2025. The team wrote the book 'Principles of Building AI Agents' during YC and began distributing it in March 2025. A $13M seed round was announced in October 2025, at which point the framework included agent and workflow primitives, a playground, tool calling, memory, evals and tracing. The company hosted TS AI Conf in San Francisco in November 2025. Over the following period it shipped parallel tool calls, subagents, sandboxes, filesystems and skills as agent primitives, plus evals, logs, traces, datasets, an agent editor and auth with RBAC in Mastra Studio. In April 2026 it announced a $22M Series A led by Spark Capital (total raised $35M) and launched the Mastra platform. The team has grown to more than 35 people.
Risks & controversies
The sources contain no reported controversies. Notable considerations drawn from the material: much of the evidence is self-published by the company; the business depends on an open-source, dual-licensed project where the core is free and self-hosting is offered at no cost, concentrating monetization in an enterprise tier; and the framework sits in a fast-moving agent-tooling market where the company itself acknowledges debate over whether improving models will reduce the need for agent harnesses.
Compiled by commissioned research from 8 cited public sources β announcements, filings, and press listed under research sources below.
Key figures
latest reportedCompany-reported or press-reported figures, each dated to when it was claimed β not independently audited.
Competitors Β· 10
by search overlapCompanies competing with Mastra for the same Google search keywords, organic and paid, via search-intersection analysis.
Timeline Β· 6
launches, deals, and filingsSeries A of $22M led by Spark Capital, bringing total capital raised to $35M.
$22M source β
Mastra launched a commercial platform alongside its framework, comprising cloud-based and self-hosted Mastra Studio (evals, logs, traces, datasets, annotations), Mastra Server for deploying agents and workflows, and Memory Gateway for agent memory usable with Mastra or other frameworks.
Mastra organized a TypeScript AI conference in San Francisco in November 2025, expecting 300+ builders with speakers including David Cramer, Michael Grinich, Paul Klein and swyx.
Mastra announced a $13M seed round, raised in March 2025 after Y Combinator, backed by 120+ investors including Y Combinator, Paul Graham, Gradient Ventures, basecase capital, SV Angel and numerous founder angels.
$13M source β
Mastra wrote the book 'Principles of Building AI Agents' during Y Combinator and has distributed over 70,000 physical copies and 100,000+ digital copies since March 2025.
The founding team joined Y Combinator in January 2025; usage of the framework began growing rapidly around mid-February.
Dated company events from announcements, filings, and press; legal rows summarize public dockets and regulator releases.
In the news
npm Supply Chain Attack: North Korea Hits Mastra AI [2026]tech-insider.org Β· Jul 2026βΈResearch sources Β· 8
primary sources listed
- Mastramastra.ai Β· web
8 public sources were cited for this profile; the first-party ones are listed here.
Frequently asked questions
- What does Mastra do?
- Mastra is an open-source TypeScript framework and hosted platform for building, observing and operating AI agents.
- Who founded Mastra?
- Mastra was founded by Sam Bhagwat, Abhi Aiyer, Shane Thomas in 2024.
- Who are Mastra's investors?
- Mastra's investors include Y Combinator, Spark Capital, Broom Ventures, Gradient Ventures, Moonfire Ventures, SAV (Scale Asia Ventures), Transpose Platform Management, Lombardstreet Ventures and 2 more.
- Where is Mastra headquartered?
- Mastra is headquartered in San Francisco, US.







