Openclaw Auto Memory Skill
Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat...
Hansjoerg Hofer
@sunme1977
What This Skill Does
Unified memory platform that automatically captures and persists conversation context for Hermes, OpenClaw, and other AI agents across sessions. Uses pgvector for semantic search, supports multi-tenant isolation, and includes a governance layer with enforce rules for safe agent behavior.
Replaces fragmented, session-only memory by providing a shared, persistent long-term memory store with cross-agent access and automated capture.
When to Use It
- Enable an AI agent to remember user preferences and conversation history across sessions
- Share memory context between Hermes and OpenClaw agents for collaborative workflows
- Automatically persist user corrections and feedback as permanent memory entries
- Search past conversations using semantic vector search to retrieve relevant context
- Enforce governance rules to block destructive terminal commands and require user approval for file changes
Install
$ openclaw skills install @sunme1977/hermesclawzero-auto-memoryHermesClawZero Auto Memory
Automatically captures conversation context to HermesClawZero DB so the agent remembers across sessions. Loads relevant memories on fresh chats and supports scheduled DB maintenance.
🌌 New in v1.4.0: Interactive Memory Galaxy dashboard — full-screen animated Canvas visualization with tenant orbits, glowing nodes, nebula shader, hover info cards, zoom & idle rotation.
⚡ New in v3.0.0 — Enforce Governance Layer — A priority-based governance system that makes agent behavior more stable and safe. Enforce rules sit above memory and cannot be ignored by the agent.
🧠 Shared Brain
🤖 One‑Click Install
Paste this into Hermes, OpenClaw, or any AI agent:
Install this project from GitHub:
https://github.com/SunMe1977/HermesClawZero-ConfigSidecar
⬆️ The agent clones, configures, and starts everything.
After ~30s open → http://localhost:8010/dashboard
🧠 Shared Brain — Hermes and OpenClaw share the same memory store simultaneously.
v3.0.0 führt enforce-Regeln ein. Alte Memory-Regeln entfernt. Enforce ist jetzt die verbindliche Governance-Schicht.
Both agents' memories appear side by side in the Dashboard with platform icons (⚡ Hermes, 🐙 OpenClaw). Each sees only its own scope by default, the "All scopes" view gives you the complete shared brain. No extra setup needed.
📄 See
install_via_agent.mdfor the detailed agent instructions. | Step | What happens | |------|-------------| | 1 | Repo cloned +.envconfigured | | 2 | Docker Compose starts PostgreSQL (pgvector) + Ollama + API | | 3 | Dashboard live on:8010| | 4 | Memory skill activated in Hermes | | 5 | Auto-import: All existing Hermes sessions + messages are migrated into the Sidecar DB on first API startup | | 6 | Auto-capture begins on next conversation |
Core capabilities
| Area | What it does |
|---|---|
| Persistent long-term memory | SQLite chat data is synced to PostgreSQL with vector embeddings |
| Multi-tenant | Hermes, OpenClaw and other agents share the same DB, isolated by scope |
| Automated capture | New conversations are captured and embedded automatically |
| Memory optimization | Built-in tiering (hot/warm/cold), decay, archiving, consolidation |
| Configurable governance | Enforceable skill rules (scripts/enforce_loader.py / scripts/policy_plugin.py) so agents follow critical instructions |
| Dashboard & visualization | Memory Galaxy, health monitoring, search, manual review, click-to-edit |
| Vector search | pgvector-powered semantic search across all memories |
| Modular architecture | FastAPI + Docker Compose, designed for self-hosted deployment |
Manual start (if you don't have an agent):
git clone https://github.com/SunMe1977/HermesClawZero-ConfigSidecar.git
cd HermesClawZero-ConfigSidecar
setup.bat # Windows (or: ./setup.sh on Linux)
start.bat # Windows (or: ./start.sh on Linux)
⚠️ Privacy & Consent
By activating this skill you consent to automatic memory capture.
- Data stays local — all processing runs via the Sidecar API on your machine; no third-party data sharing
- Captures structured facts — the agent summaries and stores key information, not raw chat logs
- Cron jobs (nightly gardener, daily reminder) are only created when you explicitly ask to set them up
Script Path
# The CLI lives alongside the sidecar, NOT in the skill directory:
python C:\dev\HermesClawZero-ConfigSidecar\memory.py <command> "<text>"
Config is read from .env or env vars (MEM_PUBLIC_URL, API_KEY) automatically.
🔄 Auto-Capture Cron (Setup on Install)
When a user runs the one-click install (or says "install this skill"), set up these cron jobs automatically:
A. Session Memory Capture — every 30m
hermes cron create \
--name "hermes-auto-capture" \
--schedule "30m" \
--prompt "Review the recent conversation and capture any important facts, preferences, decisions, or project details using memory.py capture. Skip small talk, greetings, and already-captured info." \
--skills hermesclawzero-memory
B. Nightly Memory Gardener (auto-tagging)
hermes cron create \
--name "hermes-memory-gardener" \
--schedule "0 3 * * *" \
--prompt "Run python memory.py gardener to auto-tag uncategorized memories. Report only errors." \
--script "C:\dev\HermesClawZero-ConfigSidecar\gardener.py" \
--no-agent true
C. Daily Reminder (opt-in, ask first)
Only if user says yes:
hermes cron create \
--name "hermes-daily-reminder" \
--schedule "0 9 * * *" \
--prompt "Summarize yesterday's top memories and remind user of open items." \
--skills hermesclawzero-memory
All three run silently — the user won't see cron output unless something fails.
1. Auto-Load on Fresh Chat (Session Start)
When: Every new session begins (you receive context that it's a fresh chat).
What to do:
- Silently run:
python C:\dev\HermesClawZero-ConfigSidecar\memory.py search "user profile preferences current project state" 5 - Absorb the returned context internally.
- Do not output raw JSON or mention the search to the user unless they explicitly ask.
2. Auto-Capture — Deterministic Triggers
When to capture (run memory.py capture "..." immediately):
| Trigger | Example | What to capture |
|---|---|---|
| New fact stated | "I live in Berlin" | "User lives in Berlin" |
| Preference revealed | "I prefer dark mode" | "User prefers dark mode in all UIs" |
| Instruction given | "Call me Hans" | "User's name is Hans, goes by Hans" |
| Project detail shared | "Working on DiskRaptor v0.3" | "Current project: DiskRaptor v0.3, focus on UI tests" |
| Decision made | "Let's go with PostgreSQL" | "Chose PostgreSQL for the data layer" |
| Error/blocker mentioned | "The build fails on Windows" | "DiskRaptor: build fails on Windows, needs investigation" |
| Tool/config change | "I set up Ollama on port 11435" | "Ollama configured on port 11435" |
| User corrects you | "No, the port is 8080 not 3000" | "Corrected: server runs on port 8080" |
How to capture:
python C:\dev\HermesClawZero-ConfigSidecar\memory.py capture "<concise summary of the fact>"
# Optional: pass a scope_id for logical grouping
python C:\dev\HermesClawZero-ConfigSidecar\memory.py capture "<fact>" "project_name"
Do NOT capture when:
- User is just making small talk ("hello", "thanks", "ok")
- User is asking a question (capture the answer/fact, not the question)
- User is giving multi-turn instructions that aren't final yet (wait for resolution)
- The information is already captured (avoid duplicates)
- The information is temporary/throwaway ("let me try something real quick")
Rule of thumb: If you'd want to remember this when a different session starts next week → capture it. If it's only useful right now → skip it.
3. Full Chat History Sync (On Request)
When: User explicitly asks to back up the session ("save this chat", "backup session").
What to do:
- Use
sessions_historyto get the current visible session. - Format messages into a text summary.
- Execute:
python C:\dev\HermesClawZero-ConfigSidecar\memory.py autosave "<formatted_chat_history>" "chat_backup.md"
4. Automated Database Maintenance (Cron Jobs)
When: User asks to "setup memory background jobs" or "enable memory maintenance".
Create these cron jobs:
A. Nightly Memory Gardener (Auto-tagging):
- Name:
hermes-memory-gardener - Expression:
0 3 * * *(daily 3:00 AM) - Session target: isolated
- AgentTurn message:
exec python C:\dev\HermesClawZero-ConfigSidecar\gardener.py
B. Daily Memory Highlight (Telegram Push):
- Name:
hermes-daily-reminder - Expression:
0 9 * * *(daily 9:00 AM) - Session target: isolated
- AgentTurn message:
exec python C:\dev\HermesClawZero-ConfigSidecar\daily_reminder.py
Current cron jobs already exist for both (checked during setup).
Quick Reference
# Load context (session start, silent):
python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search "user profile preferences current project state" 5
# Save a fact (deterministic triggers above):
python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture "<fact>" [scope_id]
# Backup session (on request):
python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave "<text>" [filename]
<p align="center"> <em> If you enjoy this skill, consider sharing your experience — a short video review, a tweet, or a TikTok post helps others discover it. </em> </p>
🙌 Contributions Welcome
Contributions of all kinds are welcome —
feel free to open PRs or issues.
See CONTRIBUTING.md for code style, commit conventions, and PR workflow.
Top skills in this category
Self-Improving + Proactive Agent
@ivangdavilaSelf-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when...
ontology
@oswalpalashTyped knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linkin...
Humanizer
@biostartechnologyRemove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
Obsidian
@steipeteWork with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
YouTube Watcher
@michaelgatharaFetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract information from it.