Fundraising Fox

Mastra

YC W25

San Francisco, US Β· Founded 2024 Β· 30 employees Β· 34 known investors

mastra.ai β†—

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

AI & Machine LearningDeveloper ToolsEnterprise SoftwareArtificial IntelligenceOpen SourceAIUnited States of AmericaAmerica / CanadaFully Remote

Founders & leadershipΒ· Y Combinator alumni (W25)

Mastra was founded in 2024 by Sam Bhagwat, Abhi Aiyer, and Shane Thomas.

SBSam Bhagwat
Sam Bhagwatin𝕏founder / ceoSam Bhagwat was a cofounder of Gatsby.js, an open-source React framework, for approximately eight years before its acquisition by Netlify. He previously held early engineering roles at Zenefits and Plangrid, and holds a degree from Stanford University.
AAAbhi Aiyer
Abhi Aiyerin𝕏founder / chief technology officerAbhi Aiyer was a principal engineer and leader of Netlify's engineering organization, where he oversaw infrastructure for Gatsby Cloud that processed large-scale builds and content delivery.
STShane Thomas
Shane Thomasin𝕏Founder / Chief Product OfficerShane Thomas founded Mastra after previously building Audiofeed, an AI podcasting platform. He has held roles as staff engineer and head of product at Gatsby, with over 15 years of open source development experience.

Investors Β· 34

Also in the syndicate Β· 24

Adrien TreuilleAlex AtallahArash Ferdowsibasecase capitalConversionDavid CramerDefyDex HorthyFlo CrivelloFounders Hobby FundGarudaGuillermo RauchLiquid2LombardstreetMoonfirePalm DrivePaul GrahamRide Home FundRitualScale AsiaShay BanonTerrence RohanTransposeTristan Handy

Funding

SEC filings, press & company announcements

Source: company announcements and press reports β€” follow each round's link for the claim.

Company profile

researched Aug 2026

Mastra 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 reported
Agent runs per month within MongoDB infrastructureJan 202650,000 agent runs/month
Book copies distributedOct 202570,000 physical copies
GitHub commitsJan 202618,331 commits
GitHub forksJan 20262,700 forks
GitHub starsJan 202627,400 stars
HeadcountAug 202657
Marsh McLennan users of Mastra-powered agentic searchJan 2026100,000 employees
Salesforce agentic IDE developers on Mastra harnessJan 2026100,000 developers
Sanity content agent scaleJan 2026Content agent scaled to 30K+ organizations
Self-hosted plan priceJan 20260 USD/month
Supported model providersJan 202640 providers
Supported models via model routerJan 20261,000 models
Team sizeJan 202635 people
Total capital raisedApr 2026$35M
Weekly npm downloadsOct 2025190,000 downloads/week

Company-reported or press-reported figures, each dated to when it was claimed β€” not independently audited.

Competitors Β· 10

by search overlap
LangChain133 shared keywordsLangChain provides an agent engineering platform and open source frameworks for developers to build, test, and deploy AI agents that can use data and take actions. The platform includes LangSmith for observability and evaluation, and serves enterprise customers including 35% of the Fortune 500.
Hugging Face130 shared keywordsHugging Face is a collaboration platform that hosts and provides access to machine learning models, datasets, and applications. It offers both open-source tools for the ML community and paid compute and enterprise solutions for teams building AI applications.
OpenAI124 shared keywordsOpenAI is an AI research and deployment company focused on developing artificial general intelligence (AGI) with emphasis on safety and beneficial outcomes for humanity.
OpenRouter103 shared keywordsOpenRouter operates an AI gateway that allows developers to access and compare hundreds of language models from multiple providers in a single platform. The service eliminates vendor lock-in while offering improved pricing, uptime, and reliability for companies and developers.
Netezza98 shared keywordsIBM is a global technology company whose business spans enterprise software (including Red Hat, HashiCorp, and Confluent), IT infrastructure such as mainframes, servers, and storage, and IT consulting services. The company is also investing heavily in quantum computing and AI-based enterprise offerings, including its Lightwell open-source software security clearinghouse and the Anderon quantum wafer foundry.
OpenClaw90 shared keywordsOpenClaw is an open-source, self-hosted AI agent that runs on a user's own machine and performs personal tasks such as organizing email, sending messages, managing calendars, and checking in for flights, controlled through chat apps like WhatsApp and Telegram. Aimed at individuals and technical users who want a hackable personal assistant they control, it runs on macOS, Linux, and Windows and supports custom skills and plugins.</parameter> <parameter name="founders">[{"full_name": "Peter Steinberger", "title": "Creator", "twitter_handle": "steipete"}]
Vercel79 shared keywordsVercel is an infrastructure platform for building and deploying applications, with emerging support for agentic capabilities that allow AI agents and humans to collaborate in software development. The platform serves developers and agents building web applications and software.
OpenCode72 shared keywordsOpenCode is an open-source AI coding agent that assists developers with writing code across terminal, IDE, and desktop environments. It supports multiple LLM providers and prioritizes user privacy by not storing code or context data.
Cloudflare Turnstile70 shared keywordsCloudflare provides a global cloud network platform delivering security, performance, and development services through sixty-plus integrated services including SASE, application security, and full-stack development infrastructure.
DataCamp69 shared keywordsDataCamp is a learning platform for teams that teaches data and AI skills through hands-on coursework accessible via web browser and mobile app. It serves enterprise customers and development teams seeking to build technical capabilities.

Companies competing with Mastra for the same Google search keywords, organic and paid, via search-intersection analysis.

Timeline Β· 6

launches, deals, and filings
Apr 2026
Mastra raises $22M Series A led by Spark Capital

Series A of $22M led by Spark Capital, bringing total capital raised to $35M.

$22M source β†—

Apr 2026
Launch of the Mastra platform

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.

source β†—

Nov 2025
TS AI Conf in San Francisco

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.

source β†—

Oct 2025
Mastra announces $13M seed round

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 β†—

Mar 2025
Began distributing 'Principles of Building AI Agents' book

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.

source β†—

Jan 2025
Joined Y Combinator

The founding team joined Y Combinator in January 2025; usage of the framework began growing rapidly around mid-February.

source β†—

Dated company events from announcements, filings, and press; legal rows summarize public dockets and regulator releases.

In the news

β–ΈResearch sources Β· 8

primary sources listed

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.