🧠 Git-based Memory Management for AI Agents - Supports OpenClaw and Hermes
bash <(curl -fsSL https://raw.githubusercontent.com/javamagong/claw-git-memory-skill/main/quick-install.sh)# Clone the repository
git clone git@github.com:javamagong/claw-git-memory-skill.git
cd claw-git-memory-skill
# Run installer
bash hermes/install.sh ~/my-claw-memory
# Restart Hermes
hermes gateway restart| Feature | OpenClaw | Hermes |
|---|---|---|
| Auto version control | ✅ Hooks | ✅ Provider |
| Session isolation | ✅ | ✅ |
| Auto commit | ✅ | ✅ |
| Auto push | ✅ | ✅ |
| Remote sync | ✅ | ✅ |
| Tool access | ❌ | ✅ gitmemory_* |
claw-git-memory-skill/
├── .openclaw/hooks/ # OpenClaw hooks (TypeScript)
│ ├── git-memory-session-start.ts
│ └── git-memory-session-end.ts
├── hermes/ # Hermes provider (Python)
│ ├── __init__.py
│ ├── provider.py
│ └── install.sh
└── docs/ # Documentation
Automatic - no manual operations needed:
- Session start → Auto-pull latest memory
- During conversation → Auto-save memory
- Session end → Auto-commit + push
Tools available:
| Tool | Description |
|---|---|
gitmemory_status |
Check git memory status |
gitmemory_commit |
Commit pending changes |
gitmemory_push |
Push to remote |
gitmemory_pull |
Pull from remote |
Example in Hermes chat:
You: Check memory sync status
Hermes: *uses gitmemory_status*
Current status:
- Repo: ~/my-claw-memory
- Branch: master
- Changes: 3 pending
- Last commit: session: abc123 at 2026-04-10 12:00
Add to TOOLS.md:
git-memory:
repo: /workspace/projects/workspace
remote: git@github.com:yourname/repo.git
auto-commit: true
auto-push: falseAdd to ~/.hermes/config.yaml:
memory:
provider: gitmemory
repo: ~/my-claw-memory
auto_commit: true
auto_push: trueOr set environment variable:
export GIT_MEMORY_REPO=~/my-claw-memorymy-claw-memory/
├── MEMORY.md # Global memory
├── USER.md # User profile
├── SOUL.md # Agent personality
├── TOOLS.md # Environment config
├── SECRET.example.md # Secrets template
├── memory/ # Daily memory
│ ├── 2026-04-10.md
│ └── ...
├── subsystems/ # Subsystem memory
│ ├── trading/
│ └── conversation/
└── .git/ # Git repository
┌─────────────────┐
│ Git Remote │ (GitHub/Gitee)
│ Repository │
└────────┬────────┘
│ git push/pull
┌────┴────┬──────────┐
↓ ↓ ↓
┌───────┐ ┌────────┐ ┌──────────┐
│ 扣子 │ │ 腾讯云 │ │ OpenClaw │
│ 云电脑 │ │ Hermes │ │ (原环境) │
└───────┘ └────────┘ └──────────┘
All devices share the same memory repository, keeping memories in sync.
- ✅ Added Hermes Agent support
- ✅ Python provider with gitmemory_* tools
- ✅ Unified memory repository structure
- ✅ Multi-device sync support
- Auto-trigger mechanism
- Subsystem memory
- Schema-Driven Merge
- Conflict detection
- OpenClaw Hook Integration
See CHANGELOG.md for full history.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new features
- Submit a pull request
MIT License
Version: 2.1.0 | Built by JavaMaGong & A小二 (OpenClaw/Hermes assistant)