Software factory / Start
Software factory
A pull request from a stranger arrives. Before you read the diff, you want to know if it is safe and useful, if it fixes its issue, and if it conflicts.
8 min read
The software factory answers these questions for you. It is a set of AI agents that run on the forge, not in CI:
- On pull requests, they audit, check, review and fix the change, and fix failing CI.
- On issues, they triage the issue and reproduce the bug.
- On new issues and pull requests, they close spam.
- On the default branch, they draw the architecture of the repository, keep its dependencies up to date, and cache its CI steps.
The Factory panel on each pull request and issue shows their answers.
The factory has 11 agents. Some agents have steps, which you turn on and off one by one. Each agent uses Workers AI by default, which the forge pays for. By default, nothing merges by itself.
Note
Every agent is off until an admin turns it on, so the factory spends nothing on models before that. The PR chat on each pull request page and the Architecture chat on the Architecture tab are on by default. They run only when a person asks a question.
You need admin access to the repository for step 1.
1. Turn on the agents
- Open the repository, then Agents. In the sidebar, click Agents under Software factory. Only admins see it.
- Find the Security audit and turn it on. While it is on, the other pull request steps wait for its verdict.
- Find each other agent that you want, for example PR review.
- Turn on the switch of the agent. It saves at once.
- To pick its steps, click Settings next to the agent. Under Steps, turn on each step that you want, for example Check scope and duplicates and Push fixes.
Tip
An organization owner can turn agents on for every repository of the organization, on the organization's Software factory tab. A repository then shows Inherited from and the name of the organization.

What each agent does helps you pick the agents. Factory settings tells you what each field does, and how to change the settings with the CLI, REST or MCP.
2. Open a pull request
Open a pull request, or push to one. The factory starts when a person opens an item, pushes to a pull request, or adds a label.
Note
The factory starts only on items that people can see. If screening holds a pull request, the factory waits until a maintainer shows it.
3. Read the Factory panel
- Open the pull request. The Status tab of the right column has a short summary of the panel: the Factory badges, under the checks.
- Click Agents tab in the summary. The panel opens on the Agents tab of the right column.
- Read the row of each question:
| Row | The agent that answers |
|---|---|
| Safe | The security audit |
| Useful | PR review, step Check scope and duplicates |
| Fixes the issue | PR review, step Verify the linked issue, when the pull request says fixes #N |
| Conflicts | The forge's merge check, and Keep green, step Resolve merge conflicts |
The panel shows one row for each step of an agent that is on. Click a row to read the reason. A failed run gets a button to run it again. To see every run of the pull request, click All runs. Read the Factory panel has the details.
If you have write access, an open row has a Log link. The log reads as a chat: the agent's messages, one line for each tool that it used, and the model's reasoning folded under Thinking. While the run goes, the log page follows it live, as the CI log does.

Done
Each new pull request gets the agents that you turned on, for example an audit, a summary and a review. The Factory panel shows their answers before you open the diff.
Watch the factory work
If you have write access, open Agents. It opens on Runs, the list of every factory run, which you can filter by agent and status. Factory runs shows how to find a run, read its log live, and learn why it failed.
Find your next page
| You want to | Read |
|---|---|
| Know what each agent does, and who starts it | What each agent does |
| Pick the model, the key and the trigger of each agent | Factory settings |
| Know what each step and verdict on a pull request means | The pull request steps |
| Close duplicates, reproduce bugs and open fix pull requests | Issue agents |
| Close spam, ban accounts, and undo a wrong ban | Spam and bans |
| Turn off the PR chat, or give it your own model key | The PR chat settings |
| Turn off the architecture chat, or change its model | The architecture chat settings |
| Get dependency update pull requests, and an agent that fixes them when CI fails | Keep dependencies up to date |
| Get faster CI, with no cache settings to write | Get a pull request that caches your CI steps |
| Give newcomers a map of the repository | Read the architecture of a repository |
| Add an agent that the factory does not have | Custom agents, with defineFactory |
| Write agent jobs in a file that run on a schedule or an event, and open pull requests | Write your first agent workflow, in .source/agent-workflows/ |
| Let the agents use Linear, Notion or another tool, with the agents and tools that you pick | Give your factory an MCP server |
| You sent a pull request to a project here: read the panel, or appeal a ban | For contributors |
Limits
Cost and runs
- The forge pays for the Workers AI models up to a monthly spend cap in dollars for each user or organization. A site admin sets it, else the deploy sets it (3 dollars on this forge).
- After the cap, runs on these models are skipped until the next UTC month, or until you add your own model key. An organization can set a lower cap. A site admin can give one account its own cap, higher or lower.
- A built-in agent has no token budget. A custom agent has one only when its factory file sets
budget. - A built-in agent makes at most 100 model calls in one run, and each agent has a time limit.
- An author without write access starts at most 20 agent runs on a repository each UTC day. The spam agent does not count.
Containers
- The agents and steps that only read need no container: the Security audit, Check scope and duplicates, Triage, Assign, Spam, Architecture and PR summary. They read the code of the commit on the forge, and start at once.
- The agents that run commands or change a branch wait in the same queue as the CI jobs of the account. The CI limits count them too. On the items of an author without write access, they also count toward the daily CI container time of that author.
- A built-in agent that runs commands reaches the
egresshosts of the CI jobs on the default branch, at most 10. So it can install packages and run your checks as CI does. - The hosts of a job that declares a secret are left out, because the agent gets no secret. With no CI workflow on the default branch, the agent reaches only the forge.
When billing is on
A site admin can turn on billing. Then the plan of the owner pays for the agents:
- The containers of the agents count toward the plan, on every repository. So do the models that the forge pays for.
- The monthly spend cap of the site does not hold. The cap that a site admin gave the account, and the lower cap of an organization, still hold.
- When nothing is left, a run is skipped with No container time left this month or No AI left this month. See Causes that need a person.
Safety
- The factory never reads content that screening holds, and never approves a pull request.
- An agent never sees a model key or a forge token. The model runs on the forge. The sandbox runs only the tools of the agent.
- An agent gets the tools of an MCP server only when an admin picks it for the connection. The forge calls the server, so its credential never enters the sandbox.