The Big Fat Geek

Personal blog of Prasad Ajinkya

The Git-Backed Brain: Using a Repo as Shared Agent Memory

If you’re using multiple AI agents to get work done, you quickly run into a context fragmentation problem. I might use Claude Desktop to brainstorm a compliance framework, switch to Claude Code in the terminal to refactor some Python, and then spin up Google’s Antigravity to build out a new React component. Each agent is brilliant in its silo, but they don’t talk to each other.

In a startup — especially one dealing with the intricacies of Indian fintech and banking regulations — context is everything. If the agent writing the code doesn’t remember the regulatory constraints we discussed yesterday, we’re building the wrong thing.

The solution isn’t a complex vector database or a proprietary memory layer. The solution is already sitting on our machines: a simple GitHub repository.

The Repo as a Shared Brain

Instead of relying on application-specific memory, I now use a dedicated GitHub repository as the common memory layer for all my AI agents. It’s essentially a structured knowledge base containing architecture decision records (ADRs), prompt libraries, workflow harnesses, and active project context.

Because it’s just a folder of Markdown files on my local machine, every agent can read it. Antigravity can parse the .md files to understand the data model before it starts coding. Claude Code can check the decisions/ directory to see why we chose a specific authentication flow. Claude Desktop can ingest the whole repository to act as a sounding board for new features.

How the Flow Works

In practice, my day-to-day workflow looks like this:

  1. The Brainstorm (Claude Desktop): I’ll start by mapping out a problem — say, handling tokenization requirements for a new lending product. We’ll work through the logic, and I’ll ask Claude to summarise the final approach into a structured Markdown document. I save this file directly into the memory repo.
  2. The Implementation (Antigravity): When I move to my IDE, I point Antigravity to the project repo, but I also give it access to the memory repo. The prompt is simple: "Read the tokenization specs in the memory repo and implement the core classes." It has exactly the same context Claude Desktop had.
  3. The Refactor (Claude Code): Later, if I need to quickly refactor or debug from the terminal, Claude Code can reference the same files. If it makes a structural change, I ask it to update the documentation in the memory repo.

Version-Controlled Thought

The real magic of using a Git repository is version control. Agent memory isn’t static; it evolves. By committing changes to the memory repo, I get a literal history of thought. I can see exactly when we decided to pivot a feature or change a data structure.

This setup effectively creates a unified “shadow board of directors” that spans multiple tools. It doesn’t matter which interface I’m using on any given Tuesday morning; the underlying intelligence is drawing from a single, verifiable, version-controlled source of truth.

Sometimes the best tool for cutting-edge AI isn’t more AI. It’s just Git.