Skip to content
Live
Mastra Blog·· 21 hours ago

Announcing New Capabilities in Mastra Factory

Announcing New Capabilities in Mastra Factory

Article

Today, we're launching dramatic improvements to Mastra Factory.

Mastra Factory is an open-source software factory that helps teams ship software faster and more consistently, built on the same Mastra building blocks you already know and love.

We believe great products will be built by humans backed by strong delivery systems unique to each company. We aim for every part of that system to be customizable, swappable, and uniquely yours—just like the way you build software.

Since the alpha launch in July and the beta in September, we've had hundreds of customer conversations and merged nearly 1000 PRs improving Factory. We've focused on performance, reliability, and novel capabilities that solve real customer pain points.

That said, in the age of AI, we care deeply about long-term commitments to stability, reliability, and software that just works. We're not yet launching Factory as a 1.0.0 release; we'll continue to evolve, improve, and harden it. The factory metaphor is intentional: we aim to deliver software you can use to build your software your way, consistently, predictably, and with the controls you choose and customize.

What we're launching

Today we're launching new capabilities for a software factory you can set up, customize, and deploy to start doing real work in under five minutes. What you can expect:

  • Intake sources. Factories need inputs, and inputs for software come from many sources: GitHub, Gitlab, Linear, Jira, or incidents from systems like Incident.io. All of these inputs shape what gets automated and built with the factory, and over time you can expect more intake sources available through Mastra Connect.
  • Customizable workflow stages. Work progresses from intake to shipped through customizable workflow states like Triage, Plan, Review, and Done. Each stage is fully customizable with your own skill, tooling, and team preferences as it relates to guardrails and human approvals.
  • Coding agent. We're launching with a cloud coding agent (backed by Mastra Code) that includes our state of the art observational memory persisted across work items on the board.
  • Integrated workspaces. Software is increasingly being generated in cloud environments that proxy your local environment as closely as possible. We bundle a microVM (we use E2B by default in Mastra platform) available to all sessions to do work as close as possible to your team's development environment and preferences.
  • Flexible connectors. Sometimes factory work needs additional context from team tools outside of issue tracking and version control. Mastra Connect integrates with Factory to provide common connections your team needs to get work done.
  • Support for any model. We support any model provider and gateway (including our Mastra Gateway), inference providers, frontier labs, and any OpenAI-compatible model shape.

Get started

Getting started is just a prompt away with your favorite coding agent, or you can read the documentation if that's more your jam.

Set up Mastra Factory for me. Ask me what to name my factory, then run npx create-factory <factory-name>. Next, run cd <factory-name> && npm run dev and open http://localhost:4111. Documentation: https://factory.mastra.ai

New capabilities

We're also excited about new capabilities that have been an unlock for the Mastra team as we've used Factory to build our own software factories.

Previews

See it, then ship it. Every change comes with a live preview link, so you click through the real app before you ever open the diff.

Cloud sandboxes

Off your laptop. Every agent gets its own cloud sandbox, repos cloned and ready. Run ten in parallel and your fans never spin up.

Slack-native

Ship from the thread. Mention Factory to file work, answer its questions, and approve plans without switching tabs.

Infinite control and customization

Yours, not ours. Boards, stages, human-in-the-loop approvals (or not), and models are all customizable, swappable, and tweakable.

App previews

For those in the know, you may recognize that much of the Mastra team's DNA was shaped and molded by building developer tools at Gatsby, Netlify, and other strong developer-centric products and cultures. One thing we learned is how important iteration velocity is for building great products, and so today we're excited to launch app previews, which are ephemeral development environments that persist across work sessions in the factory. Other tools give you a simulacrum of "the app" with screenshots and code, but the reality is that more and more code is produced by teammates further and further away from it. The best thing to see and interact with is actually just the site itself, which dramatically improves iteration velocity and enables teams to be confident that things are working with a high degree of confidence.

Dustin

(

6:25 PM

):

@Shipyard let's refresh the Factory landing page. Make the secondary CTA copy an agent prompt, and add a bento of our flagship capabilities. Steal the pricing animations from the product.

Shipyard

(

6:37 PM

):

Preview is up: https://3100-sandbox.us.mastra.cloud/factory The CTA copies an agent prompt, and the bento has four cards with line art that animates on hover.

Preview ready

Dustin

(

6:41 PM

):

this tooltip seems weird, use the same one we use everywhere else. also the copy needs more punch. I'll write one, you take the rest: “Yours, not ours. Boards, stages, approvals, and models are all swappable.”

Attachment: image.png

Shipyard

(

6:46 PM

):

Swapped in the shared `Tooltip` site-wide. New copy: “See it, then ship it.” “Off your laptop.” “Ship from the thread.”

Preview hot-reloaded

Dustin

(

6:48 PM

):

better. the logo looks like a wine corkscrew though 🍷

Shipyard

(

7:10 PM

):

Fair. Replaced it with an interactive icon: channels feed a ring, and clicking drops a new ball in. PR is open with everything so far.

Lint, typecheck, 15 tests Pull request opened

