Agent Foreman
Free · open source · Apache-2.0

Make your coding agent go further.

Agent Foreman hands the busywork to plain code, the builds and tests to your other machines, and the drafts and second opinions to local models and partner agents. Your agent stays in charge: it grades every finding, reads every diff and does the final polish and merge.

For people who run local LLMs, tinker with local AI, and build in hybrid cloud-and-local setups. Works alongside Claude Code, Codex CLI and other coding agents.

The Agent Foreman crew You make the decisions. Your primary agent is the manager: it designs, picks which model writes each change, reads every diff and merges, and brings you questions with sizes and a do-less option. It sends work orders to Agent Foreman, the dispatcher, which queues jobs behind a safety gate, runs builds, test suites and fuzzing on your machines over SSH and gets their verdicts back, packs secret-scanned reviews, keeps the search index fresh and keeps a ledger of what every job cost. The primary agent sends review jobs to two secondary agents in the cloud: secondary agent 1 is the lead security reviewer and red-teams every design; secondary agent 2 gives second opinions and general reviews and does cited research, and sees scrubbed code only. Their findings go back to the primary agent, which grades each one. A local Qwen search pair, an embedding model and a reranker, is always on and seeds every brief with top search hits. A local LLM on your own GPU works the night shift from Agent Foreman's queue: it hunts bugs with a failing test, traces code into checked maps, drafts code and fixes its catches, and writes tests-only coverage, only in your hours and yielding to games. Its drafts get a pre-review and a re-review from the secondary agents, and its drafts, maps and failing tests go to the primary agent. YOU · DECIDE MANAGER · YOUR CODING AGENT Primary agent Designs, picks the writer, reads every diff, merges large model mid model small model COMPUTE · OVER SSH Your machines Builds, test suites, fuzzing on any box your key reaches DISPATCHER Agent Foreman Queues jobs behind a safety gate Runs suites on your machines Packs reviews, secret-scanned Keeps the search index fresh Ledgers: what every job cost SECONDARY AGENTS · CLOUD Secondary agent 1 Lead security reviewer Red-teams every design Secondary agent 2 Second opinion, general reviews Cited research, scrubbed code only SEARCH · LOCAL Qwen search pair Embedding + reranker, always on Seeds every brief with top hits NIGHT SHIFT · YOUR GPU Local LLM Hunts bugs with a failing test Traces code into checked maps Drafts code, fixes its catches Writes tests-only coverage your hours only · yields to games decisions questions, with sizes and a do-less option work orders jobs verdicts review jobs findings each one graded queue hits drafts, maps, failing tests drafts: pre-review, re-review The Agent Foreman crewYou make the decisions. Your primary agent is the manager: it designs, picks which model writes each change, reads every diff and merges, and brings you questions with sizes and a do-less option. It sends work orders to Agent Foreman, the dispatcher, which queues jobs behind a safety gate, runs builds, test suites and fuzzing on your machines over SSH and gets their verdicts back, packs secret-scanned reviews, keeps the search index fresh and keeps a ledger of what every job cost. The primary agent sends review jobs to two secondary agents in the cloud: secondary agent 1 is the lead security reviewer and red-teams every design; secondary agent 2 gives second opinions and general reviews and does cited research, and sees scrubbed code only. Their findings go back to the primary agent, which grades each one. A local Qwen search pair, an embedding model and a reranker, is always on and seeds every brief with top search hits. A local LLM on your own GPU works the night shift from Agent Foreman's queue: it hunts bugs with a failing test, traces code into checked maps, drafts code and fixes its catches, and writes tests-only coverage, only in your hours and yielding to games. Its drafts get a pre-review and a re-review from the secondary agents, and its drafts, maps and failing tests go to the primary agent. YOU · DECIDEdecisionsquestionsMANAGER · YOUR CODING AGENTPrimary agentDesigns, picks the writer,reads every diff, mergeslarge modelmid modelsmall modelwork ordersDISPATCHERAgent ForemanQueues jobs behind a safety gateRuns suites on your machinesPacks reviews, secret-scannedKeeps the search index freshLedgers: what every job costjobsverdictsCOMPUTE · OVER SSHYour machinesBuilds, test suites, fuzzingon any box your key reachesSEARCH · LOCALQwen search pairEmbedding + reranker, always onSeeds every brief with top hitshitsNIGHT SHIFT · YOUR GPULocal LLMHunts bugs with a failing testTraces code into checked mapsDrafts code, fixes its catchesWrites tests-only coverageyour hours only · yields to gamesdrafts: pre-review, re-reviewSECONDARY AGENTS · CLOUDSecondary agent 1Lead security reviewerRed-teams every designSecondary agent 2Second opinion, general reviewsCited research, scrubbed code onlyqueuedrafts, maps, failing testsreview jobsfindings, each one graded
The crew: you decide, your primary agent manages, Agent Foreman dispatches, two secondary agents in the cloud review, and a local LLM and a Qwen search pair work on your own hardware.

