Blog · Guide · 25 November 2026

How to Build a Software Factory With a Webhook and a Schedule

"Software factory" is the term of the second half of 2026. Warp defines one as "an automation loop in the cloud that orchestrates agents to build better and better software over time" (Ben Holmes, 24 Nov 2026). The definition leaves open the parts this guide is about: what starts a run, who runs the agents, and how you know whether the factory is getting better.

This guide builds one with Forkit, step by step. In this article "factory" means Forkit's factories: a saved fan-out that can be asked to run. It does not mean the company Factory, which sells its own agent product.

Forkit never runs an agent. A factory in Forkit is a definition and a record. The agents run on machines your team operates, with the agent tools you already use.

What a factory is in Forkit

A factory holds (CLAUDE.md, "Factories", 21 Nov 2026):

  • a prompt template, filled once per agent;
  • how many agents a run starts;
  • a repository, either a public one by URL or any private one your runner pushes;
  • budgets in dollars and in tool calls, and a time limit;
  • whether runs are shadow runs;
  • optionally, a schedule.

A run is asked for in one of three ways: through the API, through the factory's webhook address, or by its schedule. A runner picks up the oldest waiting run, starts it, and finishes it. Afterwards a person or the factory's agents mark the run good or bad, and Forkit keeps the pass rate, cost and time per run.

Step 1: Write the prompt template

The template is filled once per agent. These placeholders are available:

  • {{item}} and {{item.field}}: the item this agent was given;
  • {{input.field}}: a field of the run's whole input;
  • {{agent}}: the agent's name;
  • {{n}} and {{total}}: this agent's number and how many there are.

A value's own braces are not filled again, and an unknown field stays as written, so a typo shows in the prompt instead of disappearing.

A template for updating one dependency per agent:

You are agent {{n}} of {{total}}. Update the package {{item.name}} from
{{item.from}} to {{item.to}} in this repository. Edit only files under
{{item.path}}. Run the package's tests. Commit and push when they pass,
then hand off a two-line summary.

Keep the scope in the prompt. One agent per package, with disjoint paths, is what keeps parallel agents from colliding (see how to run 50 coding agents without merge conflicts).

Step 2: Create the factory

An agent creates the factory, and its runs act as that agent under that agent's person. Another agent of the same person may run it too.

forkit factory create --name deps \
  --prompt-file ./deps-prompt.md \
  --agents 6 \
  --max-cost 10 \
  --max-tool-calls 3000 \
  --push \
  --schedule "daily 06:30"

--push means the runner pushes a private repository from its own checkout when a run starts. Use --repo URL instead for a public repository. Add --shadow to make every run a shadow run (see shadow runs for coding agents). --keep-days N sets how long the agents' repositories are kept after a run.

The answer includes the factory and its webhook address, shown once. Save it.

Step 3: Let anything ask for a run

The webhook address is POST /hooks/factory/<token>, with a token of the form ft_ plus 48 hex characters. It needs no login. Whatever JSON the caller sends becomes the run's input, so a form, a CI job or a Notion automation can ask. Forkit stores only the token's hash.

The token can only ask. It starts nothing, returns no key and reads nothing. Limits: 30 asks a minute per address, at most 25 runs waiting per factory, and an input of at most 20,000 characters.

An input with items gives one agent per item:

curl -X POST "$FACTORY_HOOK" \
  -H "Content-Type: application/json" \
  -d '{"items":[
        {"name":"zod","from":"3.22.4","to":"3.23.8","path":"packages/api"},
        {"name":"hono","from":"4.4.0","to":"4.6.3","path":"packages/web"}
      ]}'

From a terminal with an agent's key, the same thing:

forkit factory run deps --items-file ./outdated.json

Step 4: Add a schedule

Schedules are written in UTC: every 15m, hourly, daily 06:30, weekly mon 09:00. Forkit's once-a-minute sweep asks for a run when a slot comes, once per slot. A missed slot is run once, not once for every slot missed.

A scheduled run starts with whatever input the schedule gives it, so a scheduled factory usually fits work that finds its own items: "list outdated packages and update the first one", or a nightly check.

Schedules depend on the plan (CLAUDE.md, "What each plan may do", 21 Nov 2026, applied when billing is enforced): Free has 1 factory without a schedule; Pro has 5 factories with schedules; Team has 100. A factory is checked against its plan when it is made, and each run again when it starts.

Devin offers scheduling too: since 20 Mar 2026 you describe recurring work in plain language and Devin sets the cadence (Cognition, "Devin can now Schedule Devins"). The difference is who runs the agents. A scheduled Devin is a Devin session. A Forkit factory starts whatever agents your runner starts, on your machines.

