Graff Is a 3.7 MB Zig Agent That Keeps Score of Its Own Work
Watch on TikTok
The video walks through the GitHub README for graff (repo: justrach/codegraff), an open source agentic coding harness written in Zig. The pitch is that most AI agents start from zero every session, while graff tracks which approaches worked and feeds that record back into future runs through an evolution loop. The narration calls the project CodeGraph, but the repo on screen is codegraff and the binary is called graff.
An agent harness, not a chatbot
The README tagline sets the framing: "An AI that actually does the work. Not just talks about it. You don't chat with it. You give it work." You install a single binary via a curl one-liner on macOS, Linux, or Windows, sign in with an AI subscription you already have, and hand it tasks. The example prompts on screen are concrete: build a workout tracker app, clean a folder of messy CSVs into one spreadsheet, figure out why a site is slow and fix it, scrape five pages and summarize them, run a three-version experiment and report which scores best. It works in your real terminal on real files, and can spin up sub-agents to work in parallel.
The evolution loop is the differentiator
The video's core claim is persistence. Graff keeps score of which approaches succeed and adjusts its coding strategies over time, which the repo describes as a DGM evolution loop. That turns a static model into a worker that accumulates performance history across sessions instead of resetting. The narration frames this as where AI infrastructure needs to go for real autonomy: the agent manages complex tasks, debugs its own errors, and verifies results rather than handing you unchecked output.
The benchmark chart, with numbers
The README's "How it compares" section runs the same job on graff, Claude Code, and Codex (three read-only questions about the repo plus an 8-trial latency test). The chart on screen shows:
- Cost per task: graff $0.022 on deepseek-v4-pro, against Claude Code's $0.51 (Opus 4.8) and Codex's $0.42 (gpt-5.5), roughly 20x cheaper
- Memory: about 25 MB peak for graff, against ~410 MB for Claude Code (Node) and ~206 MB for Codex (Rust)
- One-shot latency: 4.4 s for graff versus 8.9 s for Codex on the identical ChatGPT endpoint
The README itself adds two honest caveats visible in the frames: the cost win comes from model freedom (graff runs deepseek, kimi, glm, grok, minimax, gpt, and claude, while Claude Code and Codex are locked to one vendor's models), and the latency edge is a one-shot and automation win from fast startup, "not a blanket 'graff is faster.'" These are the project's own numbers, so treat them as a vendor benchmark.
Why Zig and a tiny binary matter
Graff ships as one small Zig binary (the README badge says 3.7 MB, built on Zig 0.17 dev) with zero runtime dependencies. The practical consequence in the README: you can leave it running next to everything else and your laptop won't notice, versus the steady several-hundred-megabyte footprint of Node or Rust based competitors. Under the hood it is a minimal agentic harness that talks to Anthropic, any OpenAI-compatible endpoint, or a ChatGPT subscription, and handles memory management, tool execution, and sub-agent orchestration.
Key Takeaways
- Graff (justrach/codegraff) is an open source agentic coding harness in Zig that you hand tasks to instead of chatting with
- Its evolution loop records which approaches worked and improves strategies over time, so performance persists across sessions
- The project's own benchmark shows $0.022 per task on deepseek-v4-pro versus $0.51 for Claude Code and $0.42 for Codex, mostly from freedom to pick cheaper models
- A single 3.7 MB binary using ~25 MB of memory makes it cheap to leave running, unlike ~410 MB (Claude Code) or ~206 MB (Codex)
- The README discloses its own benchmark limits, which makes the numbers more credible than typical marketing charts
Resources
- justrach/codegraff -- the open source repo shown in the video, a multi-provider agentic coding harness in Zig with a DGM evolution loop
Published August 24, 2026. Writeup generated from a favorited TikTok.