What it is

One binary

A single Go program, command line only. No GUI, no installer service.

No daemon, no port

Its worker and watcher run only when you start them, and it never opens a listening port.

Set up by your agent

Your coding agent reads the README, interviews you about what you've got, writes the config and installs the pieces. Hand-editing is optional.

Free and open

Apache-2.0. An enthusiast project, shared for fun. No account, no telemetry, no cloud of ours.

Three ways your agent goes further

1 · Your hardware

Compiles, test suites, builds and fuzzing run on your other machines over SSH: a spare desktop, an ARM laptop, a home server. Your agent asks for "the service suite"; Agent Foreman puts it on a free machine and hands back the verdict.

2 · Deterministic code

Queues, merges, test routing, review packing, secret scans, ledgers and machine slots are plain code, not model calls. Your agent spends no tokens on bookkeeping.

3 · Partner agents

Local-model drafts, prove-it bug hunts, security reviews and red-teams by other cloud models, and research with citations. Then a review loop, and your agent does the final polish.

How work flows through Agent Foreman Your coding agent sends work to Agent Foreman. Agent Foreman routes it to your machines, local models and partner agents. Results come back to Agent Foreman, which returns verdicts, findings and drafts to your agent for grading, final polish and merge. Your agent grades, polishes, merges Agent Foreman queues, routes, packs Your machines (SSH) Local models Partner agents How work flows through Agent ForemanYour coding agent sends work to Agent Foreman. Agent Foreman routes it to your machines, local models and partner agents. Results come back to Agent Foreman, which returns verdicts, findings and drafts to your agent for grading, final polish and merge.Your agentgrades, polishes, mergesAgent Foremanqueues, routes, packsYour machines (SSH)Local modelsPartner agents
Your agent → Agent Foreman → your machines, local models and partner agents → back to your agent for grading, the final polish and the merge.

The crew

The crew chart at the top shows who does what: you decide, your primary agent manages, Agent Foreman dispatches, secondary agents in the cloud review, and a local LLM and a Qwen search pair work on your own hardware. Here's how a draft moves down the line. The flows animate briefly when the page loads; hover over or focus a chart to replay them.

The draft line Step 1: the local LLM drafts code from your plan and flags open questions, free and overnight. Step 2: a secondary agent pre-reviews the draft for security and quality, and each finding cites a file and line. Step 3: the local LLM works through each finding, behind a gate that allows only build and test, still free. Step 4: a secondary agent re-reviews: it checks every fix, and new findings loop back to step 3. Step 5: once the re-review is clean, the work goes to your primary agent, which grades every finding, gives the code its final polish, reads all of it and merges. Then, as for all code: two reviews of security-critical code, and your yes before any push. LOCAL LLM Drafts From your plan Flags open questions Free, overnight SECONDARY AGENT Pre-review Security and quality Each find cites a file and line LOCAL LLM Fixes Works each find Gate: build, test Still free SECONDARY AGENT Re-review Checks every fix New finds loop back to step 3 PRIMARY AGENT Final polish Grades every find Polishes the code Reads it all, merges 1 2 3 4 5 Then, as for all code: two reviews of security-critical code, and your yes before any push draft finds fixes clean new finds The draft lineStep 1: the local LLM drafts code from your plan and flags open questions, free and overnight. Step 2: a secondary agent pre-reviews the draft for security and quality, and each finding cites a file and line. Step 3: the local LLM works through each finding, behind a gate that allows only build and test, still free. Step 4: a secondary agent re-reviews: it checks every fix, and new findings loop back to step 3. Step 5: once the re-review is clean, the work goes to your primary agent, which grades every finding, gives the code its final polish, reads all of it and merges. Then, as for all code: two reviews of security-critical code, and your yes before any push. 1LOCAL LLMDraftsFrom your plan, flags openquestions. Free, overnight.draft2SECONDARY AGENTPre-reviewSecurity and quality; eachfind cites a file and line.finds3LOCAL LLMFixesWorks each find. Gate: buildand test only. Still free.fixes4SECONDARY AGENTRe-reviewChecks every fix. New findsloop back to step 3.clean5PRIMARY AGENTFinal polishGrades every find, polishes,reads it all, merges.new findsThen, as for all code: two reviews ofsecurity-critical code, and your yes before any push
The draft line: the local LLM drafts, a secondary agent pre-reviews, the local LLM fixes, a secondary agent re-reviews (new finds loop back), and only then does your primary agent do the final polish and merge.

House rules

  • Your primary agent reads every diff before it merges. Drafts never merge as they are.
  • A secret scan runs before any code leaves your machines.
  • The local LLM runs only in the hours you allow, and yields to games.
  • Your agent prepares decisions with sizes and a do-less option, and you make them.

