What's Factory?
Mastra Factory is a web application for working with coding agents. Connect your repository, bring issues into a work board, and guide a change through investigation, planning, implementation, and pull request review.
Start with one issue and keep control of the decisions at each phase. Review the proposed work and plan before deciding whether to merge the result.
Choose your starting point
| Your task | Start here |
|---|---|
| Set up your first Factory | Get started |
| Turn an issue into a pull request | Create your first pull request |
| Join a Factory your team already runs | Models, then GitHub |
| Bring work from another service | Linear or Slack |
| Run Factory for a team | Deployment |
Understand the pieces
Use Factory from a web or mobile browser, or interact with agents through Slack. GitHub supplies repositories and issues, and Factory writes pull requests back to it. Linear can also bring issues into Factory.
Mastra Factory brings together the Factory Server, auth, sandboxes, and storage. The server provides the web UI and coordinates work. Mastra Factory works with your preferred model providers.
Choose the large language models (LLMs) for your coding agents through a model provider with an API key or a supported subscription.
Where Factory runs
Factory supports three setups:
- Fully on Mastra platform: Run the Factory Server, authentication, storage, and sandboxes on Mastra platform.
- Local server with platform resources: Run the Factory Server on your computer while Mastra platform provides authentication, storage, and sandboxes.
- Fully self-hosted: Run the server and configure your own authentication, storage, and sandbox providers without Mastra platform services.
You can configure authentication, storage, and sandboxes independently of where the server runs. New Factory projects use platform services by default. See Deployment for deployment options.
Understand Factory terms
The Factory project contains the server configuration and dependencies. The target repository is the codebase you ask agents to change. Keep them in separate directories so their configuration and Git histories stay independent.
| Term | Meaning |
|---|---|
| Platform project | The Platform resource used to manage the server's database and deployment environments. |
| Factory | A codebase and its settings, work, and sessions in the UI. |
| Intake | Incoming issues or pull requests that are available for work. |
| Work item | A card tracking an issue or another task through the Work board. |
| Review item | A separate card tracking review of a pull request. |
| Session | The agent conversation and workspace associated with a piece of work. |
Follow a change
Issues arrive in Intake, where you can start an investigation. The agent investigates the issue, requests your input when needed, then plans and implements the changes. It opens a pull request with its own Review card and session. Follow the review and inspect the changes. Then decide whether to merge the pull request.
The original Work item and the PR's Review item have separate completion rules. See Work items for the actions, automation settings, and external events that move cards.
Next steps
- Get started and investigate one GitHub issue.
- Continue to Create your first pull request after investigation.
- Troubleshoot setup when an expected result is missing.