Observed since 20 Oct, 22:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Git for AI Memory. Prevent hallucinations with save points.
Give your LLM the power to Undo.
AgentGit is a version control library designed for AI Agents (not just humans). It allows Agents to snapshot their own memory, recover from hallucinations, and manage their own state safely.
"Seamlessly integrates with OpenAI, Anthropic, LangChain, and OpenClaw."
Most Agents are fragile. If they write bad data to memory.md or state.json, it's permanent.
AgentGit solves this by giving the Agent a Tool to save its work.
commit()checkout()pip install agent-git
Don't run manual commands. Give the tools to your bot.
AgentGit comes with pre-built tool definitions. Just import and pass them to your model.
import openai
from agent_git import AgentGit, get_llm_tools
# 1. Initialize Memory
memory = AgentGit(root_dir="./agent_workspace")
memory.init()
# 2. Get the Tools (JSON Schema is built-in!)
tools = get_llm_tools()
# 3. Give them to the Agent
response = openai.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Update my user profile to say I love Python."}],
tools=tools # <--- Agent can now call 'agent_git_commit' itself!
)
AgentGit includes a Skill Definition that teaches autonomous agents how to use it.
from agent_git import get_skill_text
print(get_skill_text())
# Output:
# # Skill: AgentGit (Memory Version Control)
# Use this skill to save/restore memory states...
# - agent_git_commit(message, files)
# ...
Once equipped, your Agent handles the rest:
The Agent Writes Memory:
Agent: "I will update
user_preferences.json."
The Agent Commits (Automatically):
Agent: "Calling
agent_git_commit(message='Updated user preference', files=['user_preferences.json'])."
The Agent Fixes Hallucinations:
User: "Wait, I didn't say that!" Agent: "My apologies. Calling
agent_git_checkout(commit_hash='PREVIOUS_HASH')to restore the correct state."
You can still inspect what your Agent is doing:
# See the Agent's save history
agent-git log
# [93a8571] 🤖: Learned about Blender
# [a1b2c3d] 🤖: Updated project roadmap
AgentFinish event.Built by Moustapha Moussa for the Open Source AI Community.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 24 Feb 2026 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:5cb949991ca9a70eeef9f3470ad6fd3f982ef502aae8504c96a8694a8e1dc016