# Our agents' memory lives on a git branch. We were reading it through the API, one file at a time.

> Source: <https://dev.to/kentkandiforge/our-agents-memory-lives-on-a-git-branch-we-were-reading-it-through-the-api-one-file-at-a-time-3ph8>
> Published: 2026-11-29 21:11:38+00:00

**Recommendation:** If your agent memory lives in git, sync it with `git fetch` and commits instead of per-file REST calls, and add a CI request budget plus a lint blocking GitHub calls outside your client.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

*A short update from the series on evidence-based agentic development.*

Our SDLC keeps everything the agents learn — specs, evidence, fix state, stories, team insights — on an orphan git branch called `kandi-store`. That gives us change control for free: every change is a commit, with history, diff and revert.

Then we shipped a build that read that branch through GitHub's REST API, **one request per file, on every sync, whether anything had changed or not.** GitHub gives a user 5,000 requests an hour, shared by every tool on every machine. The new build spent it in minutes, and I was locked out of my own work every ten minutes.

The numbers from that day:

The fix was obvious once I said it out loud: **it's a git branch, so sync it with git.** Each machine keeps a mirror. Catching up is one `git fetch`, which transfers only what changed and costs no API quota at all. A change is one commit, pushed once. A sync with nothing new is one fetch and nothing else.

That machine went from about 950 store requests an hour to **zero**. Synced this way, the store behaves like a message stream: a commit is a message, a push sends it, a fetch receives exactly what's new, in order.

We also added guards so a feature can't do this again: a request budget per component in CI, a lint that rejects GitHub calls outside our client, and a cap on background calls.

The lesson: when the data is in git, use git.

This is one of the write-ups behind my talk at [Build Stuff](https://buildstuff.events) in Vilnius this December, the 15th edition, under the theme *The Age of Agency*.

**Control Your Fate at the Metal**

Wednesday 2 December, 15:00, Human OS Lab room. 45 minutes.

If you're coming, say hello. If you're not yet, `2026SPEAKER_20` takes 20% off a ticket.

#BuildStuff15 #buildstuffconf #AgeOfAgency @buildstuffconf [https://buildstuff.events](https://buildstuff.events)
