abhishek.it
Back to writing
·
#ai-agents#agent-frameworks#deepagents#eve#mastra#langchain#vercel#typescript#python#benchmark

DeepAgents vs Eve vs Mastra: I Benchmarked the New Agent Frameworks (July 2026)

Three new agent frameworks shipped in 2026. I ran the same coding task on all three with Claude Opus 4.8. DeepAgents: 51s. Eve: 74s. Mastra/AI SDK: 80s. All passed 30/30. They diverge on architecture, context management, and what happens when your agent runs for 50+ turns.

July 2026. The numbers below are from real runs on my MacBook: same locked test suite, same model (Claude Opus 4.8), same task. Nothing is mocked or estimated.

Quick verdict

  • DeepAgents if you are building a coding agent or anything that runs for 50+ turns. Built-in context compression, checkpoint durability, subagent delegation. Python-first. The fastest in my benchmark (51.5s).
  • Eve if you are building a deployed service agent (Slack bot, GitHub integration, scheduled tasks). Native channels, durable workflows, managed sandbox on Vercel. TypeScript. Convention over configuration.
  • Mastra if you are embedding agent features into an existing product. A library, not a runtime. Self-host anywhere. TypeScript. No platform coupling, no sandbox included.

Frameworks at a glance

DeepAgentsEveMastra
MaintainerLangChainVercelMastra (ex-Gatsby team)
LanguagePython + JSTypeScriptTypeScript
LicenseMITApache-2.0MIT
GitHub stars~26.8k~4.1k~22k
ParadigmLangGraph state machineConvention-over-config (directory = agent)Library + AI SDK v7
Model supportany (LangChain providers)any (Vercel AI Gateway)any (built-in providers)
Context managementauto-summarization at 85% windownone documentednone (manual)
Sandboxbuilt-in shell + QuickJSDocker / Vercel managednone (BYO)
DurabilityLangGraph checkpointsWorkflow SDKInngest
MCPyesyesyes

The benchmark

Same task from my previous comparison: write a ledger.py module that passes 30 locked pytest tests for a double-entry accounting ledger. The agent gets the test file, reads it, writes the implementation, runs pytest, iterates until green. No hints, no scaffolding, no pre-written code. Model locked to Claude Opus 4.8 across all three.

FrameworkTests passedWall clockStepsNotes
DeepAgents30/3051.5s6 steps, 30 eventsFirst try, zero iterations
Eve (Docker sandbox)30/3073.6s5 steps, 5 tool calls~5s spent on pip install pytest
Mastra (AI SDK v7)30/3080.1s4 stepsFirst try, zero iterations

All three passed on the first attempt. Opus 4.8 is strong enough that none needed a fix-and-retry loop. The wall clock spread (51s to 80s) is interesting but not the main story. On a bounded 5-turn task, all three produce identical outcomes. The differences emerge at scale: long-running agents, many iterations, crash recovery.


DeepAgents

What it is. Claude Code's architecture extracted and generalized on top of LangGraph. A complete harness for autonomous coding agents: planning, filesystem access, subagents, context compression, skills, persistent memory. You install it, point it at a model, and you have a working agent.

How it works. The agent is a LangGraph state machine. Nodes represent stages (planning, tool execution, evaluation). Edges are model-driven transitions. Each tool call is a graph step with a full state checkpoint. The runtime is compiled Python with async I/O.

In my benchmark, DeepAgents emitted 30 event updates across 6 steps. Each event is a state transition: plan created, tool called, result received, evaluation passed. The overhead per transition is minimal. 51.5 seconds total.

Strengths

  • Context compression at 85% window usage. Older turns get summarized, recent ones stay verbatim. A 100-turn agent stays cost-bounded.
  • Subagent delegation (sync and async). Background tasks with task_id for monitoring.
  • Filesystem state is part of the checkpoint. Process crash? Resume from exactly where you left off.
  • Prompt caching for Anthropic/Bedrock models.
  • Model-agnostic. Works with any LangChain provider.

Limitations

  • Python-first. The JS port exists but lags behind.
  • Requires LangSmith for observability (or self-host the traces).
  • More complex initial architecture than the other two. The graph model has a learning curve.

