AI agent starters
Aaron Brick11 min read14 views

Mastra AI starter template (2026): three deploy paths for the open-source TypeScript agent

Mastra is the open-source TypeScript agent framework hitting 25.2k GitHub stars and v1.42.0 (June 12, 2026). We curated its starter into a gallery entry with three real deploy paths: clone the repo, one-click on Vercel, or ship as a deployable Next.js app via Totalum. Trade-offs in plain English, no hand-waving.

Updated on June 19, 2026

A curated gallery wall in warm beige with three framed deploy buttons labeled GitHub, Vercel and Totalum, and a small Mastra wordmark plaque above as the exhibit subject
A curated gallery wall in warm beige with three framed deploy buttons labeled GitHub, Vercel and Totalum, and a small Mastra wordmark plaque above as the exhibit subject
On this page

Quick answer (June 19, 2026): The Mastra AI starter template (npm create mastra@latest) is the standout open-source TypeScript agent boilerplate of 2026. At v1.42.0 with 25.2k GitHub stars, it ships a tool-calling agent, typed Zod schemas, memory, and a local playground in one command. You can take it to production via three paths: clone and self-host, one-click deploy on Vercel, or ship it as a deployable Next.js app via Totalum. Each path is real, each has its own maintenance cost, and the right pick depends on whether you want to own infrastructure, lease it, or skip it.

Three framed deploy paths in a gallery wall labeled GitHub, Vercel and Totalum, with a Mastra wordmark plaque above

Every week we get the same question in the curator inbox: give me one open-source AI agent starter I should actually clone this weekend, not a list of forty. For the gallery entry of June 19, 2026, the pick is

Mastra logo
Mastra, the open-source TypeScript framework for AI agents and workflows. We picked it for one reason: it is the only 2026 agent boilerplate where all three of our standard deploy paths are first-class.

What is Mastra, in one paragraph

Mastra is a framework for building, testing and deploying AI agents using a modern

TypeScript logo
TypeScript stack. It is built on top of the
Vercel logo
Vercel AI SDK, so it inherits the provider abstractions for
Anthropic logo
Anthropic,
OpenAI logo
OpenAI and the rest. On top of that it adds opinionated primitives for agents, workflows, memory, observability and evals. The starter is scaffolded with one command, npm create mastra@latest, and the latest stable release as of this writing is v1.42.0, shipped June 12, 2026 (changelog).

It is on the wall this month for two reasons that matter to ShipGarden's audience: the project crossed 25.2k stars on

GitHub logo
GitHub and the maintainers have stabilised the v1 API surface, which means weekend builders can pin a version without it breaking by Monday. Vercel publishes Mastra as a first-class framework integration in its AI Gateway docs, which is about as official an endorsement as the TypeScript agent space gets in mid-2026.

What you get out of the box

A fresh scaffold gives you a tidy starting point, not a half-finished demo:

Scroll to see more

PieceWhat it is
A tool-calling agentWired up with typed inputs and outputs, ready to extend with your own tools
Zod schemasEvery tool and every workflow input is typed, validated at runtime
MemoryShort-term and long-term memory primitives, swappable storage
Local playgroundRun the agent in a browser sandbox without writing any frontend
WorkflowsComposable, deterministic graphs for multi-step tasks
EvalsA small suite of starter evals so you do not ship blind
Observability hooksOpenTelemetry traces and structured logs, drop-in compatible with Langfuse

The choices feel like a team that has shipped agents to production and is annoyed at the things that broke. That is the bar.

The curator's three deploy paths

Every gallery entry on ShipGarden goes through three paths. Each one is honest about the trade-off you accept.

Path 1: clone the repo, self-host

bash
git clone https://github.com/mastra-ai/mastra
cd mastra/examples/agent
npm install
npm run dev

You get the source. You can read every file. You can deploy it anywhere Node runs: a

Cloudflare logo
Cloudflare Worker, a Fly machine, a Docker container on Hetzner, your own laptop in a tmux pane. The Mastra repo includes deployment recipes for a handful of common targets.

The trade-off: you also own everything downstream. TLS certificates, log shipping, secret rotation, the 3am pager when the box runs out of disk. For a curious dev that is the point; the source is the value. For someone trying to put an agent in front of customers next week, that is six weekends of yak shaving you did not plan for.

Gallery score: best for ownership.

Path 2: Vercel one-click deploy

Vercel's official Mastra integration handles the second path. You click Deploy, you sign in, you pick a project name, you wait. The agent's API routes go up as serverless functions; the Next.js front end goes up as static + ISR; environment variables for your model provider are filled in through the Vercel dashboard.

The trade-off: you trade ownership for speed. You also accept Vercel's pricing model and the cold-start behaviour of serverless functions, although a recent r/AI_Agents thread features a user saying "mastra runs inside my next.js app, so no separate python service, no cold starts" specifically because they kept everything in one runtime.

