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.
What it is
A single Go program, command line only. No GUI, no installer service.
Its worker and watcher run only when you start them, and it never opens a listening port.
Your coding agent reads the README, interviews you about what you've got, writes the config and installs the pieces. Hand-editing is optional.
Apache-2.0. An enthusiast project, shared for fun. No account, no telemetry, no cloud of ours.
Three ways your agent goes further
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.
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.
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.
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.
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.
| What | Count | Period (2026) |
|---|---|---|
| GLM review, red-team and bug-hunt runs on a flat plan of about $151 a year | 542 | Sep 22 – Nov 28 (about 98 hours of agent time) |
| Meta Muse reviews and red-teams | 358 | Nov 16 – Dec 2 (about two weeks) |
| Local-model jobs on one consumer GPU, $0 on any meter | 430 | Nov 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,000 | Nov 5 – Dec 1 (43 commits, 202 test files) |
| Test-suite runs moved off the dev box to two spare machines over SSH | 2,896 | Nov 5 – Dec 2 (about 367 hours of test time) |
| Local coverage jobs accepted after grading, one measured week | 70% | Nov 17 – 24 (104 of 149; about 88% after a gate fix) |
| Muse review findings accepted by the grading agent, one measured week | 83% | 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:
- read the README and the example configs;
- interview you about your machines, test suites and review rules, and let you pick wherever there's a choice;
- write the config, build the binary and run the checks;
- 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
Any machine your agent can reach over SSH with a key becomes a build or test slot.
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.
Sized to your hardware: several local draft agents if you have the GPUs, or a small embedding-and-reranker pair for search.
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.
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.
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.