The toolbox

Names may change before the public release.

Land

Lands commits in a scratch worktree, then builds, vets, tests and writes a verdict. Suites go to whichever machine is free, and a sick host is reported separately from a failing test.

Queue, worker, status

A job queue run by a worker with no listening port. Status shows the queue, the worker, and who holds each machine slot.

Review

Plans, launches and triages outside reviews of a commit range by partner models. A packer builds each review's input with a secret scan and a deny-list, so private files and secrets never leave your machine.

Search

Local code search so your agent burns fewer tokens hunting: a symbol map (definitions and callers), grep, and a small local embedding-plus-reranker model pair.

Local drafting

A quantized local model on a consumer GPU writes tests-only coverage, runs prove-it bug hunts ("write a failing test or report nothing"), and drafts code and fix passes. A static safety gate checks everything before any of it runs, only in the hours and GPU headroom you allow, and it yields when you start a game.

The numbers, from one real setup

Measured on one developer's hybrid setup: a desktop with a 12 GB GPU, a spare x64 box, an ARM laptop, and a few cloud accounts. All of it is work done somewhere other than the primary agent.

Work routed through Agent Foreman, with dates
WhatCountPeriod (2026)
GLM review, red-team and bug-hunt runs on a flat plan of about $151 a year542Sep 22 – Nov 28 (about 98 hours of agent time)
Meta Muse reviews and red-teams358Nov 16 – Dec 2 (about two weeks)
Local-model jobs on one consumer GPU, $0 on any meter430Nov 18 – Dec 1 (294 coverage, 74 prove-it hunts, 62 drafts and fix passes)
Lines of Go tests written by the local model, merged after grading~86,000Nov 5 – Dec 1 (43 commits, 202 test files)
Test-suite runs moved off the dev box to two spare machines over SSH2,896Nov 5 – Dec 2 (about 367 hours of test time)
Local coverage jobs accepted after grading, one measured week70%Nov 17 – 24 (104 of 149; about 88% after a gate fix)
Muse review findings accepted by the grading agent, one measured week83%Nov 17 – 24 (of 76 findings)

The honest small print

  • Delegation isn't free. Writing a brief, reading a report and reviewing a diff cost your primary agent real calls. So Agent Foreman only sends out work whose result is cheap to check: a failing test, a finding with a file and line, a citation.
  • Reviewers miss things, so every reviewer is graded. One day a local model's draft shipped a test file that didn't even parse. Both outside reviewers missed it; a plain test run caught it. That's why your agent always runs the tests, and why security-critical code gets two reviews.
  • No "X% saved" claim. We have no clean counterfactual, so we show counts of work done elsewhere, not a percentage.
  • Your mileage will vary. These numbers come from one setup. Yours depends on your hardware and accounts.

Bring what you've got

Machines

Any machine your agent can reach over SSH with a key becomes a build or test slot.

Cloud agents

Partner models through their API or CLI: for example a bridge to Meta Muse, Codex CLI, or GLM through Z.ai's Anthropic-compatible endpoint.

Local models

Sized to your hardware: several local draft agents if you have the GPUs, or a small embedding-and-reranker pair for search.

The interview

Your agent installs and configures each piece, and smooths over the rough parts: drivers, quantizations, SSH keys, endpoint settings.

You need Go 1.27 and Git, plus SSH for any remote test machines. Build it from source; the command is foreman:

git clone https://github.com/BrentCrude79/agent-foreman
cd agent-foreman
go build -o foreman .      # or: go install
# Then ask your agent:
"Read the Agent Foreman README and set it up for me."
# It interviews you, writes the config, then:
foreman status

The README opens with a section for your coding agent: it is the installer, and it asks before it changes anything on your machines.

Already have Ruby's foreman? The Ruby gem of the same name (a Procfile manager) also installs a foreman command. If you use it, install Agent Foreman under another name or alias it, for example agentforeman or afm.

Privacy

Your code stays on your machines, unless a route you set up sends out a packed, secret-scanned fraction of it. No telemetry, no Agent Foreman cloud. Partner outputs are treated as data, never as instructions.

Extensible

It's designed so reviewers, routes and machines are config entries: add a new model or box without touching code.

What it is not

  • Not a hosted service. There's no account and nothing to sign up for.
  • Not an agent itself. It extends the coding agent you already use.
  • No GUI, no background service, no open ports.

Get it

The source, README and licence are on GitHub: github.com/BrentCrude79/agent-foreman. There are no prebuilt binaries or tagged releases yet, so build it from source as shown above.

The optional local-model drafting pipeline lives in contrib/local-model-drafts. An outside security audit of its safety gate is scheduled, and any fixes will land on the main branch.