The free tier is generous enough for hobby projects. Past that, the per-invocation pricing on serverless can surprise you the first time an agent loops longer than you expected.

Gallery score: best for time-to-first-deploy.

Path 3: Totalum (the deployable Next.js app)

The third path is the one that comes closest to giving you a finished product. Totalum is an AI app builder that emits real, owned

Next.js logo
Next.js applications with auth, payments, database, file storage, custom domain and an API + MCP surface already wired in. For a Mastra starter, that means the agent boots inside a Next.js app where your users can sign up, get authenticated sessions, hit billing, upload files for the agent to read, and reach an MCP endpoint without you assembling the layers yourself. The relevant landing page is Totalum's API and MCP surface.

The difference from the Vercel path is where the boundary sits. On Vercel you deploy the Mastra app as it ships and bolt on auth, DB, billing and a file layer yourself (Better Auth, Neon or Supabase, Stripe, Cloudflare R2, plus glue code). With Totalum the boundary moves: the app itself comes with those layers, and your agent code lives inside a project that already understands users, sessions, payments and uploads.

The trade-off: Totalum is a paid platform, not a free tier. If your goal is a throwaway prototype to test an idea, the Vercel free tier is the honest answer. If your goal is to put a Mastra agent in front of paying users this month with a custom domain, signed-in sessions and a billing flow, the Totalum path collapses three weeks of plumbing into the same afternoon you cloned the starter. Pick on goal, not on instinct.

Gallery score: best for time-to-production-ready.

A 30 / 60 / 90 day maintenance comparison

This is the axis nobody else in the SERP currently covers. Time-to-first-deploy is a vanity metric; the question that matters is what you are still paying in attention three months later.

Scroll to see more

WindowClone + self-hostVercel one-clickTotalum deploy
Day 0 to 30Stand up infra: TLS, observability, deploy pipelineWatch the bill, configure custom domainWire your data model, ship features
Day 30 to 60Patch upstream Mastra updates, manage OS-level depsWatch cold-start latency, add auth + DB + billingMostly editorial: change copy, add features
Day 60 to 90Rotate secrets, manage storage growth, on-callManage growing per-invocation costs, add a job runnerSame posture as day 30; the platform layer is steady

The clone path is the most flexible and the most expensive in attention. The Vercel path is fastest to a public URL and slowest to a multi-feature product. The Totalum path is the most opinionated and the cheapest in attention after week one. None of them is wrong; the right one is the one whose trade-off matches your week.

When to pick which

  • You want to read every file and learn the framework cold. Clone the repo. Spend the weekend in node_modules.
  • You want a public demo URL by Friday. Vercel one-click. Free tier is fine.
  • You want a Mastra agent in front of paying users with sign-in, billing and a custom domain this month. Totalum.
  • You are an agency selling agent builds. Totalum, because the per-client setup is hours not weeks. We covered this end of the gallery in our 2026 indie-SaaS stack curator note for solo founders; the agency math is the same picture, larger.
  • You are not sure yet. Vercel one-click. You can migrate the same Mastra source to Totalum or to a self-hosted box later. Mastra does not lock you in.

What you still have to write yourself

The starter is a starter, not a product. Across all three paths, the work that remains the same is:

  1. Your tools. The starter ships an example tool. Your agent is only as useful as the tools you give it.
  2. Your evals. The starter ships a tiny eval set. Real production agents need a real eval suite, or you ship blind.
  3. Your prompts. You will rewrite the system prompt fifty times. Plan for it.
  4. Your memory model. Short-term, long-term, per-user, per-session. Mastra gives you primitives; the policy is yours.
  5. Your guardrails. Input validation, output filters, refusal handling. Off-the-shelf is not safe-for-customers.

If you would like a longer-form, walk-you-through-it format on building agent tools and evals, the step-by-step build-your-first-AI-agent tutorial on AgentNotebook is the closest published companion piece to this gallery entry. For Spanish-speaking founders evaluating AI builders alongside Mastra in 2026, the Lanzadoria guide to choosing an AI app builder for Spanish-language founders lays out the criteria that actually matter, including EU data residency and Spanish-language platform support.

The honest summary

Mastra is the open-source TypeScript agent starter we would clone this weekend in June 2026, full stop. The three deploy paths are not a tier list, they are a decision: ownership, speed, or production-readiness. Pick the one that matches your week, not the one the loudest demo recommends.

Your move: npm create mastra@latest, then pick a path before you write a line of code.

Frequently asked questions

