Agent Night demo recap: How Mastra turned its issue backlog into a software factory
Abhi Aiyer, co-founder and CTO of Mastra, demoed the company's open source software factory at Agent Night: memory, harness, a rules engine around work.
Everybody's building software factories
Abhi Aiyer opened the third lightning demo of Agent Night with a claim: everybody's building software factories now, and Spotify just launched one.
Spotify's is Xirp, a vendor-neutral agentic development environment announced on August 10 that thousands of Spotify engineers have already used across more than 36,000 sessions. Mastra's is open source.
Abhi, co-founder and CTO, used his slot at the Regency Ballroom to explain how a memory research project turned into one.

It started with a memory primitive

Earlier this year Mastra set out to build a memory primitive called observational memory, because they wanted agents that never forget. The system runs two background agents, an Observer and a Reflector, that watch the agent's conversations and maintain a dense observation log that replaces raw message history as it grows. With gpt-5-mini it scores 94.87% on LongMemEval, which Mastra calls the highest score ever recorded on the benchmark, at an average context window of roughly 30k tokens across the run.
The way you find out whether a memory system is any good is by making it do coding tasks. Abhi's reasoning: they're long sessions with tons of tool calls, burning a lot of tokens. So Mastra built a coding agent to stress it, and kept using it internally. That's Mastra Code, a terminal-based coding agent that never compacts, built on Mastra's AgentController, Agent, and Memory primitives, using google/gemini-2.5-flash by default for its observational memory models.
From agent framework to harness framework
Once you have a coding agent, the next question is whether other people can build one. Abhi's framing: if you wanted to build your own Claude Code or Codex, Mastra should ship an open source primitive for that. That primitive is the agent controller, which lets you build a harness however you want. As he put it, this is the step where Mastra went from being an agent framework to a harness framework.
The AgentController is a shared runtime host for interactive agent applications, coordinating modes, models, storage, workspaces, tool approvals, subagents, and channels, with each user or active task working through an isolated Session. The docs use plan, build, review as the canonical example of multiple modes sharing one conversation thread. It's marked beta, with breaking changes possible without a major version bump until the API stabilizes.
213 issues and a zero bug policy
Then the growth problem. Mastra has had explosive growth this year, which means a flood of good issues and a lot of slop-cannon PRs. Abhi put the issue board on screen:
we have a zero bug policy and now we're at 213 issues
Mastra also wants to keep moving the framework forward, and those two goals pull against each other. That competition, Abhi said, is where the software factory comes into play.
A factory is a rules engine around work
What Abhi demoed has no fixed workflow. It's open source and configurable however you like. Underneath, a factory in Mastra is a rules engine around a concept called work: you connect GitHub, you connect Linear, and you configure rules for how work moves through phases.
The published docs describe Mastra Factory as an open source, agent-powered software delivery environment that combines persistent coding agents, repository workspaces, issue intake, planning, implementation, and pull request review in a web application you control. Intake pulls in GitHub issues and pull requests plus Linear issues before an agent touches them. Default rules can route a new issue from a trusted GitHub contributor straight to Triage and a new pull request straight to Review, while everything else waits for you to pick an action. Approving a plan automatically moves the work to Building.
It's alpha, with the same breaking-changes caveat as the controller, and it needs Node.js 22.13.0 or later. Onboarding connects GitHub and optionally a Linear project, then asks you to pick a Factory model, whether Anthropic, OpenAI, xAI, or anything else via API key, which the Factory then uses for triage and board work.
Phases are built out of skills
Abhi was reviewing PRs on the factory's review board before he walked on stage, and told the room that anyone contributing to Mastra will see a lot of these reviews. They run alongside CodeRabbit, and they're deliberately harsh. Mastra treats incoming code as invasive because it doesn't want to deal with slop cannons.
Each phase is a skill: a triage skill that rigorously triages every open source issue, a plan phase that runs before any work gets built, then review and re-review. On plan mode specifically, Abhi's position was blunt: people say plan mode is dead, and he doesn't believe that.
The docs back the human gate up. Review is human-controlled: you inspect the pull request and merge it when you're satisfied. The review item even gets its own session and review agent, separate from the session that wrote the change. Merging doesn't automatically close the work item either, because one work item can require more than one PR, so the work agent first checks whether the request is actually done.
The part that's still missing
Then the honest bit. After running this for a while, Mastra concluded that autonomous agents don't work as teammates yet:
autonomous agents kind of suck because they're not really your teammate until they have knowledge of your company, knowledge and history of the code base
That's the gap the next primitive targets. It's called knowledge, it hasn't shipped yet, and the current implementation is named Alexandria. When a teammate is using Mastra and the agent trips up, Alexandria opens an issue called a knowledge gap. A human fills it in, and the agent self-heals and self-learns so it does better in its autonomous loops. It hasn't shipped yet, so treat it as a direction rather than a feature you can install.
Make moves
You can try out mastra factory today:
npm create factory.
The signal
A team holding a 94.87% LongMemEval score still says its autonomous agents aren't teammates, because remembering a conversation isn't the same as knowing a company. Any team pointing agents at a large codebase with years of history behind it will hit the same wall. Mastra is making it easier for anyone to address this challenge head on.
Watch the demo and the entire event recording here: