Mastra AI vs Vercel Eve: which TypeScript agent framework to use
Mastra AI vs Vercel Eve as a TypeScript agent framework choice: code-first workflows vs filesystem-first durable sessions — when to use each.

If you need an ai agent framework in TypeScript in 2026, two names dominate architecture reviews: Mastra AI and Vercel Eve.
They overlap on tools, models, sessions, and observability — but they encode different bets. Mastra AI is a batteries-included TypeScript agent framework you compose in code and run on any Node-compatible host. The Eve agent framework is filesystem-first: it compiles an agent/ directory into an app, with the deepest leverage on Vercel Workflows, Sandbox, and AI Gateway.
This post is a practical Mastra AI vs Vercel Eve decision guide for senior engineers — close to documented primitives, not hype. (If you are comparing ecosystems more broadly, teams often also ask Mastra vs LangChain; that is a different axis — Python-heavy orchestration vs TypeScript product agents — covered briefly at the end.)
TL;DR: Mastra AI or Eve agent framework?
- Prefer Mastra AI when… — Prefer Eve when…
- The agent is a product backend you must keep cloud-portable — You are Vercel-native and want agents as platform primitives
- You need explicit graph workflows (
.then/.branch/.parallel) with typed I/O — You want durable sessions that survive cold starts/deploys via Workflows - You want memory + RAG + evals + Studio in one TypeScript story — You want directory conventions (
instructions.md,tools/,skills/,channels/) - You embed agents inside an existing Node/Next service you own — You want sandbox-isolated model-driven bash/file work on Vercel Sandbox
- Maturity matters more than beta DX — Fastest path scaffold → Slack/HTTP on Vercel matters more than portability
Both are TypeScript. Both use Zod-shaped tools. Neither replaces eval/ops discipline.
What Mastra AI is
Mastra AI is an open-source TypeScript framework for AI applications and agents: agents, workflows, memory, workspaces, and observability in one modular stack. Embed in React/Next/Node or deploy a standalone server. Core is Apache 2.0.
Canonical agent shape (from docs):
import { Agent } from '@mastra/core/agent'
import { createTool } from '@mastra/core/tools'
import { z } from 'zod'
export const weatherTool = createTool({
id: 'get-weather',
description: 'Get current weather for a location',
inputSchema: z.object({ location: z.string() }),
execute: async ({ location }) => {
return { location, temperatureCelsius: 21, conditions: 'sunny' }
},
})
export const weatherAgent = new Agent({
id: 'weather-agent',
name: 'Weather Agent',
instructions: 'You are a helpful weather assistant.',
model: 'openai/gpt-5.6-sol', // provider/model string
tools: { weatherTool },
})
Register into a Mastra instance, then generate() / stream(). Docs are explicit: use agents for open-ended work; use workflows when steps are known and you want structured control flow. That split is why Mastra AI works well as a TypeScript AI agent framework inside product codebases.
What the Eve agent framework is (Vercel)
Eve is an open-source, filesystem-first framework for durable backend agents. Official Vercel docs mark it beta. You author under agent/; Eve discovers files, validates them, compiles a manifest, and serves a runnable app — locally, on Vercel, or on a long-running Node host.
agent/
instructions.md # always-on system prompt
agent.ts # defineAgent({ model })
tools/*.ts # one tool per file; filename = tool name
skills/* # on-demand procedures
subagents/* # delegated child agents
channels/* # HTTP, Slack, …
connections/* # typed integrations
sandbox/* # isolated compute
instrumentation.ts # optional OTel
import { defineAgent } from 'eve'
export default defineAgent({
model: 'openai/gpt-5.4-mini',
})
On Vercel, model strings resolve through AI Gateway. Sessions are durable on Vercel Workflows; sandboxed execution can use Vercel Sandbox. Dashboard Agent Runs shows sessions, turns, tools, timing, tokens. The public repo is often referenced as vercel/eve on GitHub.
Authoring model: Mastra AI code vs Eve filesystem
This is the sharpest split between Mastra AI and the Eve agent framework.
Mastra AI expects you to write a TypeScript application. Agents, tools, and workflows are modules you import, register, and call — familiar if you already ship services.
Eve expects you to grow a directory. Adding a tool is adding agent/tools/get_weather.ts. Skills stay out of the always-on prompt until loaded. If your team likes Next.js file conventions, this transfers cleanly.
Reviewer questions:
- Mastra AI: “Where is the workflow graph and how do we type the step contracts?”
- Eve: “What is the agent’s surface area on disk, and which channel owns ingress?”
Orchestration: Mastra AI workflows vs Eve durable sessions
Mastra AI workflows
Graph-shaped and developer-owned: createStep + createWorkflow, then .then(), with branching/parallel primitives. Suspend/resume, streaming, shared state, agents callable from steps. Studio visualises the graph.
Use when the business process is mostly known: intake → enrich → approve → write-back.
Eve durable sessions
Primary durability unit is the session: started by a channel or HTTP request, persisted via Workflows through cold starts, redeploys, and long pauses. Clients reattach with a session id.
Use when the unit of work is a long-lived agent interaction and the platform should own resume semantics.
Review heuristic: process death mid-task on Vercel → Eve sessions. Deterministic multi-step business logic with human gates → Mastra AI workflows (optionally plus Inngest/Temporal later).
Tools, skills, subagents
- Concern — Mastra AI — Eve agent framework
- Tool definition —
createTool+ Zod; register onAgent—defineToolper file undertools/; filename = name - Skills / procedures — Workspaces / filesystem skills — First-class
skills/loaded on demand - Subagents / multi-agent — Supervisor patterns, agent networks —
subagents/with fresh history; built-inagenttool - Channels — Slack/Discord/Telegram paths documented —
channels/as ingress (HTTP, Slack, …)
Eve pushes harder on skills vs always-on instructions (context budget). Mastra AI pushes harder on workflows as a separate primitive from the agent loop.
Memory, RAG, evals, observability
Mastra AI ships a full memory stack (recent messages, semantic recall, observational memory), RAG primitives, scorers/evals, traces/metrics, and local Studio — the “ship a product agent without five libraries” pitch.
Eve ships strong run observability (Agent Runs; optional OTel) and eval suites in the launch story, but memory/RAG are less of a single opinionated product layer. Durability and sandboxing are the headline infrastructure.
Sandbox and deployment (Mastra AI vs Vercel Eve)
Eve treats sandbox as first-class (sandbox/; Vercel Sandbox microVMs). Mastra AI’s classic default is tools in your process unless you build isolation — though workspace/filesystem features are expanding.
- Mastra AI: Node anywhere; optional Vercel/Netlify/Cloudflare deployers; standalone Hono-style server. Portability is a feature.
- Eve: Runs locally and can self-host, but production value peaks on Vercel. Beta terms apply.
If you might leave Vercel in 18 months, Mastra AI is the safer default. If you are all-in on Vercel Functions + Workflows, Eve is coherent.
Where Mastra vs LangChain fits
Search interest in Mastra vs LangChain is real, but it is usually the wrong primary question for a TypeScript product team. LangChain/LangGraph dominate Python-centric orchestration; Mastra AI is purpose-built as a TypeScript agent framework with workflows, memory, and Studio in-process. Eve competes with Mastra AI on the TypeScript/Vercel axis, not as a LangChain replacement. Pick the language and deploy gravity first; then pick the framework.
Architecture review checklist
- Control flow known? → Mastra AI workflow. Durable conversation/job? → Eve session (or Mastra AI + external durability).
- Must run off Vercel unchanged? → Mastra AI. Vercel as runtime of record? → Eve is in play.
- Need memory/RAG/evals packaged? → Mastra AI.
- Model needs isolated shell/filesystem day one? → Eve.
Prototype the hard path — not a weather demo.
Same weather tool, two shapes
Mastra AI — module passed into the agent (see earlier).
Eve — file the runtime discovers:
// agent/tools/get_weather.ts
import { defineTool } from 'eve/tools'
import { z } from 'zod'
export default defineTool({
description: 'Get the current weather for a city.',
inputSchema: z.object({ city: z.string() }),
async execute(input) {
return { city: input.city, condition: 'Sunny', temperatureF: 72 }
},
})
Same Zod instinct. Different packaging — and that packaging scales into PR review and onboarding.
When not to use either
- Chat UI + tool calling in a Next route → Vercel AI SDK / provider SDKs first.
- Python-first research stacks → LangGraph/Crew-class may fit better than forcing TypeScript.
- Need a vendor to own a fixed deliverable → wrong layer; frameworks are not delivery ownership.
How Devspace applies Mastra AI vs Eve
We treat framework choice as an architecture constraint:
- Greenfield TypeScript product agents with portability → Mastra AI is usually the default.
- Internal ops agents on an existing Vercel footprint → Eve agent framework is a strong candidate (eyes open on beta churn).
- Either way: senior engineers embed in your repo, enforce eval gates, keep tool blast radius explicit — AI consulting · AI-enabled engineers.
Bottom line
Mastra AI is the TypeScript agent application framework: code-first agents, first-class workflows, memory/RAG/evals, deploy-anywhere Node.
Eve is the TypeScript platform convention for an eve agent framework: filesystem-first authoring, durable sessions, sandbox + channels, deepest on Vercel, still beta.
Pick the gravity you will inherit — then invest in tool permissions, evals, and ownership before the demo looks too good.
Tell us what you need. We'll find the right engineers.
Whether you need senior developers embedded in your team, a Fractional CTO, or a technology assessment before a deal — most engagements start within 2–4 weeks.
Or email us directly at post@devspace.no to get a free consultation.