Mastra Code: Gatsby Team Pivots to AI Coding Agents—Can 'Never Losing Context' Win the Day?
2026-02-28 | ProductHunt | Official Site
30-Second Quick Judgment
What is it?: An AI coding assistant built by the Gatsby founding team. Its core selling point is "never compacts"—using observational memory instead of traditional context compression so the agent doesn't forget things during long conversations. It runs in the terminal, features a Plan Mode (think first, act later) and a Build Mode (direct execution), and is powered by a TypeScript-first open-source AI agent framework.
Is it worth watching?: Absolutely, especially for TS developers. The Mastra framework is already the third fastest-growing framework in the JS ecosystem (150k+ weekly NPM downloads), backed by YC W25 and a $13M Seed round, with users like Replit, SoftBank, PayPal, Adobe, and Docker. However, Mastra Code as a standalone product just launched with only 127 PH votes, suggesting the product-level hype is still building. The framework is excellent; the product needs more observation.
Three Key Questions
Is it relevant to me?
Target Audience:
- Developers building AI applications daily using TypeScript/JavaScript.
- Those frustrated by the Python-centric ecosystem and complex abstractions of LangChain.
- Developers who want a terminal-based coding agent without installing IDE plugins.
Am I the target?: If you are building AI agents or apps with TypeScript and are tired of LangChain's layers of abstraction and debugging headaches, you are the target user. If you are a Python developer or just want a general-purpose assistant like Cursor/Copilot, Mastra Code might not be for you.
Use Cases:
- "Building a multi-step AI workflow with TS that requires tool calling, memory, and evals" → Mastra Framework + Mastra Code.
- "Long coding sessions where you don't want the agent to forget previous decisions halfway through" → Observational Memory solves this.
- "Already using Python + LangChain/CrewAI" → No immediate need to switch; the ecosystems are different.
Is it useful to me?
| Dimension | Benefit | Cost |
|---|---|---|
| Time | Shortened AI agent dev cycle (DX score 9/10, far exceeding LangChain's 5/10) | TypeScript-locked; cannot be used for Python projects |
| Money | Framework is completely free and open-source (Apache 2.0) | Mastra Code pricing not yet announced |
| Effort | Terminal-native, no IDE config; Plan/Build modes reduce rework | Requires understanding workflows and state concepts; learning curve exists |
ROI Judgment: If you are a TS developer working on AI projects, the Mastra framework is arguably the best choice available—it's free and offers a top-tier developer experience. Mastra Code is still very new; we suggest using the framework first and deciding on the Code product once it matures.
Is it delightful?
The Highlights:
- Observational Memory: Instead of compressing context, it observes, extracts, and reflects. This concept is much more advanced than brute-force compression for long chats.
- Plan + Build Modes: Researching and planning before execution is far more reliable than agents that "just start typing."
- Terminal Native: No browser or IDE plugins needed; for terminal enthusiasts, it feels like home.
The "Wow" Moment:
"The first time I replayed an agent run and actually understood why it failed, I realized how rare that experience is in AI development." — Medium Reviewer
Real User Feedback:
Positive: "You're not selling snake oil. You're selling tools. And tools I can debug, extend, and trust? That's a win." — Matt Pocock (TS Community Influencer)
Griticism: "The ecosystem is still early. It's hard to find ready-made examples to copy, unlike LangChain's abundance of templates." — C# Corner Developer Review
For Independent Developers
Tech Stack
- Language: TypeScript-first
- Runtime: Node.js
- Deployment: Supports Vercel, Cloudflare Workers, Netlify
- AI/Models: Unified interface for 40+ providers (OpenAI, Anthropic, Gemini, etc.), powered by Vercel AI SDK
- Observability: Built-in OpenTelemetry
- Dev Tools: Mastra Studio — An interactive UI for development and testing
Core Implementation
The core tech of Mastra Code is observational memory. Unlike traditional coding agents that perform "compaction" (discarding parts of the conversation) when the context is full, Mastra observes the chat, generates structured observations, and periodically reflects on them. This allows the agent to remember key decisions in long sessions without "forgetting why it started."
At the framework level, Mastra provides a complete toolchain for workflows, memory management, evals, and tracing, complemented by the Studio UI. Its DX score was rated 9/10 in comparative reviews, far surpassing LangChain's 5/10.
Open Source Status
- License: Fully Open Source (Apache 2.0)
- GitHub: https://github.com/mastra-ai/mastra
- NPM Downloads: 150,000+/week, the third fastest-growing JS framework in history
- Similar Projects: LangChain.js (same space but Python-first), Vercel AI SDK (underlying SDK)
- Build-it-yourself Difficulty: Medium — The framework is open-source and ready to use; the observational memory logic is clear enough for skilled devs to replicate elsewhere.
Business Model
- Monetization: Framework is free; enterprise services/hosting plans are expected (TBA)
- Funding: $13M Seed round
- Lead Investor: Y Combinator (YC W25)
- Users: Replit, SoftBank, PayPal, Adobe, Docker
Big Tech Risks
The AI agent framework space is competitive, but Mastra's positioning is relatively safe:
- vs Cursor/Windsurf: Mastra is a framework + agent, not an IDE. Not a direct competitor.
- vs LangChain: LangChain is Python-first; Mastra is TS-first. Their user bases rarely overlap.
- vs Vercel AI SDK: Mastra sits on top of Vercel AI SDK. Vercel is a potential acquirer rather than a threat.
The Real Risk: If Anthropic or OpenAI releases a native TS-first agent framework, or if Vercel moves further up the stack, Mastra's space could be squeezed. However, this risk is low for the next 12 months.
For Product Managers
Pain Point Analysis
-
What it solves:
- Existing coding agents lose info via compaction—forgetting key decisions from round 20 by round 200.
- TS developers lack high-quality AI frameworks (LangChain's TS support is often secondary).
- AI agent debugging is difficult; most agent behaviors are a "black box."
-
How painful is it?: High-frequency and essential for TS developers. AI agent development has moved from "experimentation" to "production," where DX directly impacts efficiency. Context loss is a universal pain point for all coding agent users.
User Persona
- Core User: TS/JS full-stack developers building AI features or AI-native apps.
- Expansion User: Frontend devs wanting to add AI capabilities using familiar TS instead of learning Python.
- Non-Target: Python/Go developers or frontend devs not involved in AI.
Feature Breakdown
| Feature | Type | Description |
|---|---|---|
| Observational Memory | Core | Replaces context compaction; retains info in long chats |
| Plan Mode | Core | Research + Planning mode; think before acting |
| Build Mode | Core | Execution mode; direct code writing |
| Terminal Native | Core | No browser or IDE dependency |
| Mastra Studio | Delight | Visual debugging and testing UI |
| Desktop Version | Delight | mastra-code-ui, a GUI entry point |
Competitive Differentiation
| vs | Mastra Code | Cursor | Claude Code | LangChain |
|---|---|---|---|---|
| Core Diff | Observational memory + TS Framework | IDE + AI Completion | Terminal Agent | Python Framework |
| Language Lock | TypeScript | Universal | Universal | Python-first |
| Dev Experience | DX 9/10 | 8/10 | 8/10 | 5/10 |
| Open Source | Apache 2.0 | No | No | MIT |
| Price | Framework Free | $20/mo | Pro $20/mo | Free |
Key Takeaways
- Observational Memory Design: Structured observation + reflection instead of brute-force compaction—a concept applicable to any long-context AI product.
- Plan/Build Dual Modes: Separating "thinking" from "doing" significantly reduces erratic agent behavior.
- DX-First Framework Design: TS type safety + built-in OpenTelemetry + Studio visualization = a tool developers actually want to use.
For Tech Bloggers
Founder Story
- Kyle Mathews: Co-founder of Gatsby—the framework that once dominated the React static site ecosystem. Transitioning from the King of SSG to AI agent frameworks is a compelling narrative.
- Abhi Aiyer: Former Lead Engineer at Gatsby.
- Shane Allen: Former Product Lead at Gatsby.
- Origin: In October 2024, the trio, frustrated by existing AI tools (hard to debug, Python-locked, complex), decided to rebuild using their expertise in TypeScript.
Narrative Angle: "The Gatsby Team's Second Act"—from React stars to AI challengers. Gatsby was a benchmark for React DX before being overtaken by Next.js. Can they reclaim their throne in the AI era with that same obsession for DX?
Discussion Points / Controversies
- Is TypeScript-lock a pro or a con? It excludes Python/Go devs but offers the ultimate TS experience. In a Python-dominated AI world, is TS-first brave or limiting?
- Matt Pocock's Endorsement: One of the most influential figures in the TS community publicly stated, "You're not selling snake oil." This carries massive weight.
- Framework vs. Product: Is Mastra a framework or a product? The framework is growing fast, but the product's (Mastra Code) hype and pricing are still unclear.
Hype Data
- PH Votes: 127—Moderate to low, suggesting consumer-level hype hasn't peaked yet.
- NPM Downloads: 150k+/week—Extremely high developer validation at the framework level.
- Enterprise Clients: Replit, SoftBank, PayPal, Adobe, Docker—Strong corporate backing.
- Funding: YC W25 + $13M Seed, with personal investment from Paul Graham.
Content Suggestions
- Angles: "The Gatsby Team's AI Pivot"; "Why TS Developers Finally Have Their Own AI Framework."
- Trend-jacking: The AI coding agent space is exploding (Cursor, Claude Code). Mastra Code's "never compacts" is a unique differentiator.
For Early Adopters
Pricing Analysis
| Tier | Price | Included Features | Is it enough? |
|---|---|---|---|
| Mastra Framework | Free (Apache 2.0) | Full framework: workflows, memory, evals, tracing, Studio | Plenty for building AI apps |
| Mastra Code | TBA | Coding agent: plan mode, build mode, observational memory | TBD |
Note: Specific pricing for Mastra Code is not yet public. The framework itself is fully free and feature-rich.
Getting Started
- Setup Time: 15 mins for the framework, ~5 mins for Code.
- Learning Curve: Moderate—requires understanding workflows and state, but feels natural for TS devs.
- Steps:
npm install mastrato install the framework.npx mastra initto initialize your project.- Mastra Code:
npx mastra-codeto start the agent. - Use natural language in the terminal; Plan mode first, then Build mode.
- Use Mastra Studio (
npx mastra dev) to visualize agent behavior.
Pitfalls and Gripes
- TS Only: If your backend is Python or Go, Mastra won't help you. It is not a universal framework.
- Early Ecosystem: Fewer copy-paste examples than LangChain; documentation is still catching up.
- Known Bugs: Recent fixes for JSON parsing, Fastify CORS, and Cloudflare Workers compatibility (Source: Feb 2026 changelog).
Security and Privacy
- Data Storage: Runs locally; code and chats stay on your machine.
- Auditability: Apache 2.0 open-source; code is fully reviewable.
- Model Interaction: Calls third-party APIs via Vercel AI SDK; data security depends on your chosen provider.
For Investors
Market Analysis
- Sector: Intersection of AI Agent Frameworks and AI Coding Tools.
- AI Agent Framework Market: Projected $7.6B-$8B by 2025, 42-50% CAGR.
- AI Coding Tools: Cursor's ARR exceeds $300M; the sector is growing rapidly.
- Drivers: Enterprise AI is moving to production, requiring reliable frameworks; TS dominance in full-stack continues to grow.
Competitive Landscape
| Tier | Player | Positioning |
|---|---|---|
| Leader | LangChain ($2.9B Val) | Python-first AI framework, first-mover advantage |
| Leader | Vercel (AI SDK) | Low-level SDK, platform infrastructure |
| Mid-Tier | CrewAI, AutoGen | Multi-agent collaboration frameworks |
| Newcomer | Mastra ($13M Seed) | TypeScript-first, DX-driven |
Timing Analysis
- Why now?: Demand for TS-native AI tools is surging, while LangChain's TS support remains a "second-class citizen." There is a clear market gap. Simultaneously, Cursor and Claude Code have proven that developers will pay for AI coding tools.
- Market Readiness: 150k+ weekly NPM downloads prove product-market fit at the framework level.
Team Background
- Kyle Mathews: Gatsby co-founder; deep understanding of dev tools and DX design.
- Core Competency: This team built one of the most successful frameworks in the React ecosystem. Their understanding of "Developer Experience" is battle-tested.
Funding Status
- Raised: $13M Seed round.
- Lead: Y Combinator (YC W25).
- Others: Paul Graham, Gradient Ventures, 120+ angel investors.
Conclusion
The Mastra framework is currently the best choice for the TypeScript AI ecosystem—leading in DX, growing fast, and backed by major players. Mastra Code as a product is early; the observational memory concept is brilliant but needs more real-world validation. "Adopt the framework now, watch the product" is the most logical stance.
| User Type | Recommendation |
|---|---|
| Developer | Strong Buy (TS Devs) — Free, open-source, DX 9/10, 150k+ downloads. Python devs can skip. |
| Product Manager | Watch — The design of observational memory and plan/build modes is worth studying for other AI products. |
| Blogger | Write — The "Gatsby team pivot" is a great story, though PH votes suggest moderate consumer hype; focus on the framework. |
| Early Adopter | Use the framework today, wait on Code — Framework is mature; Code pricing and features are still evolving. |
| Investor | Bullish — $13M Seed + YC + PG; 150k+ downloads prove PMF at the framework level; key is Code's monetization. |
Resource Links
| Resource | Link |
|---|---|
| Official Site | mastra.ai |
| GitHub | mastra-ai/mastra |
| Mastra Code Blog | Announcing Mastra Code |
| Documentation | mastra.ai/docs |
| Langfuse Comparison | AI Agent Comparison |
| Matt Pocock Review | Matt Pocock Meets Mastra |
| Funding News | TechNews180: Mastra Raises $13M |
2026-02-28 | Trend-Tracker v7.3