Ants don't have a CEO.
Still, each one knows what to do: it follows the trail the others left. agf does the same for your AI agents. It's called stigmergy.
agf (agent-graph-flow) is a free, open-source command-line tool that organizes the work of AI coding agents such as Claude Code, Copilot and Codex. It splits the request into tasks, hands the agent one at a time and only accepts a task as done when a test proves it works. Everything runs on your computer. The principle is stigmergy: each agent records what it did, and the next one picks up from there.
curl -fsSL https://graph-flow.cloud/install.sh | bashmacOS, Linux and Windows · runs on your computer, no Docker · Open source, Apache-2.0 license
See how the parts fit together →The idea
Why ants
No single ant knows where the food is. When one finds a good path, it leaves a scent on it. The others follow the scent, and the scent on bad paths fades. With nobody giving orders, the colony ends up on the best path.
AI agents are the same: none of them knows in advance what will work in your project. agf records what worked and what didn't, so the next agent starts out knowing.
agf done records the task that passed its testsagf learning route gives less weight to what failedagf learning stats shows what works bestagf colony-health gives a grade from A to Fagf harness --saturation shows where improving pays off nowOnly what a test proved counts as a success, not what the agent said. Picking the next task by the path that worked best is optional (agf next --aco); without it, priority decides.
How it works
Plan
The request becomes a list of small tasks, each with a clear definition of done.
Build
The agent takes a task, writes the test, then the code, and closes the task when the test passes.
Harden
agf harness grades the project's quality and points to what to fix first.
Guarantees
What agf won't let through
Code without a task
Every change is tied to a recorded task. You can always tell why a line exists.
Two tasks at once
Each agent does one task at a time. agf next hands over the next one when the current one closes.
Code before the test
The test comes first and has to fail. Only then comes the code that makes it pass.
Done in name only
A task closes when the code and the test exist and the test passes. Saying it's finished isn't enough.
Shortcuts without a reason
Closing a task while skipping the checks requires a reason, and agf records who did it and why.
What's new
What changed in version 0.31
0.31 brings step-by-step runs that resume where they stopped and wait for your approval, scheduling, Code Mode to spend fewer tokens on tools, and per-tool MCP control. Gates got fast: closing a task takes under a minute.
Picks up where it stopped
Splits the work into steps and saves each one in the local database. If it stops halfway, it restarts from the last finished step.
agf checkpoint run <steps.json>
Asks for your approval midway
A step can stop and wait for a person. You approve or deny, and the run goes on or ends there.
agf approve <run> --reason "ok"
Runs on its own schedule
Schedules prompts and runs on a timetable (cron) or on a signed HTTP call.
agf schedule add "0 9 * * *" "<prompt>"
Spends fewer tokens on tools
The agent writes a small program that calls several tools at once, in an isolated sandbox with no network or files.
agf codemode run <tools.json> "<code>"
Controls each MCP tool
For each tool you decide: allow, block or ask first. Adding an MCP server shows the command and asks you to confirm.
agf mcp add <server>
Compares models on the same work
Runs a large model and a small one on the same task and shows each one's accuracy and cost.
agf eval --arena
Closes a task in under a minute
Quality gates now have a fixed time budget: closing a task fits in 40 s, and pushing code, which took 22 min, now takes under a minute.
agf done <id>
Builds the whole release on one server
The macOS and Linux binaries and the Windows bundles come out of the same server, with macOS already signed.
agf upgrade
Features
Everything agf does, in groups
From the first command to coordinating several agents. Pick a group to see each command explained in one sentence.
Architecture
How the parts fit together
An interactive diagram follows one task: from your request to the agent, from the agent to agf, and from the quality gates to the task graph.
Open the diagram →Getting started
From zero to your first finished task
Install and go. There's no config file to write.
Run agf on its own to see the welcome screen.
$ agf init # sets up the project $ agf import-prd docs/prd.md # creates the tasks from a document $ agf start # takes the next task $ # failing test -> code -> passing test # the agent does the task $ agf done <id> # checks and closes the task $ agf metrics # shows what each task cost in tokens $ agf harness # grades the quality
See it work
From install to your first finished task in 70 seconds
Narrated video (in Portuguese): install, create the tasks, write the test, make it pass and close the task.
Cost
What each task cost
agf records every AI call: which task, how many tokens and what it cost. agf metrics shows the cost per task, agf metrics --simulate shows what it would cost with another model and agf savings shows how much you saved.
By default your agent is the one calling the AI, not agf. So agf spends nothing, and seeing few recorded costs is normal. Every saving shown says whether it was measured or estimated.

No need to take our word for it: the code is open.
agf is open source (Apache-2.0). It doesn't send your data and doesn't identify your machine, and an automated test guarantees it. Download it, check it and use it anywhere.
Install in seconds
Download agf
On macOS and Linux, agf is a single program: no Node, npm or Docker needed. On Windows it runs on Node (version 22 or 24), because companies often block unsigned .exe programs.
macOS
Install with one command:
Linux
Install with one command:
Windows
Install with one command:
macOS: the program isn't signed, and the installer unblocks the file itself. If you download it by hand, check the .sha256 file.
After downloading
chmod +x agf-darwin-arm64chmod +x agf-linux-x64shasum -a 256 agf-darwin-arm64The result must match the .sha256 file../agf --versionShows the installed version.agf init