{"slug": "our-agents-memory-lives-on-a-git-branch-we-were-reading-it-through-the-api-one-a", "title": "Our agents' memory lives on a git branch. We were reading it through the API, one file at a time.", "summary": "A developer whose team stores agent-learned artifacts — specs, evidence, fix state, stories and team insights — on an orphan git branch called `kandi-store` described how a build that read the branch through GitHub's REST API, one request per file on every sync, burned through the 5,000-requests-per-hour quota shared across all tools and locked the engineer out of their own work every ten minutes. Switching to a per-machine git mirror cut the machine from roughly 950 store requests an hour to zero, since a `git fetch` transfers only what changed and costs no API quota. The team added guards — a per-component request budget in CI, a lint rejecting GitHub calls outside their client, and a cap on background calls — to prevent a repeat.", "body_md": "*A short update from the series on evidence-based agentic development.*\n\nOur 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.\n\nThen 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.\n\nThe numbers from that day:\n\nThe 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.\n\nThat 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.\n\nWe 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.\n\nThe lesson: when the data is in git, use git.\n\nThis 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*.\n\n**Control Your Fate at the Metal**\n\nWednesday 2 December, 15:00, Human OS Lab room. 45 minutes.\n\nIf you're coming, say hello. If you're not yet, `2026SPEAKER_20` takes 20% off a ticket.\n\n#BuildStuff15 #buildstuffconf #AgeOfAgency @buildstuffconf [https://buildstuff.events](https://buildstuff.events)", "url": "https://wpnews.pro/news/our-agents-memory-lives-on-a-git-branch-we-were-reading-it-through-the-api-one-a", "canonical_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_at": "2026-11-29 21:11:38+00:00", "updated_at": "2026-11-29 21:14:57.752820+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "mlops"], "entities": ["GitHub", "kandi-store", "Build Stuff"], "also_reported_by": [], "takeaway": "Reading a git-backed agent memory store via GitHub's REST API one file per sync burned the shared 5,000-request hourly quota; mirroring the branch per machine and syncing with `git fetch` dropped store requests from about 950 an hour to zero.", "recommendation": {"advice": "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.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/our-agents-memory-lives-on-a-git-branch-we-were-reading-it-through-the-api-one-a", "markdown": "https://wpnews.pro/news/our-agents-memory-lives-on-a-git-branch-we-were-reading-it-through-the-api-one-a.md", "text": "https://wpnews.pro/news/our-agents-memory-lives-on-a-git-branch-we-were-reading-it-through-the-api-one-a.txt", "jsonld": "https://wpnews.pro/news/our-agents-memory-lives-on-a-git-branch-we-were-reading-it-through-the-api-one-a.jsonld"}}