Best for. Long-horizon coding agents, research agents, any agent that runs 50+ turns and needs to stay coherent and cost-efficient. If your agent iterates on code for minutes or hours, DeepAgents is the only one here that manages the context window for you.


Eve

What it is. Vercel's answer to "what if building an agent was like building a Next.js app." An agent is a directory: agent.ts for the model, instructions.md for the system prompt, tools/ for capabilities, sandbox/ for compute. Convention over configuration. Deploys with vercel deploy.

How it works. Turn-based loop. The model requests actions (file writes, shell commands) and Eve executes them in a sandboxed container. Each turn streams as NDJSON events: session.started, turn.started, actions.requested, action.result, turn.completed. The model sees the full conversation history each turn.

For local development, Eve offers three sandbox backends: justbash() (JavaScript-only emulated shell), docker() (full Linux container with Python 3.14), and microsandbox(). In production on Vercel, the sandbox is managed infrastructure.

// agent/sandbox/sandbox.ts
import { defineSandbox } from "eve/sandbox";
import { docker } from "eve/sandbox/docker";
 
export default defineSandbox({
  backend: docker({
    image: "ghcr.io/vercel/eve:latest",
    pullPolicy: "never",
  }),
});

In my benchmark, Eve took 5 steps: read tests, write ledger.py, install pytest, run pytest, confirm pass. 73.6 seconds total.

Strengths

  • Native channels: Slack, Discord, Teams, Telegram, GitHub, Linear. Your agent lives where your team communicates.
  • Durable workflows via the Workflow SDK. Survives deploys, auto-resumes.
  • Built-in evals (eve eval).
  • Convention-over-configuration means you are productive in an afternoon.
  • Managed sandbox on Vercel handles isolation without you thinking about it.

Limitations

  • No built-in context compression. Full transcript replayed each turn.
  • Platform coupling for managed features (sandbox, channels, persistence).
  • Still beta. "Subject to change before general availability."
  • The justbash() backend is JavaScript-only. For system tools (Python, pip, git) you need docker().

Best for. Deployed service agents. Slack bots, GitHub integrations, scheduled automations, support agents. Anything that responds to external events, needs to survive deploys, and integrates with communication tools. If you are a TypeScript team already on Vercel, Eve gives you the full stack.


Mastra

What it is. A TypeScript framework for teams building agent-powered products. Workflows, memory, RAG, observability, evals, a local Studio UI. Durable execution via Inngest. No platform lock-in. No native sandbox. It is a library you install into your app, not a runtime you deploy to.

How it works. Under the hood, Mastra uses the Vercel AI SDK v7 generateText loop. The model gets tools, calls them, sees results, repeats until done or until the stopWhen predicate fires. Each "step" is one model response with one or more tool calls. The loop is simple and fast per step.

import { generateText, tool, stepCountIs } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { z } from "zod";
 
const result = await generateText({
  model: anthropic("claude-opus-4-8"),
  maxTokens: 16384,
  stopWhen: stepCountIs(20),
  toolChoice: "auto",
  tools: {
    readFile: tool({
      description: "Read a file",
      parameters: z.object({ path: z.string() }),
      execute: async ({ path }) => fs.readFileSync(path, "utf-8"),
    }),
    writeFile: tool({
      description: "Write a file",
      parameters: z.object({ path: z.string(), content: z.string() }),
      execute: async ({ path, content }) => { fs.writeFileSync(path, content); return "ok"; },
    }),
    runCommand: tool({
      description: "Run a shell command",
      parameters: z.object({ command: z.string() }),
      execute: async ({ command }) => execSync(command, { encoding: "utf-8" }),
    }),
  },
  prompt: taskPrompt,
});

In my benchmark, Mastra took 4 steps: read tests, write implementation, run pytest, report results. 80.1 seconds total.

Important: AI SDK v7 changed the multi-step API. maxSteps is gone. The default is stopWhen: stepCountIs(1), which means the agent does ONE step and stops. You need stopWhen: stepCountIs(N) explicitly. Tools require the tool() wrapper from the ai package. Raw objects no longer work.

