How Replit Agent 3 creates thousands of Mastra agents every day

Replit’s Agent 3 automatically generates Mastra agents and workflows from natural language descriptions.

·

Jan 7, 2025

Replit spins up thousands of Mastra agent sandboxes weekly. In September 2025, they announced a new funding round at a $3 billion valuation, along with $150M annual revenue (up from $3 million in under a year, a 50x jump).

They also announced the launch of Replit’s Agent 3.

Agent 3 is an agent that builds agents—and those agents are powered by Mastra, a TypeScript agents framework. Replit’s Agent 3 is able run thousands of isolated sandboxes with 90% autonomy rates.

From apps to agents

Replit had a great platform for vibe coding websites and apps. In 2025, the natural expansion path wasbuilding apps to building agents. Their professional but non-technical userbase wanted to create automations to help them in their everyday work.

The team—including CTO Luis Héctor Chávez, Replit President Michele Catasta, and engineer Phil MacEachron—shipped what would become a technical milestone with Agent 3's launch in September.

"We want to be very opinionated," Michele told us during their evaluation. "Replit Agent is famous for being opinionated in good and bad ways. We're going to mask all the complexity from users and show a dashboard where they can see what their agent is doing."

Why Mastra’s architecture fit

Replit’s agents have always been built in Typescript, and as the leading Typescript framework, Mastra was a clear choice.

In addition, the teams had close relationships, and the architecture was also a fit:

  1. Container-native architecture—Mastra runs in containers, matching Replit's infrastructure exactly
  2. MCP docs server—One of Mastra's "shining features" that powers both our course and developers' daily workflows
  3. Pluggable everything—Mastra was opinionated enough in providing the basic primitives, but also flexible enough they were able to make necessary modifications.

Running sandboxes at scale

When you select "Agents & Automations" from Replit's homepage and describe what you want in natural language, you're triggering a stack that gives each user their own Docker container sandbox. Replit spins up thousands of these isolated instances daily, each with its own Postgres instance and storage layer.

The Mastra workflow engine is built on an underlying event-based execution system. While most Mastra users don’t need to touch the event system, Replit, as a large scale platform use case, does—and is easily able to. Replit also utilizes Mastra’s Inngest integration for an additional persistence layer on Mastra workflows.

As Michele discovered, Mastra agents can dynamically load and create tools at runtime. Tools can call agents, agents can call tools—a fully composable architecture that enables the meta-agent pattern.

What Agent 3 Does

In three prompts, Head of Developer Relations Matt Palmer built a Hacker News digest automation with Agent 3:

  1. "Help me build a customized news digest based on Hacker News"
  2. Formatted the output

Behind this simplicity, Agent 3 generates complete Mastra code. It creates agents with specific prompts, defines tools for RSS fetching and content extraction, and orchestrates workflows that run autonomously for up to 200 minutes.

You can now use Agent 3 to build daily tech digests that fetch RSS feeds, summarize with AI, and email formatted newsletters. Or Slack bots that query your Notion database. Or Telegram bots that schedule appointments on your calendar.

Achieving 90% Autonomy

CTO Luis Héctor Chávez notes that that Agent 3 achieves true autonomy through two breakthroughs. As he explained during his Nov 2025 talk at Mastra’s TS AI conference:

Agent 3 uses Playwright to test and fix its own code, reaching a 90% autonomy success rate. The self-testing loop generates code, executes it, identifies errors, applies fixes, and reruns until tests pass—a process they’ve found to be 3x faster and 10x more cost-effective than comparable models.

Agents can also spin up other agents to handle ongoing tasks. Using Mastra's durable execution with Inngest, Replit boosted success rates from 80% to 96%, ensuring workflows complete even if a servers fails mid-execution.

What's Next

The Mastra-Replit collaboration continues through a shared Slack channel for quick iteration. The roadmap includes enhanced event-based execution and agent builder primitives that both teams can leverage.

The team sees the market for agent based systems expanding—and Replit’s leadership agrees. They recently acquired Amadeo Pellice’s AI-native integrations company, OpenInt.

Replit is prepared to scale further. Soon users will be able to vibe code complete web apps with agents, too.

With Replit deploying Mastra agents at scale, we're watching the democratization of agent development happen in real-time.

Share:
Shreeda Segan

Shreeda Segan helps with content at Mastra. She specializes in editorial and storytelling for tech, business, and frontier stories. She previously wrote for Arena Magazine and identified and profiled Dwarkesh Patel early, resulting in viral coverage.

All articles by Shreeda Segan