Step 5: Run the runner

The runner is the part your team operates. forkit factory work is a reference runner:

forkit factory work deps \
  --exec "$PWD/agent.sh" \
  --repo-from ./my-repo

For each run it picks up the oldest waiting run, starts it (which creates the fan-out and returns each agent's key, prompt and title, once), and runs your command through the shell once per agent, each in its own empty folder. The command gets FORKIT_API_KEY, FORKIT_URL, FORKIT_PROMPT, FORKIT_TITLE and FORKIT_AGENT in its environment. With --repo-from DIR, the runner pushes that checkout as the starting code first. When every agent has ended, it finishes the run, which stops the run's agents and keeps its cost. Add --once to handle one waiting run and exit; --dir DIR sets where the agents' folders go.

A minimal agent.sh for Claude Code:

#!/bin/sh
forkit init --sandbox
forkit repo clone work && cd work
claude -p "$FORKIT_PROMPT"

forkit init --sandbox installs Claude Code's hooks with no sign-in or question and denies a permission request nobody answers. forkit repo clone clones the agent's own fork; git asks Forkit for a fresh short-lived token each time.

One lesson from Forkit's own recorded run: because each agent starts in its own empty folder, --exec needs the script's full path. ./agent.sh will not be found (CLAUDE.md, "The model-comparison demo", 21 Nov 2026).

Each agent's thread is titled by the factory ("deps: zod", for example), so the inbox and the Mac app show which run and item an agent belongs to.

Step 6: Judge every run

A factory you cannot judge is a loop you cannot trust. After a run, mark it:

forkit factory verdict RUN_ID good --note "all six PRs green"
forkit factory verdict RUN_ID bad --note "two agents edited the lockfile"

A person can do the same from their own app, and the factory's agents can mark it themselves through the API. Then:

forkit factory show deps

gives the runs (finished, failed, waiting, running), how many were judged good and bad with the pass rate among judged runs, the cost in all and per run, and the seconds per run.

Those three numbers are the test of the factory. A pass rate that does not rise means the prompt or the split needs work. A cost per run that climbs means agents are wandering. Seconds per run tells you whether parallel agents are buying time.

Warp's 24 Nov 2026 guide describes YAML blueprints with stages and transitions, triggered when a GitHub issue gets a label, with a merge-risk rating in five categories (alignment, impact, verification, rollback cost, error detection). As read on 25 Nov 2026, it does not describe schedules, pass rates or budgets. The two approaches cover different halves: Warp's describes the steps inside a run, Forkit's records whether runs succeed and what they cost.

What a run looked like

Forkit's model-comparison run (CLAUDE.md, 21 Nov 2026, staging, one run) started from a factory. A study repository fitted models to NOAA's monthly Mauna Loa CO2 record up to 2015 and scored each on the 130 months after, which the model was never given. One POST to the factory's webhook address with twelve items asked for the run. The reference runner started twelve Claude Code agents, one model each. All twelve asked to run node run.js within 13 s of each other and were one question; one "Allow once" answered all twelve. The run finished 63 s after it started at about $1.25 (an estimate at list price). The run was marked good, and forkit factory show co2 gave 1 run, 100% good, $1.25 and 63 s a run.

One run is not a pass rate. It shows the mechanics work end to end.

What is not built

From CLAUDE.md, as of 21 Nov 2026:

  • No outbound notice when a run is requested or finished. A runner polls.
  • No page for people to see factories. It is API and CLI only.
  • No editing a factory. Delete it and make it again.
  • A Notion automation itself has not been tried; only a plain POST to the address.
  • A factory's schedule keeps asking after its workspace drops to Free; its runs are then refused by size at start.

Checklist

  1. Run the prompt by hand with one agent and read the result.
  2. Write the template with the scope in it.
  3. Create the factory with a dollar budget and a tool-call limit.
  4. Create a shadow copy of the factory (--shadow), run it first, and read what it would have asked (forkit factory asks FANOUT_ID).
  5. Write permission rules for the routine asks.
  6. Connect the webhook or set the schedule.
  7. Judge every run, and watch the pass rate and cost per run.

Related: agent fan-out explained, background agents in CI, a field guide to running agent teams, what is a software factory and software factory platforms compared.

Where Forkit fits

Forkit is the coordination system for agent teams: plans, handoffs, file claims and decisions, shared by every agent and the people behind them. A factory adds the record of every run. Your agents, your machines. It is free to try at forkit-mcp.com.

Sources