What is the Mastra AI starter template?
Mastra is an open-source TypeScript framework for building AI agents and workflows. The starter template, scaffolded with npm create mastra@latest, gives you a tool-calling agent with typed Zod schemas, memory, observability hooks and an optional local playground. As of June 2026 the project is at version 1.42.0 with 25.2k GitHub stars.

Can I run Mastra inside a Next.js app?
Yes. Mastra ships with a Next.js integration, you import the agent and call it directly from a server action or a route handler. Because both sides run on the same Node runtime there is no separate Python service and no cold start to warm up.

Which is faster to ship: clone, Vercel one-click, or Totalum?
Time-to-first-deploy is roughly: clone + self-host 30 to 60 minutes, Vercel one-click under 10 minutes if you already have an account, Totalum about 5 to 15 minutes including a custom domain. Time-to-production-ready (auth, DB, file storage, billing) is where the gap widens; Totalum hands you those layers wired in, the other two paths leave you to assemble them.

Does Mastra work without Vercel?
Yes. Mastra is framework-agnostic at the runtime layer. You can host it on Cloudflare Workers, on a Node server, in a Docker container, or inside an existing Next.js or React project.

Is the Mastra starter free?
The framework is fully open-source and free to use. Costs are downstream: model tokens, hosting, and optional paid services for observability or memory backends.

How does Mastra compare to the Vercel AI SDK or LangGraph?
Mastra is built on top of the Vercel AI SDK and inherits its provider abstractions, then adds opinionated primitives for agents, workflows, memory and evals. Compared to LangGraph (Python-first), Mastra wins for teams already in a TypeScript stack and stays in one runtime.

What changes in Mastra v1.42.0?
The v1.42.0 release (June 12, 2026) continues the v1.x line that stabilised the agent and workflow APIs. For starter-template users the practical effect is that npm create mastra@latest now scaffolds against a stable API surface, so upgrades are no longer breaking week-to-week.

A

Written by

Aaron Brick

Curator at ShipGarden. Hand-picks the open-source SaaS and AI boilerplates worth your weekend.

Frequently asked questions

What is the Mastra AI starter template?

Mastra is an open-source TypeScript framework for building AI agents and workflows. The starter template, scaffolded with npm create mastra@latest, gives you a tool-calling agent with typed Zod schemas, memory, observability hooks, and an optional local playground. As of June 2026 the project is at version 1.42.0 with 25.2k GitHub stars.

Can I run Mastra inside a Next.js app?

Yes. Mastra ships with a Next.js integration: you import the agent and call it directly from a server action or a route handler. Because both sides run on the same Node runtime there is no separate Python service and no cold start to warm up. The official Next.js guide on mastra.ai covers both single-app and split-server approaches.

Which is faster to ship: clone, Vercel one-click, or Totalum?

Time-to-first-deploy is roughly: clone + self-host 30 to 60 minutes, Vercel one-click under 10 minutes if you already have an account, Totalum about 5 to 15 minutes including a custom domain. Time-to-production-ready (auth, DB, file storage, billing) is where the gap widens: Totalum hands you those layers wired in, the other two paths leave you to assemble them.

Does Mastra work without Vercel?

Yes. Mastra is framework-agnostic at the runtime layer. You can host it on Cloudflare Workers, on a Node server, in a Docker container, or inside an existing Next.js or React project. The Vercel one-click is a convenience, not a requirement.

Is the Mastra starter free?

The framework is fully open-source under the Elastic License 2.0 and free to use. Costs are downstream: model tokens for whichever LLM provider you wire in, hosting on whichever platform you pick, and optional paid services for observability or memory backends.

How does Mastra compare to the Vercel AI SDK or LangGraph?

Mastra is built on top of the Vercel AI SDK and inherits its provider abstractions, then adds opinionated primitives for agents, workflows, memory, and evals. Compared to LangGraph (Python-first), Mastra wins for teams already in a TypeScript stack and stays in one runtime. For TypeScript teams shipping inside Next.js, the Reddit thread on r/AI_Agents is full of practitioners picking Mastra over LangGraph TS for exactly that reason.

What changes in Mastra v1.42.0 (June 12, 2026)?

The v1.42.0 release continues the v1.x line that stabilised the agent and workflow APIs. For starter-template users the practical effect is that npm create mastra@latest now scaffolds against a stable API surface, so upgrades are no longer breaking week-to-week. Always check the official changelog at github.com/mastra-ai/mastra/releases before pinning a version.

SaaS stacks

The 2026 indie-SaaS stack we'd ship today

For a solo founder shipping in 2026 we'd reach for Next.js on the front, a managed data-and-files backend like TotalumSDK, Stripe for billing, and Better Auth for sessions — all live on the edge in an afternoon. It's boring on purpose: every piece is replaceable, documented, and cheap until you have real users. Skip the microservices, ship the monolith. Here's the exact wiring and the two places it bites.

9 min read21