Mastra Factory
Mastra Factory is an open source, agent-powered software delivery environment. It combines persistent coding agents, repository workspaces, issue intake, planning, implementation, and pull request review in a web application you control.
The Mastra platform will automatically deploy your Factory during project setup. You can also host your Factory on your own infrastructure.
Mastra Factory is in alpha. Breaking changes may occur without a major version bump until the API is stable. Please report any issues you encounter on GitHub.
Create a project
Install Node.js 22.13.0 or later, then create a Factory project:
npm create factory@latest my-mastra-factoryFollow the prompts to sign in to the Mastra platform. The CLI downloads the Factory template and installs its dependencies. It also provisions the platform resources used by the project.
Start the factory
From the new project directory, start the development server:
cd my-mastra-factory
npm run dev
Open http://localhost:4111. Sign in to GitHub and select the GitHub repository that the Factory will work in. You can also connect a Linear project before finishing setup.
Connect a model provider
In the Factory, open Settings and select API Keys. Sign in with Anthropic, OpenAI, or xAI to use an existing provider account.
For another provider, find it in the API key list, select Add key, and save its API key. Then open Model and select the Factory default model used for triage and board work.
Run your first task
Existing issues from your connected GitHub repository or Linear project are listed in Intake. Select Investigate on an issue to start an agent session that examines the issue and prepares the work for planning.
If Intake is empty, navigate to your connected GitHub repository and add an issue such as:
Add a Contributing section to the README with instructions for setting up the project and submitting a pull request.Return to the Factory after the issue is listed in Intake, then select Investigate.
Next steps
Your Factory is ready to move work from an issue to an implementation and pull request review.
- Learn how each board stage works in Using the Factory.
- Explore the Factory API in the API reference.