Strengths

  • Zero platform coupling. Self-host anywhere. No Vercel, no LangSmith, no vendor lock.
  • Workflows with Inngest for durable execution.
  • Built-in memory, RAG (vector DB integrations), and observability (OTel + Studio dashboard).
  • Model-graded and rule-based evals out of the box.
  • Local Studio UI for development.

Limitations

  • No native sandbox. You wire your own execution environment.
  • No built-in context compression. Message array grows unbounded.
  • AI SDK v7 breaking changes are poorly documented (the stopWhen change burned me).

Best for. Embedding agent capabilities into an existing product. You already have a Node.js backend, you want to add agent features, you need to self-host, and you do not want platform opinions. Also good for teams that want workflows, memory, and evals without a full runtime.


Head-to-head: the dimensions that matter

Context management

The gap that does not show up in a 5-turn benchmark but dominates production costs. I measured this same problem in my previous comparison: Agno hit 1M tokens on a single Flask bug because it replayed the full transcript every turn.

DeepAgentsEveMastra
Built-in compressionYes, at 85% windowNoNo
What the model seesRecent turns (verbatim) + summarized historyFull transcriptFull transcript
50-turn cost impactBoundedLinear growthLinear growth
Prompt cachingYes (Anthropic/Bedrock)Not documentedNot documented

For agents that finish in 3-5 turns (most Eve use cases), this does not matter. For agents that iterate for 50+ turns, DeepAgents will cost 3-5x less.

Durability

Failure modeDeepAgentsEveMastra
Process crashLangGraph checkpoint resumeWorkflow SDK auto-resumeInngest replay from last step
Sandbox lossFilesystem in LangGraph storeManaged sandbox (Vercel)No sandbox to lose
Long pause (hours/days)Thread persisted in storeDurable workflow, indefinite pauseWorkflow pause via Inngest

All three handle process crashes. DeepAgents also recovers the workspace (filesystem state) from checkpoints. Eve's managed sandbox persists on Vercel. Mastra has no sandbox to worry about.

Sandbox and execution

DeepAgentsEveMastra
Execution modelShell sandbox (built-in)Docker container / Vercel managedBYO (you wire tools)
IsolationProcess-levelContainer-levelWhatever you build
Pre-installed toolsPython, shell, filesystemPython 3.14, pip, git (in Docker image)None
Agent can install packagesYesYesDepends on your tool impl

Choose your framework

Choose DeepAgents if...

  • You are building a coding or research agent
  • Your agent runs for many turns (10+)
  • You need context management to keep costs bounded
  • You want checkpoint durability (crash recovery with workspace)
  • You are a Python team
  • You want the most out-of-the-box complete harness

Choose Eve if...

  • You are building a deployed service agent (Slack bot, support agent, GitHub integration)
  • You need native channel integrations (Slack, Discord, Teams, Telegram, GitHub, Linear)
  • You want convention-over-configuration (agent = a directory)
  • You are already on Vercel and want managed infrastructure
  • Your agents are short-lived (3-10 turns)
  • You are a TypeScript team

Choose Mastra if...

  • You are embedding agent features into an existing product
  • You need to self-host with zero platform coupling
  • You want workflows, memory, RAG, and evals as a library
  • You do not need a sandbox (or you will wire your own)
  • You are a TypeScript team that values portability
  • You want a local Studio UI for development

Use AI SDK v7 directly if...

  • You need a coding agent in TypeScript
  • You do not need the Mastra extras (workflows, memory, Studio)
  • You want the thinnest possible layer over the model

The bottom line

At Opus 4.8, all three frameworks produce the same outcome on a bounded coding task: 30/30, first try. The model is good enough that framework choice no longer determines whether your agent can code.

What the framework determines:

  • How much a 50-turn run costs (DeepAgents compresses context; the other two do not)
  • What happens when something crashes (DeepAgents recovers the workspace; Eve recovers the reasoning; Mastra replays the workflow)
  • How much infrastructure you manage (Eve manages it for you on Vercel; Mastra gives you nothing; DeepAgents is in the middle)
  • Where your agent lives (Eve lives in Slack/Discord/GitHub natively; the other two live wherever you put them)

Pick by what your agent needs to do in production, not by benchmark numbers on a 5-turn task.