Agent Foreman
v0.1.0 · 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, plans and launches 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 Plans and triages reviews 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, plans and launches 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 machinesPlans and triages reviewsKeeps 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 planning, search 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.
  • Code that search sends to a model host is secret-scanned first, and outside reviewers see only a scrubbed copy.
  • 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. It writes the diff and a brief for each reviewer as they are, so when a reviewer is a third-party service, scrub and scan what you send; the README's safety rules are a starting point.

Search

Local code search so your agent burns fewer tokens hunting: a symbol map (definitions and callers), grep, and an optional embedding-and-reranker model pair on a machine you own. What search sends to that machine is secret-scanned first.

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.

Install

Give this README to your coding agent to get started.

https://github.com/BrentCrude79/agent-foreman#read-this-first-if-you-are-a-coding-agent

That's the whole install. Agent Foreman has no setup wizard: your agent is the wizard. The README opens with a section written for it, which tells it to:

  1. read the README and the example configs;
  2. interview you about your machines, test suites and review rules, and let you pick wherever there's a choice;
  3. write the config, build the binary and run the checks;
  4. ask before it schedules tasks, opens ports, creates accounts or installs software.

Paste the link into Claude Code, Codex CLI or another coding agent with something like: "Read this README and install Agent Foreman for me."

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.

Rather do it by hand? Download a prebuilt binary, or build it: you need Go 1.27 and Git, plus SSH for any remote test machines. The command is foreman:

git clone https://github.com/BrentCrude79/agent-foreman
cd agent-foreman
go build -o foreman .      # or: go install
./foreman                  # prints the command list

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 goes only where you route it: your own machines over SSH, and any review services you configure. No telemetry, no Agent Foreman servers. 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.

Questions

How can I make my coding agent use fewer tokens?

Move the work that doesn't need its judgment out of its context. Agent Foreman runs the builds and tests and hands back a verdict of at most 40 lines instead of pages of logs. It searches code locally, and it sends reviews and drafts to other models. Your agent reads summaries and diffs, not raw output.

How do I make my Claude Code or Codex usage limit last longer?

The same way: route work to capacity you'd otherwise leave unused, such as spare machines, flat-rate plans from other providers and local models on your own GPU. Your main agent keeps the judgment calls. We show counts of work moved elsewhere, not a percentage saved, because no setup has a clean comparison.

How do I tell new test failures from flaky or pre-existing ones?

Record a baseline of the base revision once. When your agent's commits land, each failure is compared with it: failures the base already had are marked known, and the rest are rerun alone (up to a limit you set), so a test that then passes is labelled flaky, not new. Only what's left is reported as new.

Can my coding agent run its tests on another machine?

Yes. Any machine you can reach over SSH with a key becomes a build or test host, with slots that limit how many jobs it runs at once and a queue for long jobs. Nothing listens on a port: it uses SSH and files.

How do I get a second AI opinion on my agent's code?

Give each change a risk grade. Agent Foreman's review routing picks the reviewers you've configured for that grade, such as another cloud model, a flat-rate plan or a local model. It writes their briefs, launches them and merges the findings into one triage file for your agent to grade.

Can a local LLM help my cloud coding agent?

Yes, in jobs that are cheap to check. An optional embedding-and-reranker pair on a machine you own powers code search. The optional draft pipeline lets a local model write tests-only coverage, bug hunts that prove themselves with a failing test, and first drafts on idle hardware, behind a static safety gate.

Is my code sent anywhere?

Only where you route it: to your own machines over SSH, and to any review services you configure. Code that search sends to a model host first passes path filters and a secret and deny-word scan that refuses rather than redacts. Review briefs go out as written, so for a third-party reviewer, scrub what you send; the README's safety rules are a starting point. There's no telemetry, no account and no Agent Foreman server.

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.

Download

Version 0.1.0, prebuilt for six platforms. Each archive holds foreman (foreman.exe on Windows), LICENSE, NOTICE and README.md. Unpack it and put foreman on your PATH, or let your agent do it from the README. All files and release notes are on the release page.

Not code-signed yet: a one-time warning on first run

  • macOS blocks it. Before the first run, remove the download flag with xattr -d com.apple.quarantine foreman. If it was already blocked, allow it under System Settings > Privacy & Security.
  • Windows SmartScreen may say "Windows protected your PC". Choose More info > Run anyway, or unblock the zip before unpacking it (right-click > Properties > Unblock).

Run-tested on Windows x64 and macOS with Apple silicon; the other four are cross-compiled from the same source. The builds are reproducible: the README says how to rebuild one and get the same bytes.

SHA-256 checksums for v0.1.0
4f11535d256eb3397d112d2fe0f9319d52192ec53fa36bca5a18fcdeab3e5af1  agent-foreman-v0.1.0-windows-x64.zip
a944bc0c05b605a58596e81b40a37456544720b6786556070c6b0f63d0dd4570  agent-foreman-v0.1.0-windows-arm64.zip
1f08cd5c9542487d0f7674c20b11738b53e983de637e47b7e32342da0ec0127b  agent-foreman-v0.1.0-macos-arm64.tar.gz
5f83891aea8905d1c836997321d88349e1fe4fa66417058ba16bb32231aa8515  agent-foreman-v0.1.0-macos-x64.tar.gz
cf91a617b3061f6b84adf69b56a31d210ca1c3953f86f455a1db6ba8e1e05c53  agent-foreman-v0.1.0-linux-x64.tar.gz
1c1be458b650b0afbff044dfe7ebbe1ed2eddf82b28d0900ab864a0692b46d3d  agent-foreman-v0.1.0-linux-arm64.tar.gz

Check a download with sha256sum <file> on Linux, shasum -a 256 <file> on macOS or Get-FileHash <file> in PowerShell, and compare it with the list above or the release's SHA256SUMS file.

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.