Show HN: Git for AI Agents (github.com)

129 points by doshay ↗ HN
hi guys. been working on something i think is fundamentally missing in today's workflow with ai agents.

vcs.

i find myself struggling with questions that agents can't answer like "why did you do it?", "when did u delete this folder? why?", etc. or trying to /rewind (after a /compact...) or basically `bisect` to find when and why something was done by the agent in the current / previous session.

just like git did for code, i think we are the same core capabilities with ai agents

so...

i developed an open source solution for that (currently supporting claude code)

would love to get feedback, contribution or maybe other ideas or solutions you find for those problems.

67 comments

[ 4.9 ms ] story [ 85.8 ms ] thread
This is brilliant. Does it only work with Claude right now? Will it work with any agent built on the Claude Agent SDK?
at the moment only Claude Code, i'm planning to add support for the other big 3, but at the moment it's just me ... hopefully in the near future :)
Cool idea. Time will tell how it matures. It doesn't look trivial. Definitely should beat my current "scan the history" approach. Couple questions arose while reading the README:

- Would it integrate with rtk? Rtk is a token saver that shortens native output of got (and other) commands. - Does it track feature branches? - Is there garbage collection when history is rewriting (rebase before PR or removal of credential files.. ) or "simplification" of data as it gets older (Claude session logs lost...)?

Wishing you all the best with the project.

None of these X-for-agents seem to motivate why they don’t use X.
Agents can use git FWIW, and you can tell them to search old sessions by saying "Search through sessions in ~/.codex/sessions" and it'll find the most appropriate tools for doing so that is installed already. You can even add this to your system prompt or AGENTS.md and now you don't even have to prompt for it, it'll just look up the session history by itself.

Why this isn't built-in, I dunno, but been possible and easy for a very long time already, and works for any agent harness out there (as long as they persist sessions that is).

Personally I make the agent justify and explain things in the git commits, where is where that info went before agents anyways too, then have some sentences in my AGENTS.md about reading recent commits before doing changes, and using it whenever I prompt for history that isn't part of the current session. Seems to work perfectly fine.

Just use git. If your agent (especially claude) doesnt seem to know how, there are skills and hooks and other options to make it work. My 2c.
(comment deleted)
I am all for extremely granular control of agents. Good work.
I think the idea of tracking intent in git commits is a great idea but it feels to me like this might be reducible to some prompts/extending git/pre-commit hooks?
Very cool approach! We build something super similar, also going for content addressed storage and compare&swap as fundamental primitives.

Also commit dag based, but we also wrote this whole knowledge graph / triple-store CRDT data format on top.[1]

We also have p2p syncing of the history so you can use it to track your local work but also to have your agents coordinate within your team.

We had our agents build their own tools on top of that substrate, that way we're vendor independent, this stuff works everywhere from claude web, to self hosted openclaw, you only need to tell your agent to use the faculties.

Because the substrate takes care of everything, every new faculty you write on top of that inherits all of the same properties.

1: https://github.com/triblespace/triblespace-rs

2: https://github.com/triblespace/faculties

super nice, indeed similar approach
just curious since it reminds me a bit. Have you / someone tried https://entire.io/ (I'm not affiliated at all, so it is not a plug).
sure, fair question i think the main difference is that entire are built on top of git == you would have to commit in order to track something...
People in this thread seem to be too focused on the agent creating a git log. This seems to be solving a different problem than that does.

When you're interacting with agents, multiple prompts may reasonable culminate in a single commit. It may be useful to track or undo things between commits - at the prompt level. I personally have a workflow when I use Jujutsu (jj) for git already, and this slotted in very nicely to solve this problem. The auto-committing in jj makes it very easy and natural to compare diffs between prompts, and undo specific chunks or restore previous states without making a new commit every prompt. I only finish a commit, giving it a message and advancing the branch, once I've iteratively dialed in the changes I want.

I probably won't use this tool since I already have a flow that works for me, but maybe this will help people see why such a tool can be helpful.

Edit: fixed typo

tnx for the honest feedback! really, appreciate it! would you mine sharing more details about your workflow with jj?
can’t you just make agent hooks that do this with plain git?
that's exactly what i tried in the first place, but i think it would be misuse of git protocol, git is built for files - the blobs/ tree calc & mechanism , for large contexts and linear thinking flow it's differnt, but honestly - i think you can get to a very good solution with pure git..
my agent rebased and forcepushed with conflicts...
I think of git more like a defense and quality control against AI slop than something that should be automated
unfortunately, agents have decades of examples for how to use git, bearish on any tool that deviates from git
i think you misunderstood the concept, actually . it's not built to replace git, rather to sit on top of it.