Sam Bhagwat is the co-founder and chief executive of Mastra, an open-source TypeScript framework and platform for building production AI agents. Previously, he co-founded Gatsby Inc., the company behind the React-based web framework Gatsby.
A Stanford graduate, Bhagwat worked as an engineer at PlanGrid and Zenefits before becoming a core Gatsby contributor. In 2018, he and Gatsby creator Kyle Mathews founded Gatsby Inc., where Bhagwat became chief strategy officer. He wrote Modular: The Web’s New Architecture about headless content, e-commerce, web performance, and the organizational challenges of replacing monolithic websites. Netlify acquired Gatsby in 2023.
In October 2024, Bhagwat began building Mastra with fellow Gatsby veterans Abhi Aiyer and Shane Thomas. The company joined Y Combinator’s Winter 2025 batch, giving JavaScript and TypeScript developers tools for agents, workflows, memory, retrieval, evaluation, and tracing. Bhagwat also wrote Principles of Building AI Agents, a practical guide to building agent-based applications.
Mastra released version 1.0 in January 2026. That April, Bhagwat announced a $22 million Series A and the Mastra platform, extending the framework into deployment, evaluation, tracing, and persistent agent memory.
- Agents and workflows belong together. Agents handle uncertain, iterative tasks; workflows provide explicit sequencing, branching, and recovery. Bhagwat combines them: agents call workflows as tools, workflows invoke agents as steps, and supervisors coordinate specialized agents. His approach to hybrid agent architecture favors adding structure wherever autonomous behavior becomes unreliable.
- Developer experience determines whether powerful tools get used. Gatsby’s reliance on GraphQL taught Bhagwat that sophisticated abstractions can impose unnecessary conceptual overhead. He opposes agent frameworks that force teams to reason in graph nodes and edges, favoring readable code that makes execution order and control flow immediately visible.
- Agent harnesses make autonomous work durable. Beyond basic model calls and tool-using loops, Bhagwat emphasizes planning, persistent sessions, background execution, human approvals, context management, and parallel subagents. His analysis of coding-agent architecture examines how these capabilities support longer-running, interruptible, steerable work.
- Always-on agents need initiative. Bhagwat expects cloud sandboxes, persistent memory, scheduled activity, Slack, and messaging to turn coding assistants into always-on personal agents that notice events and resume work independently. He predicts consolidation among agent products because users have limited attention for assistants that lack frequent or substantial practical value.