Coordinating Multiple AI Research Agents Through Git Commits
Coordinating Multiple AI Research Agents Through Git Commits
When you have multiple AI agents researching different aspects of a problem simultaneously, they need a way to share findings without stepping on each other. The obvious approach is a message bus or shared memory system. The simpler approach is git.
Git as a Coordination Protocol
Each agent works in its own branch or worktree. When it finds something relevant, it commits. Other agents can pull those commits to see what has been discovered. Merge conflicts become a natural signal that two agents found contradictory information - which is exactly the kind of conflict you want to surface.
This is not a hack. Git is already a distributed coordination system designed for multiple contributors working on shared artifacts. AI agents are just fast, parallel contributors.
Why Not Message Buses
Message buses (Redis, RabbitMQ, custom pub/sub) add infrastructure complexity. You need to define message formats, handle ordering, deal with delivery guarantees, and build retry logic. Git gives you all of this for free - ordering through commit history, delivery through push/pull, and a built-in conflict resolution mechanism.
The other advantage is persistence. Every finding is permanently recorded with full context. You can replay the entire research process by reading the commit log. Try doing that with ephemeral messages.
The Practical Setup
- One repo per research project
- One branch per agent (agent-1, agent-2, etc.)
- Agents commit findings as markdown files or structured data
- A coordinator script periodically merges branches and flags conflicts
- Final synthesis reads the merged result
Where This Breaks Down
Git coordination works for research and analysis tasks where agents produce documents. It is less suitable for real-time interaction where agents need sub-second response times. For those cases, you still need in-memory communication.
But for the "go research five topics and bring me a summary" pattern, git commits beat custom infrastructure every time.
Fazm is an open source macOS AI agent. Open source on GitHub.