73 points codekarate 5 hours ago 24 comments

Hi HN, we're Shane, Sam, and Abhi.

Almost two years ago, we shared Mastra, our open-source TypeScript agent framework, on Show HN: https://news.ycombinator.com/item?id=43103073. It got a few hundred upvotes; a couple of weeks later our downloads had doubled, and we were off to the races.

Today we're sharing Mastra Factory, the open-source software factory we built to help maintain Mastra itself.

At Mastra, we now average nearly 4M downloads per week, and with Factory our team now merges hundreds of PRs a week across the mastra-ai GitHub org. Last week, Factory opened and merged 238 PRs, alongside 630 merged PRs from humans.

There's a lot of debate about what a software factory is. For us Factory is a configurable agentic kanban board that's @-taggable in Slack.

Under the hood, it uses Mastra’s durable agents for long-running sessions, our conversational memory system, a markdown based wiki with source citations to incorporate company knowledge, signals that subscribe to PR comments wired up into sessions, and a customizable cloud sandbox with our coding harness (working on supporting Claude Code, Codex etc).

When we started out, we modeled Factory around our existing workflow-oriented process (triage, plan, build, review, shipped). Three months later, we find ourselves mostly driving it through Slack vs a web UI.

We’ve seen more senior engineers kick off sessions in parallel (“triage the 20 oldest issues and let’s evaluate…”). We’re using bug and vuln scanners now, and we’ve closed our repo to outside contributors, asking folks to write detailed issue repros instead.

You can get started with `npm create factory`.

It’s fully open-source, so you can run it entirely on your infra (we also offer a hosted version). Comment here, we would love to know what you think!

https://factory.mastra.ai

https://github.com/mastra-ai/template-factory

Gakho 4 hours ago | parent

> closed our repo to outside contributors

I've seen this pattern happening in other open-source repos. Do you think it's going to be the norm now?

calcsam 4 hours ago | parent

Unfortunately I think so. Folks like sindresorhus that also closed their repos had very similar reasoning to ours. The number of PRs of marginal value has skyrocketed at the same time as it's become much easier to do those quickly yourself.

codekarate 3 hours ago | parent

i think the big challenge is it changes the open source contribution model, but this is why we typically give contribution credit for good issues now.

solarkraft 2 hours ago | parent

I don’t find it unfortunate at all. This makes it much easier to accommodate requests the right way.

calcsam 1 hour ago | parent

we've been doing open source for ~10yrs so maybe we have a bit of nostalgia for the way things have been?

also there are a few folks on our team who we got to know because they showed up in our repo and started contributing, and maybe that sort of serendipity won't happen in the future

solarkraft 55 minutes ago | parent

Well, maybe. Contributing code is definitely a proxy for caring and knowing your way around. But perspectives on how the software works for people, what use cases it could accommodate and how are ever important. Now we can focus on that and I'd argue it's much more interesting.

p1necone 15 minutes ago | parent

Using GitHub issues seems to increase the number of those you get by quite a lot - seems like people have bots that scan public issues and generate PRs for them. If you use something else as your issue tracker and keep GitHub issues empty you stop a decent chunk of low effort automated PRs.

I suspect sticking your public repo somewhere other than GitHub and sharing it in more organic programming communities (discord, forums, your hn bio etc) would further reduce the amount of low effort slop you get.

asaiyer 3 hours ago | parent

Yeah i think so! The contribution model of OSS has shifted, as maintainers we want good issues with good reproductions. BUT even this has a new level of slop. Opus really likes making issues that you would never have even prioritized in any sprint ever. Like, it's not wrong but also why should I care about that issue. I think this is the next frontier: we should only fix issues that actually matter.

yoz 3 hours ago | parent

codekarate 3 hours ago | parent

thanks for dropping these in

saarth28 3 hours ago | parent

this is cool!

codekarate 3 hours ago | parent

thank you

asaiyer 2 hours ago | parent

Thanks!

tireguess 3 hours ago | parent

but you are going to disappear soon swallowed buy some guyz working for a guy called CLAUDE

codekarate 3 hours ago | parent

we have been hearing this for the last 15 months

rumors of our demise have been greatly exaggerated...

at the end of the day it's open source and it's working well for us!

jobryan 2 hours ago | parent

Excited to try. Do you have a video demoing how you use it (or just best practices for getting up and running well on my team)?

codekarate 2 hours ago | parent

we did a workshop on how we use it about a month ago: https://www.youtube.com/live/LzZ_FptHWqs?si=o8Dj3828636_wMG5

we will be posting a shorter demo/best practices video to our youtube soon as well!

jaf12duke 2 hours ago | parent

What have you learned from people who use Mastra today versus what you/they were doing in the beginning?

calcsam 1 hour ago | parent

hmm, last year people were mostly building in-app assistants but now it's a much wider variety: ai sres, gtm agents, all kind of internal slack agents, factory type things, healthcare or financial services specific stuff and so on

but it all seems to come down to the same primitives around durable agents and workflows, memory, knowledge, sandboxes, filesystems.

the one exception is actually factory, it's a bit of a departure from what we've done (since it's application on top of mastra primitives vs the primitives themselves).

moltar 1 hour ago | parent

Just to clarify, as I couldn’t confirm this from the docs. Do agents run with their own identity or is it assuming engineer github identity?

DSchau 1 hour ago | parent

We enable choosing / customizing this based on org/user preferences. By default, the identity is the GitHub App "Mastra Platform" but configuring with a personal access token enables the agent loop to open PRs on the behalf of users.

Open to input on what you have found is best, but in general a belief we have is to not be too dogmatic one way or the other and enable users to choose.

SillyUsername 1 hour ago | parent

This needs more visuals - the kinds of people using this may not be software developers, and it seems just like a command line too at first glance unless you watch the video.

calcsam 11 minutes ago | parent

Thanks for watching the video -- assume you're referring to the one on the blog post? https://mastra.ai/blog/announcing-new-capabilities-in-mastra...

slopinthebag 21 minutes ago | parent

i'm always curious how the workflow with these factories work. like are you basically just giving it tickets and letting the ai use it's "judgement" on how to implement them? do you essentially say something like "we need X" and the agents do the rest? or is it somehow more interactive? and what about verification, particularly on the UX side of the end result?