Dustin

(

7:12 PM

):

nice, ship it

Slack-native user experience

In general, we aim to integrate with any collaborative channel (Teams, WhatsApp, Discord, wherever you collaborate!), but in this release we focused primarily on ensuring a top-tier Slack-native experience. This seems easy but a heavily constrained service is an interesting design and engineering problem. Specifically, we have built in the following capabilities by default.

  • Ambient mode. When your factory instance is tagged into a thread, it chooses to reply and judges whether or not it should reply. Think of it like a highly capable member of your team, not a simpleton assistant.
  • Signals. Signals are an observability mechanism that has been missing from all harnesses and coding agents. Specifically, Signals is a Mastra primitive that is used to listen, observe, and steer the turn based on an upstream state change. To give a practical example, we leverage CodeRabbit for PR reviews and without any configuration the work item subscribes to the reviews and automatically addresses the comments.
  • Files and previews. By default, the agent loop has appropriate tools to share context from the work in progress, whether that's screenshots, full app previews, or whether you share files (CSVs, JSON, Markdown, you name it) the agent loop ingests and updates its context / turn appropriately and then outputs data just like you expect.
  • Generative UI. You can opt in to generative UI, which is a mode where the agent harness can choose to output rich, interactive Slack-native data structures like bar charts and pie charts.

Dustin Schau

(

9:12 AM

):

@Shipyard how many sessions opened up PRs last night? What about this week?

Shipyard

(

9:12 AM

):

26 overnight, 144 so far this week, all in `mastra-ai/mastra`:

Factory PRs · this week. Last night: 26 opened. Already merged: 17. Still open: 7. This week: 144 opened. PRs opened per day: Mon PRs 35; Tue PRs 49; Wed PRs 34; Thu PRs 26. Last night is midnight to 8 AM UTC. Thursday is overnight only.. Open board. View all PRs

Dustin Schau

(

9:14 AM

):

Cool, which ones are ones that I can take a look at? Gimme a list.

Shipyard

(

9:14 AM

):

These five from last night are still open and waiting on a human review:

Ready for review. #30171 fix(workflows): name the suspended step in resume labels from nested workflows (workflows · opened 5:36 AM). #30170 fix(core): persist a nested evented run's initial record regardless of shouldPersistSnapshot (core · opened 5:36 AM). #30169 fix(core): keep the state a failed nested workflow's completed steps set (core · opened 5:25 AM). #30162 fix(core): bound plain-agent run admission when the server cache stops answering (core · opened 3:06 AM). #30147 fix(cli): honor MASTRA_ORG_ID for API-token env and db commands (cli · opened 1:24 AM). Times are UTC.. Request my review on all 5

Dustin Schau

(

9:15 AM

):

Thanks Shippy 🫡

The Factory Slack experience should feel like more than a companion to the web UI. We view it as a place where real products get shipped, controlled, and iterated on—not just simple bug fixes.

Dustin

(

2:04 PM

):

@Shipyard let's tackle the gnarly one: move workspace settings out of `projects` into their own table, zero downtime.

Dustin

(

2:05 PM

):

@Damien you did this for billing a few months back. any advice?

Damien

(

2:11 PM

):

yes, and I still have the scars. dual-write, backfill in batches with `SKIP LOCKED`, then flip reads behind a flag. the backfill holding locks is what bit us.

Dustin

(

2:13 PM

):

lol. let's keep the old columns around for a release too so we can roll back

Shipyard

(

2:38 PM

):

Went with Damien's playbook plus your rollback window: dual-write, batched `SKIP LOCKED` backfill, reads behind a flag, column drop a release later. The backfill dry run on a staging snapshot had zero lock waits.

Migration tests passed Pull request opened

Cloud Workspaces

Local coding agents (like Mastra Code) are game changers for engineers. But because they run locally, they come with limitations and frustrations, like managing worktrees and kicking off and managing multiple threads. They're also limited by bottlenecks inherent in single-player development.

We are launching with support for customizable sandbox environments that persist across sessions. We fully support:

  • Docker. Customize the Docker image that gets deployed with the sandbox.
  • Memory and CPU. Customize the desired memory and CPU based upon the compute consumption of your project(s).
  • Persistent, stable URLs. As mentioned earlier, App Previews are a flagship feature unlocked with our Cloud Workspaces that just work for improving iteration velocity.

In essence, our aim and ambition is that you can ship your local to our sandbox environments and enable your team to be highly effective and productive regardless of proximity to their machine.

Model flexibility and failover

Just like with Mastra, we aim for guiding principles of control and customization. This means that teams can come with a gateway, inference provider, or preferred model family of their choice and fully control how these models are used in the factory instance. We support three modes:

  • Personal. Every model run defaults to the model preferences of the user who originated the session.
  • Hybrid. Work items (the "board") default to org-level models, and user sessions can be customized per user.
  • Org. The board and sessions default to org-chosen and enforced model families.

We fully integrate any inference provider that is OpenAI compatible (OpenRouter, Ramp Router, etc.), frontier and open-weight models, and of course our own, Mastra Gateway. We also support custom model gateways for cases where data privacy and compliance restrictions apply.

Models, intelligence, and cost are key factors in the success of AI adoption in your company and reflect your unique preferences. We aim to meet you exactly where you are to help you build your software factory.

How we use Mastra Factory at Mastra

Factory claims deserve skepticism. The loudest claims tend to come from teams with dramatic shipping stories and almost no users. So instead of claiming, here's how the Mastra team has used our own factory, which we call "Shipyard", and what it measurably changed.

First, the results

So with that mindset, these are the real, measurable improvements we've seen as a team using Mastra. We haven't artificially juiced the numbers, and we don't think we're done: we expect to embrace factories further and use them more. The reality is that no matter how good the tool, engineering remains a tool-assisted craft, where we stay conscious of what goes in, the effect of what goes in, and how to keep updating our systematic way of delivery to improve our product. So no, we won't be announcing today that engineers at Mastra are opening 1000 PRs per week, because they don't want that, users don't want that, and no one benefits except model labs.

So instead we're sharing the raw, transparent results we've seen as a team using Mastra. Substance, not hype.

Human output

Before Factory, a Mastra engineer merged 9.5 PRs a week. Over the last four complete weeks, that number is 16.9, a 78% increase.

Merged PRs per engineer per week

+78%per engineer

Before Factory May 31 – Jul 259.5

Human-authored: 9.5; Factory: 0.0.

Last 4 complete weeks Oct 11 – Nov 716.9

Human-authored: 12.4; Factory: 4.5.

Human-authoredFactory

Triage time

In August, a new work item sat in triage for a median of 6.9 hours. In November, it's 11 minutes, and the Factory agent does 91% of the triage.

Median time a new work item sits in triage

6.9h → 11 minAug → Nov

6.9h

33

% by agent

Aug

9

items

2.3h

47

% by agent

Sep

38

items

31 min

63

% by agent

Oct

79

items

11 min

91

% by agent

Nov(through the 11th)

131

items

Median time in triageShare triaged by the agent

Time to PR

For issues in mastra-ai/mastra that were closed by a merged PR, Factory opens the PR sooner and gets the fix merged in half the time it took before Factory.

Median hours from issue to fix, mastra-ai/mastra

56.4h → 28.2hissue to merged

Before Factory, human-authored 98 PRs24.2h · 56.4h

Last 4 weeks, human-authored 133 PRs21.5h · 39.3h

Last 4 weeks, Factory 290 PRs15.7h · 28.2h

Issue → PR opened (median)Issue → merged (median)Factory

Once a Factory work item is kicked off, the median time to an open PR is 76 minutes. Once the PR is open, the weekly median time to merge over those four weeks was 0.7 to 3.3 hours for Factory PRs, against 4.5 to 7.1 hours for human-authored PRs.

Adoption

In Beta, Factory was interesting but not consistently and uniformly trusted. A handful of power users on the Mastra team accounted for most of the usage, not unlike some of the early adoption of a tool like Claude Code at Anthropic, and numerous sharp edges were hindering adoption. Through early October, no more than three engineers ran Factory sessions in a given week. In each of the last three complete weeks, 19–24 engineers ran Factory sessions.

Engineers running Factory sessions per week

Beta, through early October≤ 3

Each of the last 3 complete weeks19–24

What earned our trust

But perhaps more important than the results themselves is, you guessed it, the way we collaborate. Systematic control of inputs and outputs has led us to produce better software and to iterate on it more quickly and effectively. A few specific improvements we shipped built that trust:

  • Private by default. As familiarity and trust was being earned, some engineers preferred to work in private UI-based sessions, which can be optionally shared with the organization. Over time, more and more of the team moved into our #shipyard-graveyard public channel to build, ship, and iterate in the open.
  • One kind of session. In Beta, Factory had several different kinds of work streams, including a "supervisor" that had context from user sessions and work sessions. Our engineers didn't want to learn Shipyard's UI; they wanted Factory from wherever they were already working, whether that was Mastra Code or Slack. So we unified the model: any session has the tools to interact with the board, kick off user sessions, and thread context back. That leaves a single concept for a team member to learn, and it's one they already know: natural language!
  • Collaborative in Slack. We don't necessarily aim to be the collaborative surface, we aim to integrate with the ones your team already uses. It feels a little unnatural to begin with shipping code from Slack, but we've seen a dramatic increase in this type of development. As code becomes more of a commodity, Slack is where we still level-up together, share context, and keep growing the engineering team at Mastra.

What's next

We believe that Mastra Factory is a glimpse into how software is being built by the best teams in the world and how incorporating it into your processes will help accelerate and standardize your unique way of building software. To get closer to teams, we're offering early access and a unique ability to help shape the roadmap with our Custom Factory program, where you'll get direct exposure to the Mastra Factory roadmap and perhaps more importantly the Mastra team and forward deployed engineers to help you build your factory.

Keep building the future - we'll see you there ✌️

The Mastra Team

Source: Mastra Blog · mastra.ai