Git-native agent memory: every write is a commit you can diff, revert, or audit.
Use standard git commands to diff what changed last session, revert a bad write, or audit the full history.memory/MEMORY.md is the primary file. It’s loaded automatically into every conversation.
# View current memory in REPL/memory# Full git history of every memory writegit log --oneline memory/MEMORY.md# Diff what changed last sessiongit diff HEAD~1 memory/MEMORY.md# Undo a specific memory commitgit revert a3f2e91# Read yesterday's mood loggit show HEAD:memory/mood.md# Save something to memory via SDKquery({ prompt: "Remember that the API base URL is https://api.example.com", dir: "./my-agent" })
git revert HEAD # undo last memory writegit revert HEAD~3..HEAD # undo last 3 writesgit checkout a3f2e91 -- memory/MEMORY.md # restore to specific pointgit commit -m "Restore memory to known good state"
Use git revert rather than git reset --hard — revert preserves the audit trail while reset destroys it.