{"id":"cbbf8960-d04c-450f-987e-7bca70a05cd7","entityType":"agent","slug":"clawhub-sunme1977-hermesclawzero-auto-memory","name":"Openclaw Auto Memory Skill","canonicalUrl":"https://www.xpersona.co/agent/clawhub-sunme1977-hermesclawzero-auto-memory","canonicalPath":"/agent/clawhub-sunme1977-hermesclawzero-auto-memory","generatedAt":"2026-10-09T23:50:32.342Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T16:40:16.167Z","emptyReason":null},"description":"Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat... Skill: Openclaw Auto Memory Skill Owner: sunme1977 Summary: Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat... Tags: latest:3.0.2 Version history: v3.0.2 | 2026-07-14T20:00:11.013Z | auto - Added a new logo file (logo.svg) to the project. - No code or documentation changes; functionality remains the same. v3.","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.3K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s175wsc9sw9jq93z4ck1ty7kes89zj1v:hermesclawzero-auto-memory","sourceUrl":"https://clawhub.ai/sunme1977/hermesclawzero-auto-memory","homepage":"https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/sunme1977/hermesclawzero-auto-memory","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":67,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:40:16.167Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:40:16.167Z","emptyReason":null},"stars":null,"forks":null,"downloads":2288,"packageName":null,"latestVersion":"3.0.2","tractionLabel":"2.3K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T16:40:16.093Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T16:40:16.167Z","lastCrawledAt":"2026-10-09T16:40:16.093Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T16:40:16.094Z","lastVerifiedAt":null,"highlights":[{"version":"3.0.2","createdAt":"2026-07-14T20:00:11.013Z","changelog":"- Added a new logo file (logo.svg) to the project. - No code or documentation changes; functionality remains the same.","fileCount":16,"zipByteSize":28174},{"version":"3.0.1","createdAt":"2026-07-14T19:59:05.246Z","changelog":"hermesclawzero-auto-memory v3.0.1 - Introduced enforceable governance rules via enforce section in SKILL.md, defining critical/priority agent policies. - Added policy loading and plugin scripts: scripts/enforce_loader.py and scripts/policy_plugin.py. - Added enforce-architecture documentation. - Old memory rules removed; governance now handled by enforce policies. - Removed obsolete skill-card.md file. - Documentation in SKILL.md updated to reflect the new enforce rules and system design.","fileCount":15,"zipByteSize":27737},{"version":"3.0.0","createdAt":"2026-07-14T16:29:32.422Z","changelog":"Breaking: enforce skill rules. Fixed: galaxy loading, favicon 401, unscoped MV","fileCount":12,"zipByteSize":21374},{"version":"2.9.0","createdAt":"2026-07-14T09:52:47.794Z","changelog":"Unscoped galaxy tenant, fire-and-forget update, Shared Brain docs, docker prune","fileCount":12,"zipByteSize":20377},{"version":"2.7.0","createdAt":"2026-07-13T19:30:08.265Z","changelog":"Memory Galaxy real content, tags fix, Playwright CI, type hints, .dockerignore, BOM fix","fileCount":12,"zipByteSize":20102},{"version":"2.6.0","createdAt":"2026-07-13T12:40:40.216Z","changelog":"Pre-Rebuild Backup: export pages before rebuild, restore on startup if DB empty. Two-tier recovery (backup -> state.db). Fixed psycopg v3 and schema columns.","fileCount":12,"zipByteSize":19463},{"version":"2.5.1","createdAt":"2026-07-13T09:58:23.479Z","changelog":"Multi-Replica API (Caddy+Redis+2xAPI), PgBouncer custom Dockerfile, Materialized Views for dashboard, PITR WAL Backup, Async Embedding Queue, HNSW 2M tuning, container naming hc-sidecar, k6 load testing","fileCount":12,"zipByteSize":19461},{"version":"2.5.0","createdAt":"2026-07-13T09:56:54.516Z","changelog":"Multi-Replica API (Caddy+Redis+2xAPI), PgBouncer custom Dockerfile, Materialized Views für Dashboard, PITR WAL Backup, Async Embedding Queue, HNSW 2M-Tuning, Container naming hc-sidecar, k6 Load Testing","fileCount":12,"zipByteSize":19597}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s175wsc9sw9jq93z4ck1ty7kes89zj1v:hermesclawzero-auto-memory","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T23:50:32.338Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sunme1977-hermesclawzero-auto-memory/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T16:40:16.167Z","emptyReason":null},"readme":"Skill: Openclaw Auto Memory Skill\n\nOwner: sunme1977\n\nSummary: Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat...\n\nTags: latest:3.0.2\n\nVersion history:\n\nv3.0.2 | 2026-07-14T20:00:11.013Z | auto\n\n- Added a new logo file (logo.svg) to the project.\n- No code or documentation changes; functionality remains the same.\n\nv3.0.1 | 2026-07-14T19:59:05.246Z | auto\n\nhermesclawzero-auto-memory v3.0.1\n\n- Introduced enforceable governance rules via enforce section in SKILL.md, defining critical/priority agent policies.\n- Added policy loading and plugin scripts: scripts/enforce_loader.py and scripts/policy_plugin.py.\n- Added enforce-architecture documentation.\n- Old memory rules removed; governance now handled by enforce policies.\n- Removed obsolete skill-card.md file.\n- Documentation in SKILL.md updated to reflect the new enforce rules and system design.\n\nv3.0.0 | 2026-07-14T16:29:32.422Z | user\n\nBreaking: enforce skill rules. Fixed: galaxy loading, favicon 401, unscoped MV\n\nv2.9.0 | 2026-07-14T09:52:47.794Z | user\n\nUnscoped galaxy tenant, fire-and-forget update, Shared Brain docs, docker prune\n\nv2.7.0 | 2026-07-13T19:30:08.265Z | user\n\nMemory Galaxy real content, tags fix, Playwright CI, type hints, .dockerignore, BOM fix\n\nv2.6.0 | 2026-07-13T12:40:40.216Z | user\n\nPre-Rebuild Backup: export pages before rebuild, restore on startup if DB empty. Two-tier recovery (backup -> state.db). Fixed psycopg v3 and schema columns.\n\nv2.5.1 | 2026-07-13T09:58:23.479Z | user\n\nMulti-Replica API (Caddy+Redis+2xAPI), PgBouncer custom Dockerfile, Materialized Views for dashboard, PITR WAL Backup, Async Embedding Queue, HNSW 2M tuning, container naming hc-sidecar, k6 load testing\n\nv2.5.0 | 2026-07-13T09:56:54.516Z | user\n\nMulti-Replica API (Caddy+Redis+2xAPI), PgBouncer custom Dockerfile, Materialized Views für Dashboard, PITR WAL Backup, Async Embedding Queue, HNSW 2M-Tuning, Container naming hc-sidecar, k6 Load Testing\n\nv2.4.0 | 2026-07-13T07:36:51.277Z | user\n\nData-loss prevention (pgvector pin, auto-recovery, backup), CI gated pipeline, branch protection, pre-push hooks, EMBEDDING_DIM portability fix\n\nv2.3.0 | 2026-07-12T17:54:20.509Z | user\n\nBi-temporal endpoints /why + /timeline, Memory Galaxy v3 filter/search, MCP auto-discover via mcp.json, GitHub Actions CI (lint+test+docker), AGENTS.md/llms.txt updated, GitHub topics expanded\n\nv2.2.0 | 2026-07-12T11:51:52.346Z | user\n\ncontent_hash dedup, migration recovery from Hermes state.db, DB backup prevention\n\nv2.1.0 | 2026-07-12T09:46:50.839Z | user\n\nEbbinghaus decay, Conflict Resolver, 7-term score, 10k-scale tuning, /ask + /export\n\nv1.9.0 | 2026-07-12T09:45:55.033Z | user\n\nEbbinghaus decay, Conflict Resolver, 7-term score, 10k-scale PG tuning, /ask + /export endpoints\n\nv1.8.0 | 2026-07-12T07:51:55.681Z | user\n\nNew /ask endpoint: natural language Q&A via vector search + GraphRAG + LLM synthesis. MCP expanded to 15 tools (search, capture, ask, feedback, graph_entities, graph_search, graph_traverse, graph_rag, episodic_timeline, record_episode, memory_update, memory_merge, memory_nudge, run_dedup, run_tier_assignment, run_reflection, run_optimizer, dashboard_stats). Ollama multi-host auto-discovery (tries Docker stack 11435 + host 11434).\n\nv1.7.0 | 2026-07-11T20:42:26.222Z | user\n\nPremium Dashboard UI/UX redesign: stat cards, data table, health grid, toast notifications, slide-in animations, redesigned buttons, consistent dark theme\n\nv1.6.0 | 2026-07-11T19:53:43.666Z | user\n\nDashboard UI: tier badges, memory type filter, days back filter, Knowledge Graph link, Nudge link, interactive feedback/editor/merge buttons\n\nv2.0.0 | 2026-07-11T19:48:15.619Z | user\n\nKnowledge Graph, Memory Tiers, Versioning, Compression, Consolidation, Merge, Editor, Feedback, Nudge, Temporal Search, Auto-Sync, pgvector HNSW, Self-wiring Graph\n\nv1.5.0 | 2026-07-11T19:21:11.657Z | user\n\nAdd CONTRIBUTING.md with PR review structure (auto checks, linting, style guide, commit conventions, merge strategy). Add PR template. Add Contributions Welcome section to README and SKILL.md.\n\nv1.4.4 | 2026-07-11T19:19:54.151Z | user\n\nDocument auto-import step in One-Click Install table: existing Hermes sessions migrate automatically on first API startup\n\nv1.4.3 | 2026-07-11T18:28:31.479Z | user\n\nAdd subtle CTA at end of README and SKILL.md: 'If you enjoy this project, consider sharing your experience — a short video review, tweet, or TikTok post helps others discover it.'\n\nv1.4.2 | 2026-07-11T18:23:16.693Z | user\n\n🔄 Auto-Capture Cron section in SKILL.md: 3 cron jobs (Session Capture every 30m, Nightly Gardener, Daily Reminder) that the agent sets up automatically during one-click install\n\nv1.4.1 | 2026-07-11T18:15:50.743Z | user\n\n🤖 One-Click Install section in SKILL.md — paste the GitHub URL into any agent, it clones + configures + starts everything automatically\n\nv1.4.0 | 2026-07-11T18:14:30.064Z | user\n\nMemory Galaxy Dashboard v2: interactive canvas visualization, nebula shader, parallax depth, hover info cards, zoom, idle rotation\n\nv1.3.1 | 2026-07-11T16:40:52.045Z | user\n\nAuto-Update section: sidecar auto-updates via GitHub, skill updates via openclaw skills update\n\nv1.3.0 | 2026-07-11T16:37:46.513Z | user\n\nAuto-Install, Memory Review, gBrain/Mem0 comparison, benchmarks, 6 MCP tools\n\nv1.2.2 | 2026-07-11T16:28:16.389Z | user\n\nGitHub badge at top, 3-step quickstart, ⭐️ prompts in SKILL.md+README.md, API_URL fallback\n\nv1.2.1 | 2026-07-11T16:24:58.024Z | user\n\nOptimized activation triggers, clearer examples in SKILL.md, improved README quickstart\n\nv1.2.0 | 2026-07-11T16:20:23.565Z | user\n\nAuto-capture trigger table, MCP Server docs, Docker stack ref, unified env vars, API_URL fallback\n\nv1.1.0 | 2026-07-11T12:29:50.327Z | user\n\nFull optimization: structured errors, timeout handling, I/O reduction, permissions/secrets manifests, smoke tests, README, CHANGELOG\n\nv1.0.1 | 2026-07-11T11:58:46.076Z | user\n\nAdd skill-card.md for marketplace listing, add privacy & consent disclosure\n\nv1.0.0 | 2026-07-11T11:55:10.376Z | auto\n\nHermesClawZero Auto Memory v1.0.0\n\n- Automatically saves important chat content into the Hermes DB, grouped globally for easy retrieval.\n- Loads user profiles and recent context at the start of fresh chat sessions for better continuity.\n- Enables full chat history backup to the DB upon user request.\n- Streamlines setup of scheduled background DB maintenance jobs, including nightly auto-tagging and daily memory highlights via push.\n- Reads API configuration from environment variables for easier deployment.\n\nArchive index:\n\nArchive v3.0.2: 16 files, 28174 bytes\n\nFiles: CHANGELOG.md (12012b), install_skill.ps1 (585b), logo.svg (266b), permissions.yaml (1530b), README.md (6256b), references/enforce-architecture.md (1472b), scripts/enforce_loader.py (5202b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/policy_plugin.py (8885b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2854b), SKILL.md (11230b), _meta.json (145b)\n\nFile v3.0.2:SKILL.md\n\n---\r\nname: \"hermesclawzero-auto-memory\"\r\ndescription: \"Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimization, multi-tenant dashboard with pgvector search.\"\r\nversion: \"3.0.0\"\r\ntags:\r\n  - memory\r\n  - hermes\r\n  - auto-capture\r\n  - governance\r\nenforce:\r\n  - id: foundation-rule\r\n    priority: critical\r\n    rule: \"Agent MUSS alle enforce-Regeln befolgen; sie stehen über Memory.\"\r\n    policy:\r\n      tool: \"*\"\r\n      pattern: \"*\"\r\n      action: allow\r\n      reason: \"Foundation rule — enables all other policies.\"\r\n  - id: deny-destructive-git-docker\r\n    priority: critical\r\n    rule: \"Terminal: git push, merge, reset, destructive rm, and Docker prune/rm are blocked.\"\r\n    policy:\r\n      tool: terminal\r\n      pattern: \"git push*|git merge*|git reset*|rm -*|docker system prune*|docker volume rm*|docker image rm*\"\r\n      action: deny\r\n      reason: \"Destructive git/Docker operations require explicit user approval.\"\r\n  - id: prompt-file-changes\r\n    priority: high\r\n    rule: \"Vor jeder Dateiänderung, Commit oder destruktiven Aktion Bestätigung einholen.\"\r\n    policy:\r\n      tool: terminal|file\r\n      pattern: \"git commit*|git push*|rm *|mv *|cp *|chmod*|chown*\"\r\n      action: prompt\r\n      reason: \"Ask user before modifying files or git state.\"\r\n  - id: persist-corrections\r\n    priority: high\r\n    rule: \"User-Korrekturen sofort als Memory speichern.\"\r\n    policy:\r\n      tool: memory\r\n      pattern: \"correction|wrong|fix|error\"\r\n      action: always\r\n      reason: \"User feedback must be persisted immediately.\"\r\ncategories:\r\n  - agents\r\n  - knowledge\r\ntopics:\r\n  - Memory\r\n  - Vector Search\r\n  - Chat Persistence\r\n  - pgvector\r\n  - Embeddings\r\n---\r\n\r\n# HermesClawZero Auto Memory\r\n\r\nAutomatically captures conversation context to HermesClawZero DB so the agent remembers across sessions. Loads relevant memories on fresh chats and supports scheduled DB maintenance.\r\n\r\n> 🌌 **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.\r\n\r\n> ⚡ **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.\r\n\r\n> **🧠 Shared Brain**\r\n\r\n## 🤖 One‑Click Install\r\n\r\nPaste this into **Hermes**, **OpenClaw**, or any AI agent:\r\n\r\n```text\r\nInstall this project from GitHub:\r\nhttps://github.com/SunMe1977/HermesClawZero-ConfigSidecar\r\n```\r\n\r\n**⬆️ The agent clones, configures, and starts everything.**  \r\nAfter ~30s open → [`http://localhost:8010/dashboard`](http://localhost:8010/dashboard)\r\n\r\n> **🧠 Shared Brain** — Hermes and OpenClaw share the same memory store simultaneously.\r\n>\r\n> **v3.0.0 führt enforce-Regeln ein. Alte Memory-Regeln entfernt. Enforce ist jetzt die verbindliche Governance-Schicht.**\r\n>\r\n> Both agents' memories appear side by side in the Dashboard with platform icons\r\n> (⚡ Hermes, 🐙 OpenClaw). Each sees only its own scope by default, the \"All scopes\"\r\n> view gives you the complete shared brain. No extra setup needed.\r\n\r\n> 📄 See [`install_via_agent.md`](install_via_agent.md) for the detailed agent instructions.\r\n| Step | What happens |\r\n|------|-------------|\r\n| 1 | Repo cloned + `.env` configured |\r\n| 2 | Docker Compose starts PostgreSQL (pgvector) + Ollama + API |\r\n| 3 | Dashboard live on `:8010` |\r\n| 4 | Memory skill activated in Hermes |\r\n| 5 | **Auto-import:** All existing Hermes sessions + messages are migrated into the Sidecar DB on first API startup |\r\n| 6 | Auto-capture begins on next conversation |\r\n\r\n### Core capabilities\r\n\r\n| Area | What it does |\r\n|------|-------------|\r\n| **Persistent long-term memory** | SQLite chat data is synced to PostgreSQL with vector embeddings |\r\n| **Multi-tenant** | Hermes, OpenClaw and other agents share the same DB, isolated by scope |\r\n| **Automated capture** | New conversations are captured and embedded automatically |\r\n| **Memory optimization** | Built-in tiering (hot/warm/cold), decay, archiving, consolidation |\r\n| **Configurable governance** | Enforceable skill rules (`scripts/enforce_loader.py` / `scripts/policy_plugin.py`) so agents follow critical instructions |\r\n| **Dashboard & visualization** | Memory Galaxy, health monitoring, search, manual review, click-to-edit |\r\n| **Vector search** | pgvector-powered semantic search across all memories |\r\n| **Modular architecture** | FastAPI + Docker Compose, designed for self-hosted deployment |\r\n\r\n### Manual start (if you don't have an agent):\r\n```bash\r\ngit clone https://github.com/SunMe1977/HermesClawZero-ConfigSidecar.git\r\ncd HermesClawZero-ConfigSidecar\r\nsetup.bat          # Windows   (or: ./setup.sh on Linux)\r\nstart.bat          # Windows   (or: ./start.sh on Linux)\r\n```\r\n\r\n---\r\n\r\n## ⚠️ Privacy & Consent\r\n\r\nBy activating this skill you consent to automatic memory capture.\r\n\r\n- **Data stays local** — all processing runs via the Sidecar API on your machine; no third-party data sharing  \r\n- **Captures structured facts** — the agent summaries and stores key information, not raw chat logs\r\n- **Cron jobs** (nightly gardener, daily reminder) are only created when you explicitly ask to set them up\r\n\r\n## Script Path\r\n\r\n```bash\r\n# The CLI lives alongside the sidecar, NOT in the skill directory:\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py <command> \"<text>\"\r\n```\r\n\r\nConfig is read from `.env` or env vars (`MEM_PUBLIC_URL`, `API_KEY`) automatically.\r\n\r\n---\r\n\r\n## 🔄 Auto-Capture Cron (Setup on Install)\r\n\r\nWhen a user runs the one-click install (or says \"install this skill\"), **set up these cron jobs automatically:**\r\n\r\n### A. Session Memory Capture — every 30m\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-auto-capture\" \\\r\n  --schedule \"30m\" \\\r\n  --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.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n### B. Nightly Memory Gardener (auto-tagging)\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-memory-gardener\" \\\r\n  --schedule \"0 3 * * *\" \\\r\n  --prompt \"Run python memory.py gardener to auto-tag uncategorized memories. Report only errors.\" \\\r\n  --script \"C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py\" \\\r\n  --no-agent true\r\n```\r\n\r\n### C. Daily Reminder (opt-in, ask first)\r\nOnly if user says yes:\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-daily-reminder\" \\\r\n  --schedule \"0 9 * * *\" \\\r\n  --prompt \"Summarize yesterday's top memories and remind user of open items.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n> All three run silently — the user won't see cron output unless something fails.\r\n\r\n---\r\n\r\n## 1. Auto-Load on Fresh Chat (Session Start)\r\n\r\n**When:** Every new session begins (you receive context that it's a fresh chat).\r\n\r\n**What to do:**\r\n1. Silently run: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"user profile preferences current project state\" 5`\r\n2. Absorb the returned context internally.\r\n3. **Do not** output raw JSON or mention the search to the user unless they explicitly ask.\r\n\r\n---\r\n\r\n## 2. Auto-Capture — Deterministic Triggers\r\n\r\n**When to capture** (run `memory.py capture \"...\"` immediately):\r\n\r\n| Trigger | Example | What to capture |\r\n|---|---|---|\r\n| **New fact stated** | \"I live in Berlin\" | `\"User lives in Berlin\"` |\r\n| **Preference revealed** | \"I prefer dark mode\" | `\"User prefers dark mode in all UIs\"` |\r\n| **Instruction given** | \"Call me Hans\" | `\"User's name is Hans, goes by Hans\"` |\r\n| **Project detail shared** | \"Working on DiskRaptor v0.3\" | `\"Current project: DiskRaptor v0.3, focus on UI tests\"` |\r\n| **Decision made** | \"Let's go with PostgreSQL\" | `\"Chose PostgreSQL for the data layer\"` |\r\n| **Error/blocker mentioned** | \"The build fails on Windows\" | `\"DiskRaptor: build fails on Windows, needs investigation\"` |\r\n| **Tool/config change** | \"I set up Ollama on port 11435\" | `\"Ollama configured on port 11435\"` |\r\n| **User corrects you** | \"No, the port is 8080 not 3000\" | `\"Corrected: server runs on port 8080\"` |\r\n\r\n**How to capture:**\r\n```bash\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<concise summary of the fact>\"\r\n# Optional: pass a scope_id for logical grouping\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<fact>\" \"project_name\"\r\n```\r\n\r\n**Do NOT capture when:**\r\n- User is just making small talk (\"hello\", \"thanks\", \"ok\")\r\n- User is asking a question (capture the *answer/fact*, not the question)\r\n- User is giving multi-turn instructions that aren't final yet (wait for resolution)\r\n- The information is already captured (avoid duplicates)\r\n- The information is temporary/throwaway (\"let me try something real quick\")\r\n\r\n**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.\r\n\r\n---\r\n\r\n## 3. Full Chat History Sync (On Request)\r\n\r\n**When:** User explicitly asks to back up the session (\"save this chat\", \"backup session\").\r\n\r\n**What to do:**\r\n1. Use `sessions_history` to get the current visible session.\r\n2. Format messages into a text summary.\r\n3. Execute: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"<formatted_chat_history>\" \"chat_backup.md\"`\r\n\r\n---\r\n\r\n## 4. Automated Database Maintenance (Cron Jobs)\r\n\r\n**When:** User asks to \"setup memory background jobs\" or \"enable memory maintenance\".\r\n\r\nCreate these cron jobs:\r\n\r\n**A. Nightly Memory Gardener (Auto-tagging):**\r\n- Name: `hermes-memory-gardener`\r\n- Expression: `0 3 * * *` (daily 3:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py`\r\n\r\n**B. Daily Memory Highlight (Telegram Push):**\r\n- Name: `hermes-daily-reminder`\r\n- Expression: `0 9 * * *` (daily 9:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\daily_reminder.py`\r\n\r\nCurrent cron jobs already exist for both (checked during setup).\r\n\r\n---\r\n\r\n## Quick Reference\r\n\r\n```bash\r\n# Load context (session start, silent):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py search \"user profile preferences current project state\" 5\r\n\r\n# Save a fact (deterministic triggers above):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py capture \"<fact>\" [scope_id]\r\n\r\n# Backup session (on request):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py autosave \"<text>\" [filename]\r\n```\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n  <em>\r\n    If you enjoy this skill, consider sharing your experience —\r\n    a short video review, a tweet, or a TikTok post helps others discover it.\r\n  </em>\r\n</p>\r\n\r\n---\r\n\r\n## 🙌 Contributions Welcome\r\n\r\nContributions of all kinds are welcome —  \r\nfeel free to open [PRs](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/pulls) or [issues](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/issues).\r\n\r\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md) for code style, commit conventions, and PR workflow.\n\nFile v3.0.2:README.md\n\n# HermesClawZero Auto Memory\n\n[![ClawHub](https://img.shields.io/badge/ClawHub-hermesclawzero--auto--memory-blue)](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\n**Your agent remembers across conversations.** Facts, preferences, project context, past decisions — the agent captures them automatically and loads relevant context on every new session.\n\nAll processing runs **locally** via HermesClawZero Sidecar (PostgreSQL + pgvector + Ollama for embeddings). No data leaves your machine.\n\n---\n\n## Features\n\n| Capability | What it means for you |\n|---|---|\n| **Auto-Capture** | Agent saves new facts, preferences, and project details *as you talk* — no manual saving needed |\n| **Auto-Load** | On fresh chats, the agent searches past memories and picks up where you left off |\n| **Semantic Search** | Finds memories by meaning, not just keywords (hybrid vector + lexical) |\n| **Chat Backup** | Say \"save this session\" and get a full searchable snapshot |\n| **DB Maintenance** | Optional nightly tagging + daily reminders (cron, opt-in) |\n\n---\n\n## Quickstart (3 minutes)\n\n### 1. Install\n\n```bash\nopenclaw skills install hermesclawzero-auto-memory\n```\n\n### 2. Configure\n\nThe memory.py CLI lives at `C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py`.  \nIt reads config from `.env` or environment variables.\n\nCreate or edit your `.env` with:\n\n```bash\nMEM_PUBLIC_URL=http://localhost:8010\nAPI_KEY=your_api_key_here\n```\n\n> 💡 `MEM_PUBLIC_URL` points to the HermesClawZero Sidecar API. Default is `http://localhost:8010`.\n> `API_KEY` must match the `API_KEY` in your Sidecar's `.env`.\n\n### 3. Verify connectivity\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"hello world\" 3\n```\n\nIf the Sidecar is running, you'll see matching memories (or no output if the DB is empty — that's fine).\n\n### 4. Done! The skill is active.\n\nNow when you talk to the agent, it will:\n- **Silently load** context from past memories on fresh sessions\n- **Automatically capture** new facts, preferences, and project details\n- **Respond without re-introducing** who you are or what you're working on\n\n---\n\n## Example Workflow\n\n```\n── Session 1 ──\nYou: \"Hey, I'm Hans. I work on DiskRaptor v0.3, mostly UI tests.\"\nAgent: *silently captures: \"User's name is Hans\", \"Working on DiskRaptor v0.3\", \"Focus: UI tests\"*\nAgent: \"Hi Hans! What would you like to do with DiskRaptor today?\"\n\nYou: \"I prefer dark mode in all my tools.\"\nAgent: *silently captures: \"User prefers dark mode in all UIs\"*\n\nSome time passes. A new session starts.\n\n── Session 2 (fresh chat) ──\nAgent: *silently loads past memories*\nAgent: \"Welcome back, Hans! Last time you were working on DiskRaptor v0.3 UI tests.\n       Shall we pick that up, or is there something new?\"\n```\n\n## Deterministic Capture Triggers\n\nThe agent captures when you share:\n\n| Trigger | Example | Gets captured |\n|---|---|---|\n| **Name / identity** | \"Call me Hans\" | `\"User's name is Hans\"` |\n| **Preference** | \"I hate notifications\" | `\"User prefers notifications off\"` |\n| **Project detail** | \"The API is on port 8080\" | `\"API runs on port 8080\"` |\n| **Decision** | \"Let's use SQLite\" | `\"Chose SQLite for storage\"` |\n| **Correction** | \"No, the branch is 'main'\" | `\"Default branch: main\"` |\n| **Blocker/error** | \"The build fails\" | `\"Build fails on Windows, needs fix\"` |\n\nThe agent does **not** capture: small talk (\"thanks\", \"ok\"), raw questions, or temporary/throwaway info.\n\n---\n\n## Usage (manual commands)\n\n```bash\n# Capture a fact\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"User prefers dark mode\" ui_preferences\n\n# Search memories\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"project preferences\" 5\n\n# Backup session history\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"$(cat backup.md)\" \"session_backup.md\"\n```\n\n---\n\n## Troubleshooting\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| `memory.py search` returns nothing but DB has data | API_KEY mismatch | Check `.env` API_KEY matches Sidecar's |\n| `ConnectionError` on any command | Sidecar not running | `docker compose up -d` in the Sidecar directory |\n| `HTTP 500` on capture | Ollama not running or misconfigured | `ollama pull nomic-embed-text` and check `/healthz` |\n| Agent doesn't seem to capture anything | Fresh install — no .env configured | Check `MEM_PUBLIC_URL` and `API_KEY` in `.env` |\n| Agent captures duplicates | No dedup check in SKILL.md triggers | Update if you see repeated captures of the same fact |\n| Cron jobs not working | User didn't opt in | Ask to run: \"setup memory background jobs\" |\n\n### Debug mode\n\nRun with verbose logging to see what the CLI is doing:\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"test\" 1\n```\n\nIf you see nothing, check:\n1. Is the Sidecar accessible? → `curl http://localhost:8010/healthz`\n2. Is the API key correct? → Check the exact `.env` content\n3. Is Ollama running? → `curl http://localhost:11434/api/tags`\n\n---\n\n## Skill Structure\n\n```\nhermesclawzero-auto-memory/\n├── SKILL.md              # Agent instructions (deterministic triggers)\n├── skill-card.md         # ClawHub marketplace card\n├── permissions.yaml      # Declared permissions\n├── secrets.yaml          # Declared secrets\n├── README.md             # This file\n├── CHANGELOG.md          # Version history\n└── scripts/\n    ├── install.ps1       # Install verification\n    ├── update.ps1        # Update check\n    └── smoke_test.ps1    # Integration smoke tests\n```\n\nThe core script lives alongside the sidecar:\n```\nC:\\dev\\HermesClawZero-ConfigSidecar\\\n├── memory.py             # CLI tool (capture/search/autosave)\n├── gardener.py           # Nightly tagging\n├── daily_reminder.py     # Daily highlights\n├── .env                  # API config\n└── ...\n```\n\n---\n\n## Repository\n\nSource: [github.com/SunMe1977/HermesClawZero-ConfigSidecar](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar)  \nSkill: [ClawHub hermesclawzero-auto-memory](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\nFile v3.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn72qpcz7hn4drhmgfd6d36x6n89zr3z\",\n  \"slug\": \"hermesclawzero-auto-memory\",\n  \"version\": \"3.0.2\",\n  \"publishedAt\": 1784059211013\n}\n\nFile v3.0.2:references/enforce-architecture.md\n\n# Enforce Governance Architecture — v2 Proposal\n\n## Current Architecture\n\n```\nSystem Prompt\n↓\nEnforce Rules\n↓\nLong-Term Memory\n↓\nConversation\n↓\nUser\n```\n\n## Proposed Two-Layer Architecture\n\n### Layer 1 – Prompt Governance (existing)\nParse `enforce:` from SKILL.md → inject rules above memory → preserve priority ordering.\n\n### Layer 2 – Runtime Policy Engine (new)\nValidates every dangerous action before execution:\n\n```\nLLM\n↓\nAction Proposal\n↓\nPolicy Engine\n↓\nAllowed?\n  ├─ Yes → Execute\n  └─ No  → BLOCKED + reason\n```\n\n### Structured Policies replace free-text rules\n\n```yaml\nenforce:\n  - priority: critical\n    rule: \"Never push directly to main.\"\n    policy:\n      tool: terminal\n      pattern: \"git push origin main\"\n      action: deny\n      reason: \"Direct pushes to main are not allowed.\"\n```\n\n### Policy Resolution\n`critical > high > medium` — most restrictive rule wins. `allow + deny = deny`.\n\n### Audit Log\nEvery blocked/approved action: timestamp, action, tool, rule matched, decision, reason.\n\n### Plugin Architecture\n`GitPolicy`, `FilesystemPolicy`, `DockerPolicy`, `ShellPolicy`, `DatabasePolicy`, `MCPPolicy`, `CustomSkillPolicies`.\n\n### Final Architecture\n\n```\nSystem Prompt\n↓\nEnforce Rules (Layer 1)\n↓\nLong-Term Memory\n↓\nConversation\n↓\nLLM Decision\n↓\nRuntime Policy Engine (Layer 2)\n↓\nTool Execution\n```\n\nThree independent layers: **Memory** (facts), **Governance** (behavior), **Execution** (actions).\n\nFile v3.0.2:CHANGELOG.md\n\n# Changelog\r\n\r\n## 3.0.0 (2026-07-14)\r\n\r\n### Breaking\r\n- **Enforceable Skill Rules** — Skills can now define `enforce:` rules with `priority: critical`. Rules appear as structured directives above memory in every turn. Agents must follow them.\r\n- **Loader ready** — `scripts/enforce_loader.py` parses SKILL.md frontmatter and outputs injectable YOU-MUST directives.\r\n- **Kaskadierung** — Child skills inherit enforce rules from parent skills. Loader scans all loaded skills.\r\n\r\n### Added\r\n- **scripts/enforce_loader.py** — CLI tool to extract enforce rules from any installed skill\r\n- **README enforce notice** — v3.0.0 führt enforce-Regeln ein. Alte Memory-Regeln entfernt. Enforce ist jetzt die Governance-Schicht.\r\n\r\n### Fixed\r\n- **Galaxy \"loading\" fix** — scope mapping now correctly matches unscoped items (`__unscoped__`), all items loaded (up to 20000), deadlock protection via lock_timeout\r\n- **Favicon 401** — `/favicon.ico`, `/favicon.svg`, `/site.webmanifest` served at root, bypass auth\r\n- **Unscoped in MV** — materialized view now includes empty/NULL scope_ids directly\r\n\r\n## 2.9.0 (2026-07-13)\r\n\r\n### Added\r\n- **Unscoped galaxy tenant** — memories without scope_id now show as 📂 Unscoped tenant\r\n- **Fire-and-forget update** — dashboard update no longer hangs (response completes before container restart)\r\n- **Shared Brain documentation** — README + SKILL.md document Hermes+OpenClaw shared memory\r\n- **OPENCLAW_SCOPE_PREFIX** — env var for separate OpenClaw scope tagging\r\n- **Pre-rebuild backup + docker prune** — start scripts now run backup + cleanup before rebuild\r\n\r\n### Fixed\r\n- **Galaxy unscoped display on Linux** — all 3800+ memories now visible as planets\r\n- **Galaxy tags column** — query now uses subquery from tags table (was crashing silently)\r\n\r\n## 2.7.0 (2026-07-13)\r\n\r\n### Added\r\n- **Memory Galaxy real content** — hover shows actual stored text, importance, tags, date\r\n- **Memory Galaxy all nodes** — up to 40 planets per scope, enriched with real data\r\n- **Playwright dashboard test** — CI verifies dashboard renders without errors\r\n- **BOM-safe .env writing** — setup.ps1 no longer writes UTF-8 BOM\r\n\r\n### Fixed\r\n- **Galaxy query timeout** — uses PK index (`id > MAX(id)-250`) instead of `ORDER BY created_at`\r\n- **Non-existent `tags` column** — galaxy items query now uses subquery from `tags` table\r\n- **Dashboard raw CSS** — fixed broken `</style>` tag that rendered CSS as text\r\n- **`API_URL` warning** — silenced with empty default in docker-compose\r\n- **PgBouncer `:latest` pin** — pinned by SHA256 digest (no version tags available)\r\n\r\n### Changed\r\n- **Type hints** added to auth, db, update, embedding_queue, scoring modules\r\n- **Shared route helpers** extracted to `routes/_shared.py`\r\n- **Docker builds** — `.dockerignore` reduces image size by ~237MB\r\n\r\n## 2.5.1 (2026-07-13)\r\n\r\n### Added\r\n- **Multi-Replica API** — Redis + Caddy load balancer, 2 API instances (api1/api2)\r\n- **PgBouncer custom Dockerfile** — edoburu/pgbouncer with password via build arg, port 5432\r\n- **Materialized Views** — `pages_stats_mv` + `pages_scope_stats_mv` for dashboard (ms instead of COUNT*)\r\n- **PITR Backup** — WAL archiving (wal_level=replica, archive_mode=on, pgwal volume)\r\n- **Async Embedding Queue** — capture returns instantly, batch worker processes in background\r\n- **HNSW Index Tuning** — m=16→32, ef_construction=400, ef_search×2 for 2M vectors\r\n- **k6 Load Testing** — `tests/loadtest.js` (200 concurrent users, health/search/capture)\r\n\r\n### Changed\r\n- **Container naming** — `gbrain-*` → `hc-sidecar-*` (consistent with repo name)\r\n- **API port** — internal 8100, Caddy on 8010 external\r\n- **Dashboard** — COUNT(*) queries replaced by materialized views\r\n- **Optimizer** — refreshes MV + auto-tier + dedup every cycle\r\n- **macOS Setup** — Colima as primary Docker fallback\r\n\r\n## 2.5.0 (2026-07-13)\r\n\r\n## 2.4.0 (2026-07-13)\r\n\r\n### Added\r\n- **Data-loss prevention** — pgvector pinned to `pgvector/pgvector:0.8.0-pg17` (nicht `:latest`), verhindert DB Volume Re-Init bei Auto-Updates\r\n- **Auto-Recovery** — bei `pages < 100` wird Hermes state.db automatisch im Hintergrund importiert\r\n- **DB Backup** — `migrations/backup_db.sh`: täglicher pg_dump mit 14 Tagen Retention\r\n- **15 Data-Loss Tests** — statische Analyse: pgvector-Pin, keine DROP TABLE pages, EMBEDDING_DIM portability, Recovery-Block in main.py\r\n- **CI Gated Pipeline** — 3 Jobs (lint→test→docker) ohne `continue-on-error`, Integration-Tests mit Docker Healthcheck\r\n- **Branch Protection** — main erfordert PR + 1 Review + CI-Checks\r\n- **Pre-push Hook** — `.githooks/pre-push` läuft vor jedem Push auf main\r\n\r\n### Fixed\r\n- **EMBEDDING_DIM** portabel gemacht (`${EMBEDDING_DIM}` statt hardcodiertem 1536 → funktioniert wieder mit Ollama)\r\n- **PGUSER/PGDATA** gesetzt → verhindert PostgreSQL Re-Init bei Container-Restart\r\n- **ALLOW_EMBEDDING_SCHEMA_RESET** nur auf embeddings-Tabelle (nicht pages)\r\n\r\n## 2.3.0 (2026-07-12)\r\n\r\n### Added\r\n- **Bi-temporal endpoints** — `/why/{id}` shows supersession chain + version history; `/timeline` shows all memory changes over time\r\n- **Memory Galaxy v3** — search bar, memory type dropdown, confidence filter in the Galaxy overlay with real-time node filtering\r\n- **MCP auto-discovery** — `mcp.json` manifest for Claude Desktop, VS Code, Cursor; 20 MCP tools total\r\n- **GitHub Actions CI** — 3-job pipeline: lint (syntax+flake8+mypy), test (pytest+coverage), docker build\r\n- **Expanded MCP tools** — `why_memory`, `bi_timeline` MCP tools for bi-temporal queries\r\n\r\n### Changed\r\n- AGENTS.md updated to v0.2.0 spec (32 lines, compact API table)\r\n- llms.txt updated with all new features\r\n- GitHub topics: +fastapi, +docker, +knowledge-graph, +ollama, +chat-memory, +semantic-search (19 total)\r\n\r\n## 2.2.0 (2026-07-12)\r\n\r\n### Added\r\n- **DB backup prevention** — `content_hash` column for idempotent re-imports\r\n- **Migration recovery** — `migrations/import_from_hermes_db.py` restores from Hermes state.db\r\n- **content_hash** — SHA-256 per memory, auto-set on capture, index for fast dedup\r\n- **Migration SQL** — `001_migrate_old_memories.sql` with full schema + indexes\r\n\r\n### Changed\r\n- Schema: `content_hash TEXT` + `idx_pages_content_hash` created on every API start\r\n- Memory loss on DB reset is recoverable: run migration script, re-imports idempotently\r\n\r\n## 2.1.0 (2026-07-12)\r\n\r\n### Added\r\n- **Ebbinghaus forgetting-curve decay** — `R=e^(-t/S)`, stability grows per spacing effect\r\n- **Deterministic Conflict Resolver** — ADD/NOOP/INVALIDATE via token Jaccard + embedding cosine\r\n- **Bi-temporal validity** — `valid_to`/`superseded_by`, superseded facts keep history\r\n- **Interaction-aware reinforcement** — capture=1.0, retrieve=0.15, nudge=0.10\r\n- **7-term hybrid score** — vector + lexical + retention + importance + recency + frequency - staleness\r\n- **10K-scale PG tuning** — shared_buffers=1GB, work_mem=64MB, random_page_cost=1.1\r\n- **Dynamic HNSW ef_search** — per query type (hybrid=80, vector=40, high_recall=400)\r\n- **Dashboard keyset pagination** — cursor-based statt OFFSET\r\n- **`/ask` Q&A endpoint** — natural language → vector + GraphRAG → LLM synthesis\r\n- **`/export` endpoint** — JSON/Markdown backup with graph entities\r\n\r\n### Changed\r\n- Optimizer: Ebbinghaus decay archive at retention<0.05 statt flat confidence*0.995\r\n- Search: SQL CTE hybrid score (kein Python merge/sort), 7-term weights\r\n- Capture pipeline: Conflict Resolver ersetzt simple find_similar_page\r\n\r\n## 1.6.0 (2026-07-11)\r\n\r\n### Added\r\n- **Dashboard UI integrations** — Tier badges (Hot/Warm/Cold), memory type filter, days back filter, Knowledge Graph link, Nudge link\r\n- **Interactive buttons** — 👍/👎 feedback on each memory, ✏️ inline editor modal, 🔗 merge with checkboxes\r\n- **Merge, Editor, Feedback, Nudge** — all new backend features now accessible from the Dashboard UI\r\n\r\n## 2.0.0 (2026-07-11)\r\n\r\n### Added\r\n- **Knowledge Graph** — entities + relationships + entity_mentions tables, rule-based entity extraction, depth-traversal graph queries (`/graph/*` endpoints)\r\n- **Memory Tiers** — Hot/Warm/Standard/Cold auto-assignment based on importance, recency, confidence\r\n- **Memory Versioning** — `memory_versions` table tracks every change with reason\r\n- **Memory Compression** — intelligent multi-line compression (keep first 40%, last 20%, compress middle)\r\n- **Memory Consolidation** — embedding-similarity clustering groups related memories into summarized parents\r\n- **Memory Merge** — `/memory/merge` endpoint merges multiple memories, reparents sources\r\n- **Memory Editor** — `/memory/update/{id}` inline content + type editing\r\n- **Memory Feedback** — `/feedback/{id}?helpful=true/false` adjusts importance + confidence\r\n- **Memory Nudge** — `/nudge` returns top important recent facts (inspired by Hermes Built-In nudges)\r\n- **Temporal Search** — `?days_back=N` filter on `GET /search`\r\n- **Self-wiring Graph** — 15 relation patterns (built/leads/part_of/implements/located_at/communicates/preceded_by + original 6)\r\n- **pgvector HNSW Index** — automatic HNSW index creation (falls back to IVFFlat)\r\n- **Auto-Sync Daemon** — background thread imports new Hermes sessions every 5 minutes\r\n\r\n### Changed\r\n- Capture pipeline now extracts entities + relationships + compressed version on every `POST /capture`\r\n- Optimizer loop runs tier assignment + consolidation every cycle\r\n- Dashboard auto-refresh uses JS setTimeout (galaxy stays open)\r\n- README comparison table expanded to 6 systems (Cognee, LangMem, Supermemory, gBrain, Mem0)\r\n\r\n## 1.5.0 (2026-07-11)\r\n\r\n### Added\r\n- CONTRIBUTING.md with PR review structure, linting, commit conventions, merge strategy\r\n- PR template (.github/PULL_REQUEST_TEMPLATE.md)\r\n- \"Contributions Welcome\" section in README and SKILL.md\r\n\r\n## 1.4.4 (2026-07-11)\r\n\r\n### Added\r\n- Document auto-import step in One-Click Install table\r\n\r\n## 1.4.3 (2026-07-11)\r\n\r\n### Added\r\n- Subtle CTA at end of README and SKILL.md\r\n\r\n## 1.4.2 (2026-07-11)\r\n\r\n### Added\r\n- Auto-Capture Cron section in SKILL.md (3 cron jobs for auto-install)\r\n\r\n## 1.4.1 (2026-07-11)\r\n\r\n### Added\r\n- One-Click Install section in SKILL.md\r\n\r\n## 1.4.0 (2026-07-11)\r\n\r\n### Added\r\n- Memory Galaxy Dashboard — interactive full-screen Canvas visualization\r\n\r\n## 1.3.1 (2026-07-11)\r\n\r\n_ClawHub auto-publish_\r\n\r\n## 1.1.0 (2026-07-11)\r\n- `secrets.yaml` — documented required environment secrets\r\n- `scripts/install.ps1` — install verification script (checks Python, deps, Sidecar)\r\n- `scripts/update.ps1` — update check script (compares with ClawHub)\r\n- `scripts/smoke_test.ps1` — comprehensive integration tests (8 test cases)\r\n- `README.md` — professional documentation with install steps and examples\r\n- `CHANGELOG.md` — version history\r\n\r\n### Changed\r\n- `scripts/memory.py` — major optimization:\r\n  - Structured `SidecarError` class with status/detail\r\n  - Timeout handling (15s) with ConnectionError fallback\r\n  - `ValueError` for empty text validation\r\n  - Config resolution extracted to `_resolve_config()` for testability\r\n  - `_show_result()` helper for clean output formatting\r\n  - Logger integration (debug mode)\r\n  - Input bounds clamping (`limit` capped 1–100)\r\n  - Type annotations throughout\r\n- `SKILL.md` — restructured with privacy disclosure and clearer sections\r\n\r\n### Fixed\r\n- All search results now return flat content strings (no raw JSON)\r\n- Empty captures properly rejected before API call\r\n- Connection errors handled gracefully instead of stack traces\r\n\r\n## 1.0.1 (2026-07-11)\r\n\r\n### Added\r\n- `skill-card.md` — ClawHub marketplace card\r\n- Privacy & consent disclosure in `SKILL.md`\r\n\r\n### Fixed\r\n- Security scan: privacy disclosure added to address SkillSpector findings\r\n\r\n## 1.0.0 (2026-07-11)\r\n\r\n### Added\r\n- Initial publish to ClawHub\r\n- `SKILL.md` with auto-capture/search/autosave instructions\r\n- `scripts/memory.py` CLI tool\n\nFile v3.0.2:skill-card.md\n\n## Description:\n\nProvides persistent local memory for Hermes, OpenClaw, and other agents, including automatic capture, cross-session retrieval, governance rules, maintenance jobs, dashboard review, and pgvector search.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sunme1977](https://clawhub.ai/user/sunme1977)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and agent users use this skill to let an agent capture important facts, preferences, decisions, and project context across sessions while keeping retrieval and review tied to a local Sidecar deployment. It is intended for self-hosted agent memory workflows that need semantic search, backup commands, maintenance jobs, and governance-aware behavior rules.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Silent cross-session memory capture can retain identity, preferences, project details, infrastructure settings, and session content longer than expected.\n\nMitigation: Review retained memories regularly, delete entries that should not persist, and treat the local memory database as sensitive data.\n\nRisk: Automatic background jobs can continue capturing or processing memory after installation.\n\nMitigation: Disable or delete any cron jobs that are not needed, especially reminder or maintenance jobs that retain or summarize user data.\n\nRisk: The skill depends on local Sidecar connectivity and API-key based access.\n\nMitigation: Confirm the Sidecar URL remains local and use a dedicated low-privilege API key.\n\nRisk: Remote setup scripts and global governance hooks can affect agent behavior and local tooling.\n\nMitigation: Review the remote project and setup scripts before installation, and scan the skill before deployment.\n\n## Reference(s):\n\n- [Enforce Governance Architecture](references/enforce-architecture.md)\n- [ClawHub release page](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n- [GitHub project link from artifact](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown instructions with inline shell commands, configuration snippets, and agent behavior guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces memory capture, search, backup, setup, and governance guidance for an agent; no structured multi-dimensional output.]\n\n## Skill Version(s):\n\n3.0.2 (source: server release metadata; artifact frontmatter and changelog show 3.0.0)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v3.0.2:permissions.yaml\n\n# permissions.yaml\n# Declared permissions for hermesclawzero-auto-memory skill.\n# These are the MINIMUM required permissions — no unnecessary access.\n\nversion: 1\n\npermissions:\n  # Network access to the local HermesClawZero Sidecar API\n  - id: sidecar-http\n    description: \"HTTP access to the local Sidecar API (default http://localhost:8010)\"\n    type: network\n    allowed_hosts:\n      - \"localhost\"\n      - \"127.0.0.1\"\n    allowed_ports:\n      - 8010\n    protocols:\n      - http\n    justification: \"Required to capture/search/autosave memories via Sidecar API\"\n\n  # Filesystem access to .env config\n  - id: env-read\n    description: \"Read .env files for API_KEY and MEM_PUBLIC_URL configuration\"\n    type: filesystem\n    access: read\n    paths:\n      - \".env\"\n    justification: \"Required to load API credentials from project or script directory\"\n\n  # Background cron jobs (user must explicitly opt in)\n  - id: cron-gardener\n    description: \"Nightly memory tagging job (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 3 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\gardener.py\"\n    justification: \"Optional DB maintenance — tags unlabeled memories\"\n\n  - id: cron-reminder\n    description: \"Daily memory highlight push (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 9 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\daily_reminder.py\"\n    justification: \"Optional daily summary — pushes reminders via Telegram\"\n\nFile v3.0.2:secrets.yaml\n\n# secrets.yaml\n# Environment secrets required by hermesclawzero-auto-memory.\n\nversion: 1\n\nsecrets:\n  - name: API_KEY\n    description: \"API key for HermesClawZero Sidecar authentication.\"\n    required: true\n    source: env\n    env_var: API_KEY\n    sensitive: true\n\n  - name: MEM_PUBLIC_URL\n    description: \"Base URL of the HermesClawZero Sidecar API.\"\n    required: false\n    source: env\n    env_var: MEM_PUBLIC_URL\n    default: \"http://localhost:8010\"\n    sensitive: false\n\nArchive v3.0.1: 15 files, 27737 bytes\n\nFiles: CHANGELOG.md (12012b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), references/enforce-architecture.md (1472b), scripts/enforce_loader.py (5202b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/policy_plugin.py (8885b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2571b), SKILL.md (11230b), _meta.json (145b)\n\nFile v3.0.1:SKILL.md\n\n---\r\nname: \"hermesclawzero-auto-memory\"\r\ndescription: \"Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimization, multi-tenant dashboard with pgvector search.\"\r\nversion: \"3.0.0\"\r\ntags:\r\n  - memory\r\n  - hermes\r\n  - auto-capture\r\n  - governance\r\nenforce:\r\n  - id: foundation-rule\r\n    priority: critical\r\n    rule: \"Agent MUSS alle enforce-Regeln befolgen; sie stehen über Memory.\"\r\n    policy:\r\n      tool: \"*\"\r\n      pattern: \"*\"\r\n      action: allow\r\n      reason: \"Foundation rule — enables all other policies.\"\r\n  - id: deny-destructive-git-docker\r\n    priority: critical\r\n    rule: \"Terminal: git push, merge, reset, destructive rm, and Docker prune/rm are blocked.\"\r\n    policy:\r\n      tool: terminal\r\n      pattern: \"git push*|git merge*|git reset*|rm -*|docker system prune*|docker volume rm*|docker image rm*\"\r\n      action: deny\r\n      reason: \"Destructive git/Docker operations require explicit user approval.\"\r\n  - id: prompt-file-changes\r\n    priority: high\r\n    rule: \"Vor jeder Dateiänderung, Commit oder destruktiven Aktion Bestätigung einholen.\"\r\n    policy:\r\n      tool: terminal|file\r\n      pattern: \"git commit*|git push*|rm *|mv *|cp *|chmod*|chown*\"\r\n      action: prompt\r\n      reason: \"Ask user before modifying files or git state.\"\r\n  - id: persist-corrections\r\n    priority: high\r\n    rule: \"User-Korrekturen sofort als Memory speichern.\"\r\n    policy:\r\n      tool: memory\r\n      pattern: \"correction|wrong|fix|error\"\r\n      action: always\r\n      reason: \"User feedback must be persisted immediately.\"\r\ncategories:\r\n  - agents\r\n  - knowledge\r\ntopics:\r\n  - Memory\r\n  - Vector Search\r\n  - Chat Persistence\r\n  - pgvector\r\n  - Embeddings\r\n---\r\n\r\n# HermesClawZero Auto Memory\r\n\r\nAutomatically captures conversation context to HermesClawZero DB so the agent remembers across sessions. Loads relevant memories on fresh chats and supports scheduled DB maintenance.\r\n\r\n> 🌌 **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.\r\n\r\n> ⚡ **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.\r\n\r\n> **🧠 Shared Brain**\r\n\r\n## 🤖 One‑Click Install\r\n\r\nPaste this into **Hermes**, **OpenClaw**, or any AI agent:\r\n\r\n```text\r\nInstall this project from GitHub:\r\nhttps://github.com/SunMe1977/HermesClawZero-ConfigSidecar\r\n```\r\n\r\n**⬆️ The agent clones, configures, and starts everything.**  \r\nAfter ~30s open → [`http://localhost:8010/dashboard`](http://localhost:8010/dashboard)\r\n\r\n> **🧠 Shared Brain** — Hermes and OpenClaw share the same memory store simultaneously.\r\n>\r\n> **v3.0.0 führt enforce-Regeln ein. Alte Memory-Regeln entfernt. Enforce ist jetzt die verbindliche Governance-Schicht.**\r\n>\r\n> Both agents' memories appear side by side in the Dashboard with platform icons\r\n> (⚡ Hermes, 🐙 OpenClaw). Each sees only its own scope by default, the \"All scopes\"\r\n> view gives you the complete shared brain. No extra setup needed.\r\n\r\n> 📄 See [`install_via_agent.md`](install_via_agent.md) for the detailed agent instructions.\r\n| Step | What happens |\r\n|------|-------------|\r\n| 1 | Repo cloned + `.env` configured |\r\n| 2 | Docker Compose starts PostgreSQL (pgvector) + Ollama + API |\r\n| 3 | Dashboard live on `:8010` |\r\n| 4 | Memory skill activated in Hermes |\r\n| 5 | **Auto-import:** All existing Hermes sessions + messages are migrated into the Sidecar DB on first API startup |\r\n| 6 | Auto-capture begins on next conversation |\r\n\r\n### Core capabilities\r\n\r\n| Area | What it does |\r\n|------|-------------|\r\n| **Persistent long-term memory** | SQLite chat data is synced to PostgreSQL with vector embeddings |\r\n| **Multi-tenant** | Hermes, OpenClaw and other agents share the same DB, isolated by scope |\r\n| **Automated capture** | New conversations are captured and embedded automatically |\r\n| **Memory optimization** | Built-in tiering (hot/warm/cold), decay, archiving, consolidation |\r\n| **Configurable governance** | Enforceable skill rules (`scripts/enforce_loader.py` / `scripts/policy_plugin.py`) so agents follow critical instructions |\r\n| **Dashboard & visualization** | Memory Galaxy, health monitoring, search, manual review, click-to-edit |\r\n| **Vector search** | pgvector-powered semantic search across all memories |\r\n| **Modular architecture** | FastAPI + Docker Compose, designed for self-hosted deployment |\r\n\r\n### Manual start (if you don't have an agent):\r\n```bash\r\ngit clone https://github.com/SunMe1977/HermesClawZero-ConfigSidecar.git\r\ncd HermesClawZero-ConfigSidecar\r\nsetup.bat          # Windows   (or: ./setup.sh on Linux)\r\nstart.bat          # Windows   (or: ./start.sh on Linux)\r\n```\r\n\r\n---\r\n\r\n## ⚠️ Privacy & Consent\r\n\r\nBy activating this skill you consent to automatic memory capture.\r\n\r\n- **Data stays local** — all processing runs via the Sidecar API on your machine; no third-party data sharing  \r\n- **Captures structured facts** — the agent summaries and stores key information, not raw chat logs\r\n- **Cron jobs** (nightly gardener, daily reminder) are only created when you explicitly ask to set them up\r\n\r\n## Script Path\r\n\r\n```bash\r\n# The CLI lives alongside the sidecar, NOT in the skill directory:\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py <command> \"<text>\"\r\n```\r\n\r\nConfig is read from `.env` or env vars (`MEM_PUBLIC_URL`, `API_KEY`) automatically.\r\n\r\n---\r\n\r\n## 🔄 Auto-Capture Cron (Setup on Install)\r\n\r\nWhen a user runs the one-click install (or says \"install this skill\"), **set up these cron jobs automatically:**\r\n\r\n### A. Session Memory Capture — every 30m\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-auto-capture\" \\\r\n  --schedule \"30m\" \\\r\n  --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.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n### B. Nightly Memory Gardener (auto-tagging)\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-memory-gardener\" \\\r\n  --schedule \"0 3 * * *\" \\\r\n  --prompt \"Run python memory.py gardener to auto-tag uncategorized memories. Report only errors.\" \\\r\n  --script \"C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py\" \\\r\n  --no-agent true\r\n```\r\n\r\n### C. Daily Reminder (opt-in, ask first)\r\nOnly if user says yes:\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-daily-reminder\" \\\r\n  --schedule \"0 9 * * *\" \\\r\n  --prompt \"Summarize yesterday's top memories and remind user of open items.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n> All three run silently — the user won't see cron output unless something fails.\r\n\r\n---\r\n\r\n## 1. Auto-Load on Fresh Chat (Session Start)\r\n\r\n**When:** Every new session begins (you receive context that it's a fresh chat).\r\n\r\n**What to do:**\r\n1. Silently run: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"user profile preferences current project state\" 5`\r\n2. Absorb the returned context internally.\r\n3. **Do not** output raw JSON or mention the search to the user unless they explicitly ask.\r\n\r\n---\r\n\r\n## 2. Auto-Capture — Deterministic Triggers\r\n\r\n**When to capture** (run `memory.py capture \"...\"` immediately):\r\n\r\n| Trigger | Example | What to capture |\r\n|---|---|---|\r\n| **New fact stated** | \"I live in Berlin\" | `\"User lives in Berlin\"` |\r\n| **Preference revealed** | \"I prefer dark mode\" | `\"User prefers dark mode in all UIs\"` |\r\n| **Instruction given** | \"Call me Hans\" | `\"User's name is Hans, goes by Hans\"` |\r\n| **Project detail shared** | \"Working on DiskRaptor v0.3\" | `\"Current project: DiskRaptor v0.3, focus on UI tests\"` |\r\n| **Decision made** | \"Let's go with PostgreSQL\" | `\"Chose PostgreSQL for the data layer\"` |\r\n| **Error/blocker mentioned** | \"The build fails on Windows\" | `\"DiskRaptor: build fails on Windows, needs investigation\"` |\r\n| **Tool/config change** | \"I set up Ollama on port 11435\" | `\"Ollama configured on port 11435\"` |\r\n| **User corrects you** | \"No, the port is 8080 not 3000\" | `\"Corrected: server runs on port 8080\"` |\r\n\r\n**How to capture:**\r\n```bash\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<concise summary of the fact>\"\r\n# Optional: pass a scope_id for logical grouping\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<fact>\" \"project_name\"\r\n```\r\n\r\n**Do NOT capture when:**\r\n- User is just making small talk (\"hello\", \"thanks\", \"ok\")\r\n- User is asking a question (capture the *answer/fact*, not the question)\r\n- User is giving multi-turn instructions that aren't final yet (wait for resolution)\r\n- The information is already captured (avoid duplicates)\r\n- The information is temporary/throwaway (\"let me try something real quick\")\r\n\r\n**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.\r\n\r\n---\r\n\r\n## 3. Full Chat History Sync (On Request)\r\n\r\n**When:** User explicitly asks to back up the session (\"save this chat\", \"backup session\").\r\n\r\n**What to do:**\r\n1. Use `sessions_history` to get the current visible session.\r\n2. Format messages into a text summary.\r\n3. Execute: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"<formatted_chat_history>\" \"chat_backup.md\"`\r\n\r\n---\r\n\r\n## 4. Automated Database Maintenance (Cron Jobs)\r\n\r\n**When:** User asks to \"setup memory background jobs\" or \"enable memory maintenance\".\r\n\r\nCreate these cron jobs:\r\n\r\n**A. Nightly Memory Gardener (Auto-tagging):**\r\n- Name: `hermes-memory-gardener`\r\n- Expression: `0 3 * * *` (daily 3:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py`\r\n\r\n**B. Daily Memory Highlight (Telegram Push):**\r\n- Name: `hermes-daily-reminder`\r\n- Expression: `0 9 * * *` (daily 9:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\daily_reminder.py`\r\n\r\nCurrent cron jobs already exist for both (checked during setup).\r\n\r\n---\r\n\r\n## Quick Reference\r\n\r\n```bash\r\n# Load context (session start, silent):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py search \"user profile preferences current project state\" 5\r\n\r\n# Save a fact (deterministic triggers above):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py capture \"<fact>\" [scope_id]\r\n\r\n# Backup session (on request):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py autosave \"<text>\" [filename]\r\n```\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n  <em>\r\n    If you enjoy this skill, consider sharing your experience —\r\n    a short video review, a tweet, or a TikTok post helps others discover it.\r\n  </em>\r\n</p>\r\n\r\n---\r\n\r\n## 🙌 Contributions Welcome\r\n\r\nContributions of all kinds are welcome —  \r\nfeel free to open [PRs](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/pulls) or [issues](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/issues).\r\n\r\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md) for code style, commit conventions, and PR workflow.\n\nFile v3.0.1:README.md\n\n# HermesClawZero Auto Memory\n\n[![ClawHub](https://img.shields.io/badge/ClawHub-hermesclawzero--auto--memory-blue)](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\n**Your agent remembers across conversations.** Facts, preferences, project context, past decisions — the agent captures them automatically and loads relevant context on every new session.\n\nAll processing runs **locally** via HermesClawZero Sidecar (PostgreSQL + pgvector + Ollama for embeddings). No data leaves your machine.\n\n---\n\n## Features\n\n| Capability | What it means for you |\n|---|---|\n| **Auto-Capture** | Agent saves new facts, preferences, and project details *as you talk* — no manual saving needed |\n| **Auto-Load** | On fresh chats, the agent searches past memories and picks up where you left off |\n| **Semantic Search** | Finds memories by meaning, not just keywords (hybrid vector + lexical) |\n| **Chat Backup** | Say \"save this session\" and get a full searchable snapshot |\n| **DB Maintenance** | Optional nightly tagging + daily reminders (cron, opt-in) |\n\n---\n\n## Quickstart (3 minutes)\n\n### 1. Install\n\n```bash\nopenclaw skills install hermesclawzero-auto-memory\n```\n\n### 2. Configure\n\nThe memory.py CLI lives at `C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py`.  \nIt reads config from `.env` or environment variables.\n\nCreate or edit your `.env` with:\n\n```bash\nMEM_PUBLIC_URL=http://localhost:8010\nAPI_KEY=your_api_key_here\n```\n\n> 💡 `MEM_PUBLIC_URL` points to the HermesClawZero Sidecar API. Default is `http://localhost:8010`.\n> `API_KEY` must match the `API_KEY` in your Sidecar's `.env`.\n\n### 3. Verify connectivity\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"hello world\" 3\n```\n\nIf the Sidecar is running, you'll see matching memories (or no output if the DB is empty — that's fine).\n\n### 4. Done! The skill is active.\n\nNow when you talk to the agent, it will:\n- **Silently load** context from past memories on fresh sessions\n- **Automatically capture** new facts, preferences, and project details\n- **Respond without re-introducing** who you are or what you're working on\n\n---\n\n## Example Workflow\n\n```\n── Session 1 ──\nYou: \"Hey, I'm Hans. I work on DiskRaptor v0.3, mostly UI tests.\"\nAgent: *silently captures: \"User's name is Hans\", \"Working on DiskRaptor v0.3\", \"Focus: UI tests\"*\nAgent: \"Hi Hans! What would you like to do with DiskRaptor today?\"\n\nYou: \"I prefer dark mode in all my tools.\"\nAgent: *silently captures: \"User prefers dark mode in all UIs\"*\n\nSome time passes. A new session starts.\n\n── Session 2 (fresh chat) ──\nAgent: *silently loads past memories*\nAgent: \"Welcome back, Hans! Last time you were working on DiskRaptor v0.3 UI tests.\n       Shall we pick that up, or is there something new?\"\n```\n\n## Deterministic Capture Triggers\n\nThe agent captures when you share:\n\n| Trigger | Example | Gets captured |\n|---|---|---|\n| **Name / identity** | \"Call me Hans\" | `\"User's name is Hans\"` |\n| **Preference** | \"I hate notifications\" | `\"User prefers notifications off\"` |\n| **Project detail** | \"The API is on port 8080\" | `\"API runs on port 8080\"` |\n| **Decision** | \"Let's use SQLite\" | `\"Chose SQLite for storage\"` |\n| **Correction** | \"No, the branch is 'main'\" | `\"Default branch: main\"` |\n| **Blocker/error** | \"The build fails\" | `\"Build fails on Windows, needs fix\"` |\n\nThe agent does **not** capture: small talk (\"thanks\", \"ok\"), raw questions, or temporary/throwaway info.\n\n---\n\n## Usage (manual commands)\n\n```bash\n# Capture a fact\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"User prefers dark mode\" ui_preferences\n\n# Search memories\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"project preferences\" 5\n\n# Backup session history\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"$(cat backup.md)\" \"session_backup.md\"\n```\n\n---\n\n## Troubleshooting\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| `memory.py search` returns nothing but DB has data | API_KEY mismatch | Check `.env` API_KEY matches Sidecar's |\n| `ConnectionError` on any command | Sidecar not running | `docker compose up -d` in the Sidecar directory |\n| `HTTP 500` on capture | Ollama not running or misconfigured | `ollama pull nomic-embed-text` and check `/healthz` |\n| Agent doesn't seem to capture anything | Fresh install — no .env configured | Check `MEM_PUBLIC_URL` and `API_KEY` in `.env` |\n| Agent captures duplicates | No dedup check in SKILL.md triggers | Update if you see repeated captures of the same fact |\n| Cron jobs not working | User didn't opt in | Ask to run: \"setup memory background jobs\" |\n\n### Debug mode\n\nRun with verbose logging to see what the CLI is doing:\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"test\" 1\n```\n\nIf you see nothing, check:\n1. Is the Sidecar accessible? → `curl http://localhost:8010/healthz`\n2. Is the API key correct? → Check the exact `.env` content\n3. Is Ollama running? → `curl http://localhost:11434/api/tags`\n\n---\n\n## Skill Structure\n\n```\nhermesclawzero-auto-memory/\n├── SKILL.md              # Agent instructions (deterministic triggers)\n├── skill-card.md         # ClawHub marketplace card\n├── permissions.yaml      # Declared permissions\n├── secrets.yaml          # Declared secrets\n├── README.md             # This file\n├── CHANGELOG.md          # Version history\n└── scripts/\n    ├── install.ps1       # Install verification\n    ├── update.ps1        # Update check\n    └── smoke_test.ps1    # Integration smoke tests\n```\n\nThe core script lives alongside the sidecar:\n```\nC:\\dev\\HermesClawZero-ConfigSidecar\\\n├── memory.py             # CLI tool (capture/search/autosave)\n├── gardener.py           # Nightly tagging\n├── daily_reminder.py     # Daily highlights\n├── .env                  # API config\n└── ...\n```\n\n---\n\n## Repository\n\nSource: [github.com/SunMe1977/HermesClawZero-ConfigSidecar](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar)  \nSkill: [ClawHub hermesclawzero-auto-memory](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\nFile v3.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn72qpcz7hn4drhmgfd6d36x6n89zr3z\",\n  \"slug\": \"hermesclawzero-auto-memory\",\n  \"version\": \"3.0.1\",\n  \"publishedAt\": 1784059145246\n}\n\nFile v3.0.1:references/enforce-architecture.md\n\n# Enforce Governance Architecture — v2 Proposal\n\n## Current Architecture\n\n```\nSystem Prompt\n↓\nEnforce Rules\n↓\nLong-Term Memory\n↓\nConversation\n↓\nUser\n```\n\n## Proposed Two-Layer Architecture\n\n### Layer 1 – Prompt Governance (existing)\nParse `enforce:` from SKILL.md → inject rules above memory → preserve priority ordering.\n\n### Layer 2 – Runtime Policy Engine (new)\nValidates every dangerous action before execution:\n\n```\nLLM\n↓\nAction Proposal\n↓\nPolicy Engine\n↓\nAllowed?\n  ├─ Yes → Execute\n  └─ No  → BLOCKED + reason\n```\n\n### Structured Policies replace free-text rules\n\n```yaml\nenforce:\n  - priority: critical\n    rule: \"Never push directly to main.\"\n    policy:\n      tool: terminal\n      pattern: \"git push origin main\"\n      action: deny\n      reason: \"Direct pushes to main are not allowed.\"\n```\n\n### Policy Resolution\n`critical > high > medium` — most restrictive rule wins. `allow + deny = deny`.\n\n### Audit Log\nEvery blocked/approved action: timestamp, action, tool, rule matched, decision, reason.\n\n### Plugin Architecture\n`GitPolicy`, `FilesystemPolicy`, `DockerPolicy`, `ShellPolicy`, `DatabasePolicy`, `MCPPolicy`, `CustomSkillPolicies`.\n\n### Final Architecture\n\n```\nSystem Prompt\n↓\nEnforce Rules (Layer 1)\n↓\nLong-Term Memory\n↓\nConversation\n↓\nLLM Decision\n↓\nRuntime Policy Engine (Layer 2)\n↓\nTool Execution\n```\n\nThree independent layers: **Memory** (facts), **Governance** (behavior), **Execution** (actions).\n\nFile v3.0.1:CHANGELOG.md\n\n# Changelog\r\n\r\n## 3.0.0 (2026-07-14)\r\n\r\n### Breaking\r\n- **Enforceable Skill Rules** — Skills can now define `enforce:` rules with `priority: critical`. Rules appear as structured directives above memory in every turn. Agents must follow them.\r\n- **Loader ready** — `scripts/enforce_loader.py` parses SKILL.md frontmatter and outputs injectable YOU-MUST directives.\r\n- **Kaskadierung** — Child skills inherit enforce rules from parent skills. Loader scans all loaded skills.\r\n\r\n### Added\r\n- **scripts/enforce_loader.py** — CLI tool to extract enforce rules from any installed skill\r\n- **README enforce notice** — v3.0.0 führt enforce-Regeln ein. Alte Memory-Regeln entfernt. Enforce ist jetzt die Governance-Schicht.\r\n\r\n### Fixed\r\n- **Galaxy \"loading\" fix** — scope mapping now correctly matches unscoped items (`__unscoped__`), all items loaded (up to 20000), deadlock protection via lock_timeout\r\n- **Favicon 401** — `/favicon.ico`, `/favicon.svg`, `/site.webmanifest` served at root, bypass auth\r\n- **Unscoped in MV** — materialized view now includes empty/NULL scope_ids directly\r\n\r\n## 2.9.0 (2026-07-13)\r\n\r\n### Added\r\n- **Unscoped galaxy tenant** — memories without scope_id now show as 📂 Unscoped tenant\r\n- **Fire-and-forget update** — dashboard update no longer hangs (response completes before container restart)\r\n- **Shared Brain documentation** — README + SKILL.md document Hermes+OpenClaw shared memory\r\n- **OPENCLAW_SCOPE_PREFIX** — env var for separate OpenClaw scope tagging\r\n- **Pre-rebuild backup + docker prune** — start scripts now run backup + cleanup before rebuild\r\n\r\n### Fixed\r\n- **Galaxy unscoped display on Linux** — all 3800+ memories now visible as planets\r\n- **Galaxy tags column** — query now uses subquery from tags table (was crashing silently)\r\n\r\n## 2.7.0 (2026-07-13)\r\n\r\n### Added\r\n- **Memory Galaxy real content** — hover shows actual stored text, importance, tags, date\r\n- **Memory Galaxy all nodes** — up to 40 planets per scope, enriched with real data\r\n- **Playwright dashboard test** — CI verifies dashboard renders without errors\r\n- **BOM-safe .env writing** — setup.ps1 no longer writes UTF-8 BOM\r\n\r\n### Fixed\r\n- **Galaxy query timeout** — uses PK index (`id > MAX(id)-250`) instead of `ORDER BY created_at`\r\n- **Non-existent `tags` column** — galaxy items query now uses subquery from `tags` table\r\n- **Dashboard raw CSS** — fixed broken `</style>` tag that rendered CSS as text\r\n- **`API_URL` warning** — silenced with empty default in docker-compose\r\n- **PgBouncer `:latest` pin** — pinned by SHA256 digest (no version tags available)\r\n\r\n### Changed\r\n- **Type hints** added to auth, db, update, embedding_queue, scoring modules\r\n- **Shared route helpers** extracted to `routes/_shared.py`\r\n- **Docker builds** — `.dockerignore` reduces image size by ~237MB\r\n\r\n## 2.5.1 (2026-07-13)\r\n\r\n### Added\r\n- **Multi-Replica API** — Redis + Caddy load balancer, 2 API instances (api1/api2)\r\n- **PgBouncer custom Dockerfile** — edoburu/pgbouncer with password via build arg, port 5432\r\n- **Materialized Views** — `pages_stats_mv` + `pages_scope_stats_mv` for dashboard (ms instead of COUNT*)\r\n- **PITR Backup** — WAL archiving (wal_level=replica, archive_mode=on, pgwal volume)\r\n- **Async Embedding Queue** — capture returns instantly, batch worker processes in background\r\n- **HNSW Index Tuning** — m=16→32, ef_construction=400, ef_search×2 for 2M vectors\r\n- **k6 Load Testing** — `tests/loadtest.js` (200 concurrent users, health/search/capture)\r\n\r\n### Changed\r\n- **Container naming** — `gbrain-*` → `hc-sidecar-*` (consistent with repo name)\r\n- **API port** — internal 8100, Caddy on 8010 external\r\n- **Dashboard** — COUNT(*) queries replaced by materialized views\r\n- **Optimizer** — refreshes MV + auto-tier + dedup every cycle\r\n- **macOS Setup** — Colima as primary Docker fallback\r\n\r\n## 2.5.0 (2026-07-13)\r\n\r\n## 2.4.0 (2026-07-13)\r\n\r\n### Added\r\n- **Data-loss prevention** — pgvector pinned to `pgvector/pgvector:0.8.0-pg17` (nicht `:latest`), verhindert DB Volume Re-Init bei Auto-Updates\r\n- **Auto-Recovery** — bei `pages < 100` wird Hermes state.db automatisch im Hintergrund importiert\r\n- **DB Backup** — `migrations/backup_db.sh`: täglicher pg_dump mit 14 Tagen Retention\r\n- **15 Data-Loss Tests** — statische Analyse: pgvector-Pin, keine DROP TABLE pages, EMBEDDING_DIM portability, Recovery-Block in main.py\r\n- **CI Gated Pipeline** — 3 Jobs (lint→test→docker) ohne `continue-on-error`, Integration-Tests mit Docker Healthcheck\r\n- **Branch Protection** — main erfordert PR + 1 Review + CI-Checks\r\n- **Pre-push Hook** — `.githooks/pre-push` läuft vor jedem Push auf main\r\n\r\n### Fixed\r\n- **EMBEDDING_DIM** portabel gemacht (`${EMBEDDING_DIM}` statt hardcodiertem 1536 → funktioniert wieder mit Ollama)\r\n- **PGUSER/PGDATA** gesetzt → verhindert PostgreSQL Re-Init bei Container-Restart\r\n- **ALLOW_EMBEDDING_SCHEMA_RESET** nur auf embeddings-Tabelle (nicht pages)\r\n\r\n## 2.3.0 (2026-07-12)\r\n\r\n### Added\r\n- **Bi-temporal endpoints** — `/why/{id}` shows supersession chain + version history; `/timeline` shows all memory changes over time\r\n- **Memory Galaxy v3** — search bar, memory type dropdown, confidence filter in the Galaxy overlay with real-time node filtering\r\n- **MCP auto-discovery** — `mcp.json` manifest for Claude Desktop, VS Code, Cursor; 20 MCP tools total\r\n- **GitHub Actions CI** — 3-job pipeline: lint (syntax+flake8+mypy), test (pytest+coverage), docker build\r\n- **Expanded MCP tools** — `why_memory`, `bi_timeline` MCP tools for bi-temporal queries\r\n\r\n### Changed\r\n- AGENTS.md updated to v0.2.0 spec (32 lines, compact API table)\r\n- llms.txt updated with all new features\r\n- GitHub topics: +fastapi, +docker, +knowledge-graph, +ollama, +chat-memory, +semantic-search (19 total)\r\n\r\n## 2.2.0 (2026-07-12)\r\n\r\n### Added\r\n- **DB backup prevention** — `content_hash` column for idempotent re-imports\r\n- **Migration recovery** — `migrations/import_from_hermes_db.py` restores from Hermes state.db\r\n- **content_hash** — SHA-256 per memory, auto-set on capture, index for fast dedup\r\n- **Migration SQL** — `001_migrate_old_memories.sql` with full schema + indexes\r\n\r\n### Changed\r\n- Schema: `content_hash TEXT` + `idx_pages_content_hash` created on every API start\r\n- Memory loss on DB reset is recoverable: run migration script, re-imports idempotently\r\n\r\n## 2.1.0 (2026-07-12)\r\n\r\n### Added\r\n- **Ebbinghaus forgetting-curve decay** — `R=e^(-t/S)`, stability grows per spacing effect\r\n- **Deterministic Conflict Resolver** — ADD/NOOP/INVALIDATE via token Jaccard + embedding cosine\r\n- **Bi-temporal validity** — `valid_to`/`superseded_by`, superseded facts keep history\r\n- **Interaction-aware reinforcement** — capture=1.0, retrieve=0.15, nudge=0.10\r\n- **7-term hybrid score** — vector + lexical + retention + importance + recency + frequency - staleness\r\n- **10K-scale PG tuning** — shared_buffers=1GB, work_mem=64MB, random_page_cost=1.1\r\n- **Dynamic HNSW ef_search** — per query type (hybrid=80, vector=40, high_recall=400)\r\n- **Dashboard keyset pagination** — cursor-based statt OFFSET\r\n- **`/ask` Q&A endpoint** — natural language → vector + GraphRAG → LLM synthesis\r\n- **`/export` endpoint** — JSON/Markdown backup with graph entities\r\n\r\n### Changed\r\n- Optimizer: Ebbinghaus decay archive at retention<0.05 statt flat confidence*0.995\r\n- Search: SQL CTE hybrid score (kein Python merge/sort), 7-term weights\r\n- Capture pipeline: Conflict Resolver ersetzt simple find_similar_page\r\n\r\n## 1.6.0 (2026-07-11)\r\n\r\n### Added\r\n- **Dashboard UI integrations** — Tier badges (Hot/Warm/Cold), memory type filter, days back filter, Knowledge Graph link, Nudge link\r\n- **Interactive buttons** — 👍/👎 feedback on each memory, ✏️ inline editor modal, 🔗 merge with checkboxes\r\n- **Merge, Editor, Feedback, Nudge** — all new backend features now accessible from the Dashboard UI\r\n\r\n## 2.0.0 (2026-07-11)\r\n\r\n### Added\r\n- **Knowledge Graph** — entities + relationships + entity_mentions tables, rule-based entity extraction, depth-traversal graph queries (`/graph/*` endpoints)\r\n- **Memory Tiers** — Hot/Warm/Standard/Cold auto-assignment based on importance, recency, confidence\r\n- **Memory Versioning** — `memory_versions` table tracks every change with reason\r\n- **Memory Compression** — intelligent multi-line compression (keep first 40%, last 20%, compress middle)\r\n- **Memory Consolidation** — embedding-similarity clustering groups related memories into summarized parents\r\n- **Memory Merge** — `/memory/merge` endpoint merges multiple memories, reparents sources\r\n- **Memory Editor** — `/memory/update/{id}` inline content + type editing\r\n- **Memory Feedback** — `/feedback/{id}?helpful=true/false` adjusts importance + confidence\r\n- **Memory Nudge** — `/nudge` returns top important recent facts (inspired by Hermes Built-In nudges)\r\n- **Temporal Search** — `?days_back=N` filter on `GET /search`\r\n- **Self-wiring Graph** — 15 relation patterns (built/leads/part_of/implements/located_at/communicates/preceded_by + original 6)\r\n- **pgvector HNSW Index** — automatic HNSW index creation (falls back to IVFFlat)\r\n- **Auto-Sync Daemon** — background thread imports new Hermes sessions every 5 minutes\r\n\r\n### Changed\r\n- Capture pipeline now extracts entities + relationships + compressed version on every `POST /capture`\r\n- Optimizer loop runs tier assignment + consolidation every cycle\r\n- Dashboard auto-refresh uses JS setTimeout (galaxy stays open)\r\n- README comparison table expanded to 6 systems (Cognee, LangMem, Supermemory, gBrain, Mem0)\r\n\r\n## 1.5.0 (2026-07-11)\r\n\r\n### Added\r\n- CONTRIBUTING.md with PR review structure, linting, commit conventions, merge strategy\r\n- PR template (.github/PULL_REQUEST_TEMPLATE.md)\r\n- \"Contributions Welcome\" section in README and SKILL.md\r\n\r\n## 1.4.4 (2026-07-11)\r\n\r\n### Added\r\n- Document auto-import step in One-Click Install table\r\n\r\n## 1.4.3 (2026-07-11)\r\n\r\n### Added\r\n- Subtle CTA at end of README and SKILL.md\r\n\r\n## 1.4.2 (2026-07-11)\r\n\r\n### Added\r\n- Auto-Capture Cron section in SKILL.md (3 cron jobs for auto-install)\r\n\r\n## 1.4.1 (2026-07-11)\r\n\r\n### Added\r\n- One-Click Install section in SKILL.md\r\n\r\n## 1.4.0 (2026-07-11)\r\n\r\n### Added\r\n- Memory Galaxy Dashboard — interactive full-screen Canvas visualization\r\n\r\n## 1.3.1 (2026-07-11)\r\n\r\n_ClawHub auto-publish_\r\n\r\n## 1.1.0 (2026-07-11)\r\n- `secrets.yaml` — documented required environment secrets\r\n- `scripts/install.ps1` — install verification script (checks Python, deps, Sidecar)\r\n- `scripts/update.ps1` — update check script (compares with ClawHub)\r\n- `scripts/smoke_test.ps1` — comprehensive integration tests (8 test cases)\r\n- `README.md` — professional documentation with install steps and examples\r\n- `CHANGELOG.md` — version history\r\n\r\n### Changed\r\n- `scripts/memory.py` — major optimization:\r\n  - Structured `SidecarError` class with status/detail\r\n  - Timeout handling (15s) with ConnectionError fallback\r\n  - `ValueError` for empty text validation\r\n  - Config resolution extracted to `_resolve_config()` for testability\r\n  - `_show_result()` helper for clean output formatting\r\n  - Logger integration (debug mode)\r\n  - Input bounds clamping (`limit` capped 1–100)\r\n  - Type annotations throughout\r\n- `SKILL.md` — restructured with privacy disclosure and clearer sections\r\n\r\n### Fixed\r\n- All search results now return flat content strings (no raw JSON)\r\n- Empty captures properly rejected before API call\r\n- Connection errors handled gracefully instead of stack traces\r\n\r\n## 1.0.1 (2026-07-11)\r\n\r\n### Added\r\n- `skill-card.md` — ClawHub marketplace card\r\n- Privacy & consent disclosure in `SKILL.md`\r\n\r\n### Fixed\r\n- Security scan: privacy disclosure added to address SkillSpector findings\r\n\r\n## 1.0.0 (2026-07-11)\r\n\r\n### Added\r\n- Initial publish to ClawHub\r\n- `SKILL.md` with auto-capture/search/autosave instructions\r\n- `scripts/memory.py` CLI tool\n\nFile v3.0.1:skill-card.md\n\n## Description: <br>\nUnified memory platform for Hermes, OpenClaw and AI agents, providing persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimization, a dashboard, and pgvector search. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[sunme1977](https://clawhub.ai/user/sunme1977) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers and agent users use this skill to let Hermes, OpenClaw, and compatible agents load, capture, search, and back up long-term conversation memory through a local Sidecar service. It also provides guidance for optional memory maintenance jobs and governance policy handling. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can persist broad conversation data without visible per-message confirmation. <br>\nMitigation: Install only when long-term memory is desired, confirm where the Sidecar stores data, and review or delete stored memories regularly. <br>\nRisk: Background jobs and governance plugins can run memory maintenance or policy checks beyond a single interactive turn. <br>\nMitigation: Keep cron jobs and governance plugins disabled unless explicitly enabled, and review their schedules, prompts, and audit behavior before use. <br>\nRisk: The local Sidecar API depends on MEM_PUBLIC_URL and API_KEY configuration. <br>\nMitigation: Point MEM_PUBLIC_URL only to a trusted local service and verify API_KEY handling before enabling capture, search, or autosave. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory) <br>\n- [Enforce Governance Architecture](artifact/references/enforce-architecture.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and local API configuration instructions] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May guide silent memory search, capture, and autosave actions through a configured local Sidecar API.] <br>\n\n## Skill Version(s): <br>\n3.0.1 (source: server release metadata; artifact frontmatter and changelog show 3.0.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v3.0.1:permissions.yaml\n\n# permissions.yaml\n# Declared permissions for hermesclawzero-auto-memory skill.\n# These are the MINIMUM required permissions — no unnecessary access.\n\nversion: 1\n\npermissions:\n  # Network access to the local HermesClawZero Sidecar API\n  - id: sidecar-http\n    description: \"HTTP access to the local Sidecar API (default http://localhost:8010)\"\n    type: network\n    allowed_hosts:\n      - \"localhost\"\n      - \"127.0.0.1\"\n    allowed_ports:\n      - 8010\n    protocols:\n      - http\n    justification: \"Required to capture/search/autosave memories via Sidecar API\"\n\n  # Filesystem access to .env config\n  - id: env-read\n    description: \"Read .env files for API_KEY and MEM_PUBLIC_URL configuration\"\n    type: filesystem\n    access: read\n    paths:\n      - \".env\"\n    justification: \"Required to load API credentials from project or script directory\"\n\n  # Background cron jobs (user must explicitly opt in)\n  - id: cron-gardener\n    description: \"Nightly memory tagging job (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 3 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\gardener.py\"\n    justification: \"Optional DB maintenance — tags unlabeled memories\"\n\n  - id: cron-reminder\n    description: \"Daily memory highlight push (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 9 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\daily_reminder.py\"\n    justification: \"Optional daily summary — pushes reminders via Telegram\"\n\nFile v3.0.1:secrets.yaml\n\n# secrets.yaml\n# Environment secrets required by hermesclawzero-auto-memory.\n\nversion: 1\n\nsecrets:\n  - name: API_KEY\n    description: \"API key for HermesClawZero Sidecar authentication.\"\n    required: true\n    source: env\n    env_var: API_KEY\n    sensitive: true\n\n  - name: MEM_PUBLIC_URL\n    description: \"Base URL of the HermesClawZero Sidecar API.\"\n    required: false\n    source: env\n    env_var: MEM_PUBLIC_URL\n    default: \"http://localhost:8010\"\n    sensitive: false\n\nArchive v3.0.0: 12 files, 21374 bytes\n\nFiles: CHANGELOG.md (11530b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2715b), SKILL.md (9761b), _meta.json (145b)\n\nFile v3.0.0:SKILL.md\n\n---\r\nname: \"hermesclawzero-auto-memory\"\r\ndescription: \"Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimization, multi-tenant dashboard with pgvector search.\"\r\nversion: \"3.0.0\"\r\ntags:\r\n  - memory\r\n  - hermes\r\n  - persistence\r\n  - vector-search\r\ncategories:\r\n  - agents\r\n  - knowledge\r\ntopics:\r\n  - Memory\r\n  - Vector Search\r\n  - Chat Persistence\r\n  - pgvector\r\n  - Embeddings\r\n---\r\n\r\n# HermesClawZero Auto Memory\r\n\r\nAutomatically captures conversation context to HermesClawZero DB so the agent remembers across sessions. Loads relevant memories on fresh chats and supports scheduled DB maintenance.\r\n\r\n> 🌌 **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.\r\n\r\n> ⚡ **New in v3.0.0: Enforceable Skill Rules** — Skills can now define enforced `priority: critical` rules that the agent **must** follow. Rules appear as structured directives above memory, making them impossible to ignore.\r\n\r\n> **🧠 Shared Brain**\r\n\r\n## 🤖 One‑Click Install\r\n\r\nPaste this into **Hermes**, **OpenClaw**, or any AI agent:\r\n\r\n```text\r\nInstall this project from GitHub:\r\nhttps://github.com/SunMe1977/HermesClawZero-ConfigSidecar\r\n```\r\n\r\n**⬆️ The agent clones, configures, and starts everything.**  \r\nAfter ~30s open → [`http://localhost:8010/dashboard`](http://localhost:8010/dashboard)\r\n\r\n> **🧠 Shared Brain** — Hermes and OpenClaw share the same memory store simultaneously.\r\n> Both agents' memories appear side by side in the Dashboard with platform icons\r\n> (⚡ Hermes, 🐙 OpenClaw). Each sees only its own scope by default, the \"All scopes\"\r\n> view gives you the complete shared brain. No extra setup needed.\r\n\r\n> 📄 See [`install_via_agent.md`](install_via_agent.md) for the detailed agent instructions.\r\n| Step | What happens |\r\n|------|-------------|\r\n| 1 | Repo cloned + `.env` configured |\r\n| 2 | Docker Compose starts PostgreSQL (pgvector) + Ollama + API |\r\n| 3 | Dashboard live on `:8010` |\r\n| 4 | Memory skill activated in Hermes |\r\n| 5 | **Auto-import:** All existing Hermes sessions + messages are migrated into the Sidecar DB on first API startup |\r\n| 6 | Auto-capture begins on next conversation |\r\n\r\n### Core capabilities\r\n\r\n| Area | What it does |\r\n|------|-------------|\r\n| **Persistent long-term memory** | SQLite chat data is synced to PostgreSQL with vector embeddings |\r\n| **Multi-tenant** | Hermes, OpenClaw and other agents share the same DB, isolated by scope |\r\n| **Automated capture** | New conversations are captured and embedded automatically |\r\n| **Memory optimization** | Built-in tiering (hot/warm/cold), decay, archiving, consolidation |\r\n| **Configurable governance** | Enforceable skill rules so agents follow critical instructions |\r\n| **Dashboard & visualization** | Memory Galaxy, health monitoring, search, manual review |\r\n| **Vector search** | pgvector-powered semantic search across all memories |\r\n| **Modular architecture** | FastAPI + Docker Compose, designed for self-hosted deployment |\r\n\r\n### Manual start (if you don't have an agent):\r\n```bash\r\ngit clone https://github.com/SunMe1977/HermesClawZero-ConfigSidecar.git\r\ncd HermesClawZero-ConfigSidecar\r\nsetup.bat          # Windows   (or: ./setup.sh on Linux)\r\nstart.bat          # Windows   (or: ./start.sh on Linux)\r\n```\r\n\r\n---\r\n\r\n## ⚠️ Privacy & Consent\r\n\r\nBy activating this skill you consent to automatic memory capture.\r\n\r\n- **Data stays local** — all processing runs via the Sidecar API on your machine; no third-party data sharing  \r\n- **Captures structured facts** — the agent summaries and stores key information, not raw chat logs\r\n- **Cron jobs** (nightly gardener, daily reminder) are only created when you explicitly ask to set them up\r\n\r\n## Script Path\r\n\r\n```bash\r\n# The CLI lives alongside the sidecar, NOT in the skill directory:\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py <command> \"<text>\"\r\n```\r\n\r\nConfig is read from `.env` or env vars (`MEM_PUBLIC_URL`, `API_KEY`) automatically.\r\n\r\n---\r\n\r\n## 🔄 Auto-Capture Cron (Setup on Install)\r\n\r\nWhen a user runs the one-click install (or says \"install this skill\"), **set up these cron jobs automatically:**\r\n\r\n### A. Session Memory Capture — every 30m\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-auto-capture\" \\\r\n  --schedule \"30m\" \\\r\n  --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.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n### B. Nightly Memory Gardener (auto-tagging)\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-memory-gardener\" \\\r\n  --schedule \"0 3 * * *\" \\\r\n  --prompt \"Run python memory.py gardener to auto-tag uncategorized memories. Report only errors.\" \\\r\n  --script \"C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py\" \\\r\n  --no-agent true\r\n```\r\n\r\n### C. Daily Reminder (opt-in, ask first)\r\nOnly if user says yes:\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-daily-reminder\" \\\r\n  --schedule \"0 9 * * *\" \\\r\n  --prompt \"Summarize yesterday's top memories and remind user of open items.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n> All three run silently — the user won't see cron output unless something fails.\r\n\r\n---\r\n\r\n## 1. Auto-Load on Fresh Chat (Session Start)\r\n\r\n**When:** Every new session begins (you receive context that it's a fresh chat).\r\n\r\n**What to do:**\r\n1. Silently run: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"user profile preferences current project state\" 5`\r\n2. Absorb the returned context internally.\r\n3. **Do not** output raw JSON or mention the search to the user unless they explicitly ask.\r\n\r\n---\r\n\r\n## 2. Auto-Capture — Deterministic Triggers\r\n\r\n**When to capture** (run `memory.py capture \"...\"` immediately):\r\n\r\n| Trigger | Example | What to capture |\r\n|---|---|---|\r\n| **New fact stated** | \"I live in Berlin\" | `\"User lives in Berlin\"` |\r\n| **Preference revealed** | \"I prefer dark mode\" | `\"User prefers dark mode in all UIs\"` |\r\n| **Instruction given** | \"Call me Hans\" | `\"User's name is Hans, goes by Hans\"` |\r\n| **Project detail shared** | \"Working on DiskRaptor v0.3\" | `\"Current project: DiskRaptor v0.3, focus on UI tests\"` |\r\n| **Decision made** | \"Let's go with PostgreSQL\" | `\"Chose PostgreSQL for the data layer\"` |\r\n| **Error/blocker mentioned** | \"The build fails on Windows\" | `\"DiskRaptor: build fails on Windows, needs investigation\"` |\r\n| **Tool/config change** | \"I set up Ollama on port 11435\" | `\"Ollama configured on port 11435\"` |\r\n| **User corrects you** | \"No, the port is 8080 not 3000\" | `\"Corrected: server runs on port 8080\"` |\r\n\r\n**How to capture:**\r\n```bash\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<concise summary of the fact>\"\r\n# Optional: pass a scope_id for logical grouping\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<fact>\" \"project_name\"\r\n```\r\n\r\n**Do NOT capture when:**\r\n- User is just making small talk (\"hello\", \"thanks\", \"ok\")\r\n- User is asking a question (capture the *answer/fact*, not the question)\r\n- User is giving multi-turn instructions that aren't final yet (wait for resolution)\r\n- The information is already captured (avoid duplicates)\r\n- The information is temporary/throwaway (\"let me try something real quick\")\r\n\r\n**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.\r\n\r\n---\r\n\r\n## 3. Full Chat History Sync (On Request)\r\n\r\n**When:** User explicitly asks to back up the session (\"save this chat\", \"backup session\").\r\n\r\n**What to do:**\r\n1. Use `sessions_history` to get the current visible session.\r\n2. Format messages into a text summary.\r\n3. Execute: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"<formatted_chat_history>\" \"chat_backup.md\"`\r\n\r\n---\r\n\r\n## 4. Automated Database Maintenance (Cron Jobs)\r\n\r\n**When:** User asks to \"setup memory background jobs\" or \"enable memory maintenance\".\r\n\r\nCreate these cron jobs:\r\n\r\n**A. Nightly Memory Gardener (Auto-tagging):**\r\n- Name: `hermes-memory-gardener`\r\n- Expression: `0 3 * * *` (daily 3:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py`\r\n\r\n**B. Daily Memory Highlight (Telegram Push):**\r\n- Name: `hermes-daily-reminder`\r\n- Expression: `0 9 * * *` (daily 9:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\daily_reminder.py`\r\n\r\nCurrent cron jobs already exist for both (checked during setup).\r\n\r\n---\r\n\r\n## Quick Reference\r\n\r\n```bash\r\n# Load context (session start, silent):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py search \"user profile preferences current project state\" 5\r\n\r\n# Save a fact (deterministic triggers above):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py capture \"<fact>\" [scope_id]\r\n\r\n# Backup session (on request):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py autosave \"<text>\" [filename]\r\n```\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n  <em>\r\n    If you enjoy this skill, consider sharing your experience —\r\n    a short video review, a tweet, or a TikTok post helps others discover it.\r\n  </em>\r\n</p>\r\n\r\n---\r\n\r\n## 🙌 Contributions Welcome\r\n\r\nContributions of all kinds are welcome —  \r\nfeel free to open [PRs](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/pulls) or [issues](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/issues).\r\n\r\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md) for code style, commit conventions, and PR workflow.\n\nFile v3.0.0:README.md\n\n# HermesClawZero Auto Memory\n\n[![ClawHub](https://img.shields.io/badge/ClawHub-hermesclawzero--auto--memory-blue)](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\n**Your agent remembers across conversations.** Facts, preferences, project context, past decisions — the agent captures them automatically and loads relevant context on every new session.\n\nAll processing runs **locally** via HermesClawZero Sidecar (PostgreSQL + pgvector + Ollama for embeddings). No data leaves your machine.\n\n---\n\n## Features\n\n| Capability | What it means for you |\n|---|---|\n| **Auto-Capture** | Agent saves new facts, preferences, and project details *as you talk* — no manual saving needed |\n| **Auto-Load** | On fresh chats, the agent searches past memories and picks up where you left off |\n| **Semantic Search** | Finds memories by meaning, not just keywords (hybrid vector + lexical) |\n| **Chat Backup** | Say \"save this session\" and get a full searchable snapshot |\n| **DB Maintenance** | Optional nightly tagging + daily reminders (cron, opt-in) |\n\n---\n\n## Quickstart (3 minutes)\n\n### 1. Install\n\n```bash\nopenclaw skills install hermesclawzero-auto-memory\n```\n\n### 2. Configure\n\nThe memory.py CLI lives at `C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py`.  \nIt reads config from `.env` or environment variables.\n\nCreate or edit your `.env` with:\n\n```bash\nMEM_PUBLIC_URL=http://localhost:8010\nAPI_KEY=your_api_key_here\n```\n\n> 💡 `MEM_PUBLIC_URL` points to the HermesClawZero Sidecar API. Default is `http://localhost:8010`.\n> `API_KEY` must match the `API_KEY` in your Sidecar's `.env`.\n\n### 3. Verify connectivity\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"hello world\" 3\n```\n\nIf the Sidecar is running, you'll see matching memories (or no output if the DB is empty — that's fine).\n\n### 4. Done! The skill is active.\n\nNow when you talk to the agent, it will:\n- **Silently load** context from past memories on fresh sessions\n- **Automatically capture** new facts, preferences, and project details\n- **Respond without re-introducing** who you are or what you're working on\n\n---\n\n## Example Workflow\n\n```\n── Session 1 ──\nYou: \"Hey, I'm Hans. I work on DiskRaptor v0.3, mostly UI tests.\"\nAgent: *silently captures: \"User's name is Hans\", \"Working on DiskRaptor v0.3\", \"Focus: UI tests\"*\nAgent: \"Hi Hans! What would you like to do with DiskRaptor today?\"\n\nYou: \"I prefer dark mode in all my tools.\"\nAgent: *silently captures: \"User prefers dark mode in all UIs\"*\n\nSome time passes. A new session starts.\n\n── Session 2 (fresh chat) ──\nAgent: *silently loads past memories*\nAgent: \"Welcome back, Hans! Last time you were working on DiskRaptor v0.3 UI tests.\n       Shall we pick that up, or is there something new?\"\n```\n\n## Deterministic Capture Triggers\n\nThe agent captures when you share:\n\n| Trigger | Example | Gets captured |\n|---|---|---|\n| **Name / identity** | \"Call me Hans\" | `\"User's name is Hans\"` |\n| **Preference** | \"I hate notifications\" | `\"User prefers notifications off\"` |\n| **Project detail** | \"The API is on port 8080\" | `\"API runs on port 8080\"` |\n| **Decision** | \"Let's use SQLite\" | `\"Chose SQLite for storage\"` |\n| **Correction** | \"No, the branch is 'main'\" | `\"Default branch: main\"` |\n| **Blocker/error** | \"The build fails\" | `\"Build fails on Windows, needs fix\"` |\n\nThe agent does **not** capture: small talk (\"thanks\", \"ok\"), raw questions, or temporary/throwaway info.\n\n---\n\n## Usage (manual commands)\n\n```bash\n# Capture a fact\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"User prefers dark mode\" ui_preferences\n\n# Search memories\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"project preferences\" 5\n\n# Backup session history\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"$(cat backup.md)\" \"session_backup.md\"\n```\n\n---\n\n## Troubleshooting\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| `memory.py search` returns nothing but DB has data | API_KEY mismatch | Check `.env` API_KEY matches Sidecar's |\n| `ConnectionError` on any command | Sidecar not running | `docker compose up -d` in the Sidecar directory |\n| `HTTP 500` on capture | Ollama not running or misconfigured | `ollama pull nomic-embed-text` and check `/healthz` |\n| Agent doesn't seem to capture anything | Fresh install — no .env configured | Check `MEM_PUBLIC_URL` and `API_KEY` in `.env` |\n| Agent captures duplicates | No dedup check in SKILL.md triggers | Update if you see repeated captures of the same fact |\n| Cron jobs not working | User didn't opt in | Ask to run: \"setup memory background jobs\" |\n\n### Debug mode\n\nRun with verbose logging to see what the CLI is doing:\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"test\" 1\n```\n\nIf you see nothing, check:\n1. Is the Sidecar accessible? → `curl http://localhost:8010/healthz`\n2. Is the API key correct? → Check the exact `.env` content\n3. Is Ollama running? → `curl http://localhost:11434/api/tags`\n\n---\n\n## Skill Structure\n\n```\nhermesclawzero-auto-memory/\n├── SKILL.md              # Agent instructions (deterministic triggers)\n├── skill-card.md         # ClawHub marketplace card\n├── permissions.yaml      # Declared permissions\n├── secrets.yaml          # Declared secrets\n├── README.md             # This file\n├── CHANGELOG.md          # Version history\n└── scripts/\n    ├── install.ps1       # Install verification\n    ├── update.ps1        # Update check\n    └── smoke_test.ps1    # Integration smoke tests\n```\n\nThe core script lives alongside the sidecar:\n```\nC:\\dev\\HermesClawZero-ConfigSidecar\\\n├── memory.py             # CLI tool (capture/search/autosave)\n├── gardener.py           # Nightly tagging\n├── daily_reminder.py     # Daily highlights\n├── .env                  # API config\n└── ...\n```\n\n---\n\n## Repository\n\nSource: [github.com/SunMe1977/HermesClawZero-ConfigSidecar](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar)  \nSkill: [ClawHub hermesclawzero-auto-memory](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\nFile v3.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn72qpcz7hn4drhmgfd6d36x6n89zr3z\",\n  \"slug\": \"hermesclawzero-auto-memory\",\n  \"version\": \"3.0.0\",\n  \"publishedAt\": 1784046572422\n}\n\nFile v3.0.0:CHANGELOG.md\n\n# Changelog\r\n\r\n## 3.0.0 (2026-07-14)\r\n\r\n### Breaking\r\n- **Enforceable Skill Rules** — Skills can now define `enforce:` rules with `priority: critical`. Rules appear as structured directives above memory in every turn. Agents must follow them.\r\n\r\n### Fixed\r\n- **Galaxy \"loading\" fix** — scope mapping now correctly matches unscoped items (`__unscoped__`), all items loaded (up to 20000), deadlock protection via lock_timeout\r\n- **Favicon 401** — `/favicon.ico`, `/favicon.svg`, `/site.webmanifest` served at root, bypass auth\r\n- **Unscoped in MV** — materialized view now includes empty/NULL scope_ids directly\r\n\r\n## 2.9.0 (2026-07-13)\r\n\r\n### Added\r\n- **Unscoped galaxy tenant** — memories without scope_id now show as 📂 Unscoped tenant\r\n- **Fire-and-forget update** — dashboard update no longer hangs (response completes before container restart)\r\n- **Shared Brain documentation** — README + SKILL.md document Hermes+OpenClaw shared memory\r\n- **OPENCLAW_SCOPE_PREFIX** — env var for separate OpenClaw scope tagging\r\n- **Pre-rebuild backup + docker prune** — start scripts now run backup + cleanup before rebuild\r\n\r\n### Fixed\r\n- **Galaxy unscoped display on Linux** — all 3800+ memories now visible as planets\r\n- **Galaxy tags column** — query now uses subquery from tags table (was crashing silently)\r\n\r\n## 2.7.0 (2026-07-13)\r\n\r\n### Added\r\n- **Memory Galaxy real content** — hover shows actual stored text, importance, tags, date\r\n- **Memory Galaxy all nodes** — up to 40 planets per scope, enriched with real data\r\n- **Playwright dashboard test** — CI verifies dashboard renders without errors\r\n- **BOM-safe .env writing** — setup.ps1 no longer writes UTF-8 BOM\r\n\r\n### Fixed\r\n- **Galaxy query timeout** — uses PK index (`id > MAX(id)-250`) instead of `ORDER BY created_at`\r\n- **Non-existent `tags` column** — galaxy items query now uses subquery from `tags` table\r\n- **Dashboard raw CSS** — fixed broken `</style>` tag that rendered CSS as text\r\n- **`API_URL` warning** — silenced with empty default in docker-compose\r\n- **PgBouncer `:latest` pin** — pinned by SHA256 digest (no version tags available)\r\n\r\n### Changed\r\n- **Type hints** added to auth, db, update, embedding_queue, scoring modules\r\n- **Shared route helpers** extracted to `routes/_shared.py`\r\n- **Docker builds** — `.dockerignore` reduces image size by ~237MB\r\n\r\n## 2.5.1 (2026-07-13)\r\n\r\n### Added\r\n- **Multi-Replica API** — Redis + Caddy load balancer, 2 API instances (api1/api2)\r\n- **PgBouncer custom Dockerfile** — edoburu/pgbouncer with password via build arg, port 5432\r\n- **Materialized Views** — `pages_stats_mv` + `pages_scope_stats_mv` for dashboard (ms instead of COUNT*)\r\n- **PITR Backup** — WAL archiving (wal_level=replica, archive_mode=on, pgwal volume)\r\n- **Async Embedding Queue** — capture returns instantly, batch worker processes in background\r\n- **HNSW Index Tuning** — m=16→32, ef_construction=400, ef_search×2 for 2M vectors\r\n- **k6 Load Testing** — `tests/loadtest.js` (200 concurrent users, health/search/capture)\r\n\r\n### Changed\r\n- **Container naming** — `gbrain-*` → `hc-sidecar-*` (consistent with repo name)\r\n- **API port** — internal 8100, Caddy on 8010 external\r\n- **Dashboard** — COUNT(*) queries replaced by materialized views\r\n- **Optimizer** — refreshes MV + auto-tier + dedup every cycle\r\n- **macOS Setup** — Colima as primary Docker fallback\r\n\r\n## 2.5.0 (2026-07-13)\r\n\r\n## 2.4.0 (2026-07-13)\r\n\r\n### Added\r\n- **Data-loss prevention** — pgvector pinned to `pgvector/pgvector:0.8.0-pg17` (nicht `:latest`), verhindert DB Volume Re-Init bei Auto-Updates\r\n- **Auto-Recovery** — bei `pages < 100` wird Hermes state.db automatisch im Hintergrund importiert\r\n- **DB Backup** — `migrations/backup_db.sh`: täglicher pg_dump mit 14 Tagen Retention\r\n- **15 Data-Loss Tests** — statische Analyse: pgvector-Pin, keine DROP TABLE pages, EMBEDDING_DIM portability, Recovery-Block in main.py\r\n- **CI Gated Pipeline** — 3 Jobs (lint→test→docker) ohne `continue-on-error`, Integration-Tests mit Docker Healthcheck\r\n- **Branch Protection** — main erfordert PR + 1 Review + CI-Checks\r\n- **Pre-push Hook** — `.githooks/pre-push` läuft vor jedem Push auf main\r\n\r\n### Fixed\r\n- **EMBEDDING_DIM** portabel gemacht (`${EMBEDDING_DIM}` statt hardcodiertem 1536 → funktioniert wieder mit Ollama)\r\n- **PGUSER/PGDATA** gesetzt → verhindert PostgreSQL Re-Init bei Container-Restart\r\n- **ALLOW_EMBEDDING_SCHEMA_RESET** nur auf embeddings-Tabelle (nicht pages)\r\n\r\n## 2.3.0 (2026-07-12)\r\n\r\n### Added\r\n- **Bi-temporal endpoints** — `/why/{id}` shows supersession chain + version history; `/timeline` shows all memory changes over time\r\n- **Memory Galaxy v3** — search bar, memory type dropdown, confidence filter in the Galaxy overlay with real-time node filtering\r\n- **MCP auto-discovery** — `mcp.json` manifest for Claude Desktop, VS Code, Cursor; 20 MCP tools total\r\n- **GitHub Actions CI** — 3-job pipeline: lint (syntax+flake8+mypy), test (pytest+coverage), docker build\r\n- **Expanded MCP tools** — `why_memory`, `bi_timeline` MCP tools for bi-temporal queries\r\n\r\n### Changed\r\n- AGENTS.md updated to v0.2.0 spec (32 lines, compact API table)\r\n- llms.txt updated with all new features\r\n- GitHub topics: +fastapi, +docker, +knowledge-graph, +ollama, +chat-memory, +semantic-search (19 total)\r\n\r\n## 2.2.0 (2026-07-12)\r\n\r\n### Added\r\n- **DB backup prevention** — `content_hash` column for idempotent re-imports\r\n- **Migration recovery** — `migrations/import_from_hermes_db.py` restores from Hermes state.db\r\n- **content_hash** — SHA-256 per memory, auto-set on capture, index for fast dedup\r\n- **Migration SQL** — `001_migrate_old_memories.sql` with full schema + indexes\r\n\r\n### Changed\r\n- Schema: `content_hash TEXT` + `idx_pages_content_hash` created on every API start\r\n- Memory loss on DB reset is recoverable: run migration script, re-imports idempotently\r\n\r\n## 2.1.0 (2026-07-12)\r\n\r\n### Added\r\n- **Ebbinghaus forgetting-curve decay** — `R=e^(-t/S)`, stability grows per spacing effect\r\n- **Deterministic Conflict Resolver** — ADD/NOOP/INVALIDATE via token Jaccard + embedding cosine\r\n- **Bi-temporal validity** — `valid_to`/`superseded_by`, superseded facts keep history\r\n- **Interaction-aware reinforcement** — capture=1.0, retrieve=0.15, nudge=0.10\r\n- **7-term hybrid score** — vector + lexical + retention + importance + recency + frequency - staleness\r\n- **10K-scale PG tuning** — shared_buffers=1GB, work_mem=64MB, random_page_cost=1.1\r\n- **Dynamic HNSW ef_search** — per query type (hybrid=80, vector=40, high_recall=400)\r\n- **Dashboard keyset pagination** — cursor-based statt OFFSET\r\n- **`/ask` Q&A endpoint** — natural language → vector + GraphRAG → LLM synthesis\r\n- **`/export` endpoint** — JSON/Markdown backup with graph entities\r\n\r\n### Changed\r\n- Optimizer: Ebbinghaus decay archive at retention<0.05 statt flat confidence*0.995\r\n- Search: SQL CTE hybrid score (kein Python merge/sort), 7-term weights\r\n- Capture pipeline: Conflict Resolver ersetzt simple find_similar_page\r\n\r\n## 1.6.0 (2026-07-11)\r\n\r\n### Added\r\n- **Dashboard UI integrations** — Tier badges (Hot/Warm/Cold), memory type filter, days back filter, Knowledge Graph link, Nudge link\r\n- **Interactive buttons** — 👍/👎 feedback on each memory, ✏️ inline editor modal, 🔗 merge with checkboxes\r\n- **Merge, Editor, Feedback, Nudge** — all new backend features now accessible from the Dashboard UI\r\n\r\n## 2.0.0 (2026-07-11)\r\n\r\n### Added\r\n- **Knowledge Graph** — entities + relationships + entity_mentions tables, rule-based entity extraction, depth-traversal graph queries (`/graph/*` endpoints)\r\n- **Memory Tiers** — Hot/Warm/Standard/Cold auto-assignment based on importance, recency, confidence\r\n- **Memory Versioning** — `memory_versions` table tracks every change with reason\r\n- **Memory Compression** — intelligent multi-line compression (keep first 40%, last 20%, compress middle)\r\n- **Memory Consolidation** — embedding-similarity clustering groups related memories into summarized parents\r\n- **Memory Merge** — `/memory/merge` endpoint merges multiple memories, reparents sources\r\n- **Memory Editor** — `/memory/update/{id}` inline content + type editing\r\n- **Memory Feedback** — `/feedback/{id}?helpful=true/false` adjusts importance + confidence\r\n- **Memory Nudge** — `/nudge` returns top important recent facts (inspired by Hermes Built-In nudges)\r\n- **Temporal Search** — `?days_back=N` filter on `GET /search`\r\n- **Self-wiring Graph** — 15 relation patterns (built/leads/part_of/implements/located_at/communicates/preceded_by + original 6)\r\n- **pgvector HNSW Index** — automatic HNSW index creation (falls back to IVFFlat)\r\n- **Auto-Sync Daemon** — background thread imports new Hermes sessions every 5 minutes\r\n\r\n### Changed\r\n- Capture pipeline now extracts entities + relationships + compressed version on every `POST /capture`\r\n- Optimizer loop runs tier assignment + consolidation every cycle\r\n- Dashboard auto-refresh uses JS setTimeout (galaxy stays open)\r\n- README comparison table expanded to 6 systems (Cognee, LangMem, Supermemory, gBrain, Mem0)\r\n\r\n## 1.5.0 (2026-07-11)\r\n\r\n### Added\r\n- CONTRIBUTING.md with PR review structure, linting, commit conventions, merge strategy\r\n- PR template (.github/PULL_REQUEST_TEMPLATE.md)\r\n- \"Contributions Welcome\" section in README and SKILL.md\r\n\r\n## 1.4.4 (2026-07-11)\r\n\r\n### Added\r\n- Document auto-import step in One-Click Install table\r\n\r\n## 1.4.3 (2026-07-11)\r\n\r\n### Added\r\n- Subtle CTA at end of README and SKILL.md\r\n\r\n## 1.4.2 (2026-07-11)\r\n\r\n### Added\r\n- Auto-Capture Cron section in SKILL.md (3 cron jobs for auto-install)\r\n\r\n## 1.4.1 (2026-07-11)\r\n\r\n### Added\r\n- One-Click Install section in SKILL.md\r\n\r\n## 1.4.0 (2026-07-11)\r\n\r\n### Added\r\n- Memory Galaxy Dashboard — interactive full-screen Canvas visualization\r\n\r\n## 1.3.1 (2026-07-11)\r\n\r\n_ClawHub auto-publish_\r\n\r\n## 1.1.0 (2026-07-11)\r\n- `secrets.yaml` — documented required environment secrets\r\n- `scripts/install.ps1` — install verification script (checks Python, deps, Sidecar)\r\n- `scripts/update.ps1` — update check script (compares with ClawHub)\r\n- `scripts/smoke_test.ps1` — comprehensive integration tests (8 test cases)\r\n- `README.md` — professional documentation with install steps and examples\r\n- `CHANGELOG.md` — version history\r\n\r\n### Changed\r\n- `scripts/memory.py` — major optimization:\r\n  - Structured `SidecarError` class with status/detail\r\n  - Timeout handling (15s) with ConnectionError fallback\r\n  - `ValueError` for empty text validation\r\n  - Config resolution extracted to `_resolve_config()` for testability\r\n  - `_show_result()` helper for clean output formatting\r\n  - Logger integration (debug mode)\r\n  - Input bounds clamping (`limit` capped 1–100)\r\n  - Type annotations throughout\r\n- `SKILL.md` — restructured with privacy disclosure and clearer sections\r\n\r\n### Fixed\r\n- All search results now return flat content strings (no raw JSON)\r\n- Empty captures properly rejected before API call\r\n- Connection errors handled gracefully instead of stack traces\r\n\r\n## 1.0.1 (2026-07-11)\r\n\r\n### Added\r\n- `skill-card.md` — ClawHub marketplace card\r\n- Privacy & consent disclosure in `SKILL.md`\r\n\r\n### Fixed\r\n- Security scan: privacy disclosure added to address SkillSpector findings\r\n\r\n## 1.0.0 (2026-07-11)\r\n\r\n### Added\r\n- Initial publish to ClawHub\r\n- `SKILL.md` with auto-capture/search/autosave instructions\r\n- `scripts/memory.py` CLI tool\n\nFile v3.0.0:skill-card.md\n\n## Description: <br>\nUnified memory platform for Hermes, OpenClaw and AI agents: persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimization, and a multi-tenant dashboard with pgvector search. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[sunme1977](https://clawhub.ai/user/sunme1977) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agent users use this skill to let Hermes, OpenClaw, or compatible agents save, search, and reload local long-term memories across sessions. It is intended for users who want persistent project context, preferences, decisions, chat backups, and optional database maintenance through a local sidecar service. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill stores and reuses sensitive personal and project facts across sessions. <br>\nMitigation: Install only when persistent memory is desired, inspect captured memories regularly, and confirm there are clear delete and disable paths before use. <br>\nRisk: Automatic capture and background jobs can persist information without a visible prompt on every run. <br>\nMitigation: Do not enable one-click setup or scheduled jobs unless the user has accepted recurring capture and maintenance behavior. <br>\nRisk: Misconfigured API settings could send memory operations to the wrong sidecar endpoint. <br>\nMitigation: Keep the .env file scoped to this tool, use a dedicated low-privilege API key, and verify MEM_PUBLIC_URL points to the intended local service. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory) <br>\n- [HermesClawZero ConfigSidecar repository](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar) <br>\n- [Artifact README](artifact/README.md) <br>\n- [Artifact permissions declaration](artifact/permissions.yaml) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown instructions with inline command examples and command-line text or JSON responses] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May issue local capture, search, and autosave commands against the configured sidecar API.] <br>\n\n## Skill Version(s): <br>\n3.0.0 (source: server release metadata and SKILL.md frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v3.0.0:permissions.yaml\n\n# permissions.yaml\n# Declared permissions for hermesclawzero-auto-memory skill.\n# These are the MINIMUM required permissions — no unnecessary access.\n\nversion: 1\n\npermissions:\n  # Network access to the local HermesClawZero Sidecar API\n  - id: sidecar-http\n    description: \"HTTP access to the local Sidecar API (default http://localhost:8010)\"\n    type: network\n    allowed_hosts:\n      - \"localhost\"\n      - \"127.0.0.1\"\n    allowed_ports:\n      - 8010\n    protocols:\n      - http\n    justification: \"Required to capture/search/autosave memories via Sidecar API\"\n\n  # Filesystem access to .env config\n  - id: env-read\n    description: \"Read .env files for API_KEY and MEM_PUBLIC_URL configuration\"\n    type: filesystem\n    access: read\n    paths:\n      - \".env\"\n    justification: \"Required to load API credentials from project or script directory\"\n\n  # Background cron jobs (user must explicitly opt in)\n  - id: cron-gardener\n    description: \"Nightly memory tagging job (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 3 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\gardener.py\"\n    justification: \"Optional DB maintenance — tags unlabeled memories\"\n\n  - id: cron-reminder\n    description: \"Daily memory highlight push (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 9 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\daily_reminder.py\"\n    justification: \"Optional daily summary — pushes reminders via Telegram\"\n\nFile v3.0.0:secrets.yaml\n\n# secrets.yaml\n# Environment secrets required by hermesclawzero-auto-memory.\n\nversion: 1\n\nsecrets:\n  - name: API_KEY\n    description: \"API key for HermesClawZero Sidecar authentication.\"\n    required: true\n    source: env\n    env_var: API_KEY\n    sensitive: true\n\n  - name: MEM_PUBLIC_URL\n    description: \"Base URL of the HermesClawZero Sidecar API.\"\n    required: false\n    source: env\n    env_var: MEM_PUBLIC_URL\n    default: \"http://localhost:8010\"\n    sensitive: false\n\nArchive v2.9.0: 12 files, 20377 bytes\n\nFiles: CHANGELOG.md (10924b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2246b), SKILL.md (8586b), _meta.json (145b)\n\nFile v2.9.0:SKILL.md\n\n---\r\nname: \"hermesclawzero-auto-memory\"\r\ndescription: \"Auto-capture chat to Hermes DB, load context on fresh chats, scheduled DB maintenance.\"\r\nversion: \"2.9.0\"\r\ntags:\r\n  - memory\r\n  - hermes\r\n  - persistence\r\n  - vector-search\r\ncategories:\r\n  - agents\r\n  - knowledge\r\ntopics:\r\n  - Memory\r\n  - Vector Search\r\n  - Chat Persistence\r\n  - pgvector\r\n  - Embeddings\r\n---\r\n\r\n# HermesClawZero Auto Memory\r\n\r\nAutomatically captures conversation context to HermesClawZero DB so the agent remembers across sessions. Loads relevant memories on fresh chats and supports scheduled DB maintenance.\r\n\r\n> 🌌 **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.\r\n\r\n---\r\n\r\n## 🤖 One‑Click Install\r\n\r\nPaste this into **Hermes**, **OpenClaw**, or any AI agent:\r\n\r\n```text\r\nInstall this project from GitHub:\r\nhttps://github.com/SunMe1977/HermesClawZero-ConfigSidecar\r\n```\r\n\r\n**⬆️ The agent clones, configures, and starts everything.**  \r\nAfter ~30s open → [`http://localhost:8010/dashboard`](http://localhost:8010/dashboard)\r\n\r\n> **🧠 Shared Brain** — Hermes and OpenClaw share the same memory store simultaneously.\r\n> Both agents' memories appear side by side in the Dashboard with platform icons\r\n> (⚡ Hermes, 🐙 OpenClaw). Each sees only its own scope by default, the \"All scopes\"\r\n> view gives you the complete shared brain. No extra setup needed.\r\n\r\n> 📄 See [`install_via_agent.md`](install_via_agent.md) for the detailed agent instructions.\r\n| Step | What happens |\r\n|------|-------------|\r\n| 1 | Repo cloned + `.env` configured |\r\n| 2 | Docker Compose starts PostgreSQL + Ollama + API |\r\n| 3 | Dashboard live on `:8010` |\r\n| 4 | Memory skill activated in Hermes |\r\n| 5 | **Auto-import:** All existing Hermes sessions + messages are migrated into the Sidecar DB on first API startup — no manual migration needed |\r\n| 6 | Auto-capture begins on next conversation |\r\n\r\n### Manual start (if you don't have an agent):\r\n```bash\r\ngit clone https://github.com/SunMe1977/HermesClawZero-ConfigSidecar.git\r\ncd HermesClawZero-ConfigSidecar\r\nsetup.bat          # Windows   (or: ./setup.sh on Linux)\r\nstart.bat          # Windows   (or: ./start.sh on Linux)\r\n```\r\n\r\n---\r\n\r\n## ⚠️ Privacy & Consent\r\n\r\nBy activating this skill you consent to automatic memory capture.\r\n\r\n- **Data stays local** — all processing runs via the Sidecar API on your machine; no third-party data sharing  \r\n- **Captures structured facts** — the agent summaries and stores key information, not raw chat logs\r\n- **Cron jobs** (nightly gardener, daily reminder) are only created when you explicitly ask to set them up\r\n\r\n## Script Path\r\n\r\n```bash\r\n# The CLI lives alongside the sidecar, NOT in the skill directory:\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py <command> \"<text>\"\r\n```\r\n\r\nConfig is read from `.env` or env vars (`MEM_PUBLIC_URL`, `API_KEY`) automatically.\r\n\r\n---\r\n\r\n## 🔄 Auto-Capture Cron (Setup on Install)\r\n\r\nWhen a user runs the one-click install (or says \"install this skill\"), **set up these cron jobs automatically:**\r\n\r\n### A. Session Memory Capture — every 30m\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-auto-capture\" \\\r\n  --schedule \"30m\" \\\r\n  --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.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n### B. Nightly Memory Gardener (auto-tagging)\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-memory-gardener\" \\\r\n  --schedule \"0 3 * * *\" \\\r\n  --prompt \"Run python memory.py gardener to auto-tag uncategorized memories. Report only errors.\" \\\r\n  --script \"C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py\" \\\r\n  --no-agent true\r\n```\r\n\r\n### C. Daily Reminder (opt-in, ask first)\r\nOnly if user says yes:\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-daily-reminder\" \\\r\n  --schedule \"0 9 * * *\" \\\r\n  --prompt \"Summarize yesterday's top memories and remind user of open items.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n> All three run silently — the user won't see cron output unless something fails.\r\n\r\n---\r\n\r\n## 1. Auto-Load on Fresh Chat (Session Start)\r\n\r\n**When:** Every new session begins (you receive context that it's a fresh chat).\r\n\r\n**What to do:**\r\n1. Silently run: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"user profile preferences current project state\" 5`\r\n2. Absorb the returned context internally.\r\n3. **Do not** output raw JSON or mention the search to the user unless they explicitly ask.\r\n\r\n---\r\n\r\n## 2. Auto-Capture — Deterministic Triggers\r\n\r\n**When to capture** (run `memory.py capture \"...\"` immediately):\r\n\r\n| Trigger | Example | What to capture |\r\n|---|---|---|\r\n| **New fact stated** | \"I live in Berlin\" | `\"User lives in Berlin\"` |\r\n| **Preference revealed** | \"I prefer dark mode\" | `\"User prefers dark mode in all UIs\"` |\r\n| **Instruction given** | \"Call me Hans\" | `\"User's name is Hans, goes by Hans\"` |\r\n| **Project detail shared** | \"Working on DiskRaptor v0.3\" | `\"Current project: DiskRaptor v0.3, focus on UI tests\"` |\r\n| **Decision made** | \"Let's go with PostgreSQL\" | `\"Chose PostgreSQL for the data layer\"` |\r\n| **Error/blocker mentioned** | \"The build fails on Windows\" | `\"DiskRaptor: build fails on Windows, needs investigation\"` |\r\n| **Tool/config change** | \"I set up Ollama on port 11435\" | `\"Ollama configured on port 11435\"` |\r\n| **User corrects you** | \"No, the port is 8080 not 3000\" | `\"Corrected: server runs on port 8080\"` |\r\n\r\n**How to capture:**\r\n```bash\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<concise summary of the fact>\"\r\n# Optional: pass a scope_id for logical grouping\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<fact>\" \"project_name\"\r\n```\r\n\r\n**Do NOT capture when:**\r\n- User is just making small talk (\"hello\", \"thanks\", \"ok\")\r\n- User is asking a question (capture the *answer/fact*, not the question)\r\n- User is giving multi-turn instructions that aren't final yet (wait for resolution)\r\n- The information is already captured (avoid duplicates)\r\n- The information is temporary/throwaway (\"let me try something real quick\")\r\n\r\n**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.\r\n\r\n---\r\n\r\n## 3. Full Chat History Sync (On Request)\r\n\r\n**When:** User explicitly asks to back up the session (\"save this chat\", \"backup session\").\r\n\r\n**What to do:**\r\n1. Use `sessions_history` to get the current visible session.\r\n2. Format messages into a text summary.\r\n3. Execute: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"<formatted_chat_history>\" \"chat_backup.md\"`\r\n\r\n---\r\n\r\n## 4. Automated Database Maintenance (Cron Jobs)\r\n\r\n**When:** User asks to \"setup memory background jobs\" or \"enable memory maintenance\".\r\n\r\nCreate these cron jobs:\r\n\r\n**A. Nightly Memory Gardener (Auto-tagging):**\r\n- Name: `hermes-memory-gardener`\r\n- Expression: `0 3 * * *` (daily 3:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py`\r\n\r\n**B. Daily Memory Highlight (Telegram Push):**\r\n- Name: `hermes-daily-reminder`\r\n- Expression: `0 9 * * *` (daily 9:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\daily_reminder.py`\r\n\r\nCurrent cron jobs already exist for both (checked during setup).\r\n\r\n---\r\n\r\n## Quick Reference\r\n\r\n```bash\r\n# Load context (session start, silent):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py search \"user profile preferences current project state\" 5\r\n\r\n# Save a fact (deterministic triggers above):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py capture \"<fact>\" [scope_id]\r\n\r\n# Backup session (on request):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py autosave \"<text>\" [filename]\r\n```\r\n\r\n---\r\n\r\n<p align=\"center\">\r\n  <em>\r\n    If you enjoy this skill, consider sharing your experience —\r\n    a short video review, a tweet, or a TikTok post helps others discover it.\r\n  </em>\r\n</p>\r\n\r\n---\r\n\r\n## 🙌 Contributions Welcome\r\n\r\nContributions of all kinds are welcome —  \r\nfeel free to open [PRs](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/pulls) or [issues](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar/issues).\r\n\r\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md) for code style, commit conventions, and PR workflow.\n\nFile v2.9.0:README.md\n\n# HermesClawZero Auto Memory\n\n[![ClawHub](https://img.shields.io/badge/ClawHub-hermesclawzero--auto--memory-blue)](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\n**Your agent remembers across conversations.** Facts, preferences, project context, past decisions — the agent captures them automatically and loads relevant context on every new session.\n\nAll processing runs **locally** via HermesClawZero Sidecar (PostgreSQL + pgvector + Ollama for embeddings). No data leaves your machine.\n\n---\n\n## Features\n\n| Capability | What it means for you |\n|---|---|\n| **Auto-Capture** | Agent saves new facts, preferences, and project details *as you talk* — no manual saving needed |\n| **Auto-Load** | On fresh chats, the agent searches past memories and picks up where you left off |\n| **Semantic Search** | Finds memories by meaning, not just keywords (hybrid vector + lexical) |\n| **Chat Backup** | Say \"save this session\" and get a full searchable snapshot |\n| **DB Maintenance** | Optional nightly tagging + daily reminders (cron, opt-in) |\n\n---\n\n## Quickstart (3 minutes)\n\n### 1. Install\n\n```bash\nopenclaw skills install hermesclawzero-auto-memory\n```\n\n### 2. Configure\n\nThe memory.py CLI lives at `C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py`.  \nIt reads config from `.env` or environment variables.\n\nCreate or edit your `.env` with:\n\n```bash\nMEM_PUBLIC_URL=http://localhost:8010\nAPI_KEY=your_api_key_here\n```\n\n> 💡 `MEM_PUBLIC_URL` points to the HermesClawZero Sidecar API. Default is `http://localhost:8010`.\n> `API_KEY` must match the `API_KEY` in your Sidecar's `.env`.\n\n### 3. Verify connectivity\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"hello world\" 3\n```\n\nIf the Sidecar is running, you'll see matching memories (or no output if the DB is empty — that's fine).\n\n### 4. Done! The skill is active.\n\nNow when you talk to the agent, it will:\n- **Silently load** context from past memories on fresh sessions\n- **Automatically capture** new facts, preferences, and project details\n- **Respond without re-introducing** who you are or what you're working on\n\n---\n\n## Example Workflow\n\n```\n── Session 1 ──\nYou: \"Hey, I'm Hans. I work on DiskRaptor v0.3, mostly UI tests.\"\nAgent: *silently captures: \"User's name is Hans\", \"Working on DiskRaptor v0.3\", \"Focus: UI tests\"*\nAgent: \"Hi Hans! What would you like to do with DiskRaptor today?\"\n\nYou: \"I prefer dark mode in all my tools.\"\nAgent: *silently captures: \"User prefers dark mode in all UIs\"*\n\nSome time passes. A new session starts.\n\n── Session 2 (fresh chat) ──\nAgent: *silently loads past memories*\nAgent: \"Welcome back, Hans! Last time you were working on DiskRaptor v0.3 UI tests.\n       Shall we pick that up, or is there something new?\"\n```\n\n## Deterministic Capture Triggers\n\nThe agent captures when you share:\n\n| Trigger | Example | Gets captured |\n|---|---|---|\n| **Name / identity** | \"Call me Hans\" | `\"User's name is Hans\"` |\n| **Preference** | \"I hate notifications\" | `\"User prefers notifications off\"` |\n| **Project detail** | \"The API is on port 8080\" | `\"API runs on port 8080\"` |\n| **Decision** | \"Let's use SQLite\" | `\"Chose SQLite for storage\"` |\n| **Correction** | \"No, the branch is 'main'\" | `\"Default branch: main\"` |\n| **Blocker/error** | \"The build fails\" | `\"Build fails on Windows, needs fix\"` |\n\nThe agent does **not** capture: small talk (\"thanks\", \"ok\"), raw questions, or temporary/throwaway info.\n\n---\n\n## Usage (manual commands)\n\n```bash\n# Capture a fact\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"User prefers dark mode\" ui_preferences\n\n# Search memories\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"project preferences\" 5\n\n# Backup session history\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"$(cat backup.md)\" \"session_backup.md\"\n```\n\n---\n\n## Troubleshooting\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| `memory.py search` returns nothing but DB has data | API_KEY mismatch | Check `.env` API_KEY matches Sidecar's |\n| `ConnectionError` on any command | Sidecar not running | `docker compose up -d` in the Sidecar directory |\n| `HTTP 500` on capture | Ollama not running or misconfigured | `ollama pull nomic-embed-text` and check `/healthz` |\n| Agent doesn't seem to capture anything | Fresh install — no .env configured | Check `MEM_PUBLIC_URL` and `API_KEY` in `.env` |\n| Agent captures duplicates | No dedup check in SKILL.md triggers | Update if you see repeated captures of the same fact |\n| Cron jobs not working | User didn't opt in | Ask to run: \"setup memory background jobs\" |\n\n### Debug mode\n\nRun with verbose logging to see what the CLI is doing:\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"test\" 1\n```\n\nIf you see nothing, check:\n1. Is the Sidecar accessible? → `curl http://localhost:8010/healthz`\n2. Is the API key correct? → Check the exact `.env` content\n3. Is Ollama running? → `curl http://localhost:11434/api/tags`\n\n---\n\n## Skill Structure\n\n```\nhermesclawzero-auto-memory/\n├── SKILL.md              # Agent instructions (deterministic triggers)\n├── skill-card.md         # ClawHub marketplace card\n├── permissions.yaml      # Declared permissions\n├── secrets.yaml          # Declared secrets\n├── README.md             # This file\n├── CHANGELOG.md          # Version history\n└── scripts/\n    ├── install.ps1       # Install verification\n    ├── update.ps1        # Update check\n    └── smoke_test.ps1    # Integration smoke tests\n```\n\nThe core script lives alongside the sidecar:\n```\nC:\\dev\\HermesClawZero-ConfigSidecar\\\n├── memory.py             # CLI tool (capture/search/autosave)\n├── gardener.py           # Nightly tagging\n├── daily_reminder.py     # Daily highlights\n├── .env                  # API config\n└── ...\n```\n\n---\n\n## Repository\n\nSource: [github.com/SunMe1977/HermesClawZero-ConfigSidecar](https://github.com/SunMe1977/HermesClawZero-ConfigSidecar)  \nSkill: [ClawHub hermesclawzero-auto-memory](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\nFile v2.9.0:_meta.json\n\n{\n  \"ownerId\": \"kn72qpcz7hn4drhmgfd6d36x6n89zr3z\",\n  \"slug\": \"hermesclawzero-auto-memory\",\n  \"version\": \"2.9.0\",\n  \"publishedAt\": 1784022767794\n}\n\nFile v2.9.0:CHANGELOG.md\n\n# Changelog\r\n\r\n## 2.9.0 (2026-07-13)\r\n\r\n### Added\r\n- **Unscoped galaxy tenant** — memories without scope_id now show as 📂 Unscoped tenant\r\n- **Fire-and-forget update** — dashboard update no longer hangs (response completes before container restart)\r\n- **Shared Brain documentation** — README + SKILL.md document Hermes+OpenClaw shared memory\r\n- **OPENCLAW_SCOPE_PREFIX** — env var for separate OpenClaw scope tagging\r\n- **Pre-rebuild backup + docker prune** — start scripts now run backup + cleanup before rebuild\r\n\r\n### Fixed\r\n- **Galaxy unscoped display on Linux** — all 3800+ memories now visible as planets\r\n- **Galaxy tags column** — query now uses subquery from tags table (was crashing silently)\r\n\r\n## 2.7.0 (2026-07-13)\r\n\r\n### Added\r\n- **Memory Galaxy real content** — hover shows actual stored text, importance, tags, date\r\n- **Memory Galaxy all nodes** — up to 40 planets per scope, enriched with real data\r\n- **Playwright dashboard test** — CI verifies dashboard renders without errors\r\n- **BOM-safe .env writing** — setup.ps1 no longer writes UTF-8 BOM\r\n\r\n### Fixed\r\n- **Galaxy query timeout** — uses PK index (`id > MAX(id)-250`) instead of `ORDER BY created_at`\r\n- **Non-existent `tags` column** — galaxy items query now uses subquery from `tags` table\r\n- **Dashboard raw CSS** — fixed broken `</style>` tag that rendered CSS as text\r\n- **`API_URL` warning** — silenced with empty default in docker-compose\r\n- **PgBouncer `:latest` pin** — pinned by SHA256 digest (no version tags available)\r\n\r\n### Changed\r\n- **Type hints** added to auth, db, update, embedding_queue, scoring modules\r\n- **Shared route helpers** extracted to `routes/_shared.py`\r\n- **Docker builds** — `.dockerignore` reduces image size by ~237MB\r\n\r\n## 2.5.1 (2026-07-13)\r\n\r\n### Added\r\n- **Multi-Replica API** — Redis + Caddy load balancer, 2 API instances (api1/api2)\r\n- **PgBouncer custom Dockerfile** — edoburu/pgbouncer with password via build arg, port 5432\r\n- **Materialized Views** — `pages_stats_mv` + `pages_scope_stats_mv` for dashboard (ms instead of COUNT*)\r\n- **PITR Backup** — WAL archiving (wal_level=replica, archive_mode=on, pgwal volume)\r\n- **Async Embedding Queue** — capture returns instantly, batch worker processes in background\r\n- **HNSW Index Tuning** — m=16→32, ef_construction=400, ef_search×2 for 2M vectors\r\n- **k6 Load Testing** — `tests/loadtest.js` (200 concurrent users, health/search/capture)\r\n\r\n### Changed\r\n- **Container naming** — `gbrain-*` → `hc-sidecar-*` (consistent with repo name)\r\n- **API port** — internal 8100, Caddy on 8010 external\r\n- **Dashboard** — COUNT(*) queries replaced by materialized views\r\n- **Optimizer** — refreshes MV + auto-tier + dedup every cycle\r\n- **macOS Setup** — Colima as primary Docker fallback\r\n\r\n## 2.5.0 (2026-07-13)\r\n\r\n## 2.4.0 (2026-07-13)\r\n\r\n### Added\r\n- **Data-loss prevention** — pgvector pinned to `pgvector/pgvector:0.8.0-pg17` (nicht `:latest`), verhindert DB Volume Re-Init bei Auto-Updates\r\n- **Auto-Recovery** — bei `pages < 100` wird Hermes state.db automatisch im Hintergrund importiert\r\n- **DB Backup** — `migrations/backup_db.sh`: täglicher pg_dump mit 14 Tagen Retention\r\n- **15 Data-Loss Tests** — statische Analyse: pgvector-Pin, keine DROP TABLE pages, EMBEDDING_DIM portability, Recovery-Block in main.py\r\n- **CI Gated Pipeline** — 3 Jobs (lint→test→docker) ohne `continue-on-error`, Integration-Tests mit Docker Healthcheck\r\n- **Branch Protection** — main erfordert PR + 1 Review + CI-Checks\r\n- **Pre-push Hook** — `.githooks/pre-push` läuft vor jedem Push auf main\r\n\r\n### Fixed\r\n- **EMBEDDING_DIM** portabel gemacht (`${EMBEDDING_DIM}` statt hardcodiertem 1536 → funktioniert wieder mit Ollama)\r\n- **PGUSER/PGDATA** gesetzt → verhindert PostgreSQL Re-Init bei Container-Restart\r\n- **ALLOW_EMBEDDING_SCHEMA_RESET** nur auf embeddings-Tabelle (nicht pages)\r\n\r\n## 2.3.0 (2026-07-12)\r\n\r\n### Added\r\n- **Bi-temporal endpoints** — `/why/{id}` shows supersession chain + version history; `/timeline` shows all memory changes over time\r\n- **Memory Galaxy v3** — search bar, memory type dropdown, confidence filter in the Galaxy overlay with real-time node filtering\r\n- **MCP auto-discovery** — `mcp.json` manifest for Claude Desktop, VS Code, Cursor; 20 MCP tools total\r\n- **GitHub Actions CI** — 3-job pipeline: lint (syntax+flake8+mypy), test (pytest+coverage), docker build\r\n- **Expanded MCP tools** — `why_memory`, `bi_timeline` MCP tools for bi-temporal queries\r\n\r\n### Changed\r\n- AGENTS.md updated to v0.2.0 spec (32 lines, compact API table)\r\n- llms.txt updated with all new features\r\n- GitHub topics: +fastapi, +docker, +knowledge-graph, +ollama, +chat-memory, +semantic-search (19 total)\r\n\r\n## 2.2.0 (2026-07-12)\r\n\r\n### Added\r\n- **DB backup prevention** — `content_hash` column for idempotent re-imports\r\n- **Migration recovery** — `migrations/import_from_hermes_db.py` restores from Hermes state.db\r\n- **content_hash** — SHA-256 per memory, auto-set on capture, index for fast dedup\r\n- **Migration SQL** — `001_migrate_old_memories.sql` with full schema + indexes\r\n\r\n### Changed\r\n- Schema: `content_hash TEXT` + `idx_pages_content_hash` created on every API start\r\n- Memory loss on DB reset is recoverable: run migration script, re-imports idempotently\r\n\r\n## 2.1.0 (2026-07-12)\r\n\r\n### Added\r\n- **Ebbinghaus forgetting-curve decay** — `R=e^(-t/S)`, stability grows per spacing effect\r\n- **Deterministic Conflict Resolver** — ADD/NOOP/INVALIDATE via token Jaccard + embedding cosine\r\n- **Bi-temporal validity** — `valid_to`/`superseded_by`, superseded facts keep history\r\n- **Interaction-aware reinforcement** — capture=1.0, retrieve=0.15, nudge=0.10\r\n- **7-term hybrid score** — vector + lexical + retention + importance + recency + frequency - staleness\r\n- **10K-scale PG tuning** — shared_buffers=1GB, work_mem=64MB, random_page_cost=1.1\r\n- **Dynamic HNSW ef_search** — per query type (hybrid=80, vector=40, high_recall=400)\r\n- **Dashboard keyset pagination** — cursor-based statt OFFSET\r\n- **`/ask` Q&A endpoint** — natural language → vector + GraphRAG → LLM synthesis\r\n- **`/export` endpoint** — JSON/Markdown backup with graph entities\r\n\r\n### Changed\r\n- Optimizer: Ebbinghaus decay archive at retention<0.05 statt flat confidence*0.995\r\n- Search: SQL CTE hybrid score (kein Python merge/sort), 7-term weights\r\n- Capture pipeline: Conflict Resolver ersetzt simple find_similar_page\r\n\r\n## 1.6.0 (2026-07-11)\r\n\r\n### Added\r\n- **Dashboard UI integrations** — Tier badges (Hot/Warm/Cold), memory type filter, days back filter, Knowledge Graph link, Nudge link\r\n- **Interactive buttons** — 👍/👎 feedback on each memory, ✏️ inline editor modal, 🔗 merge with checkboxes\r\n- **Merge, Editor, Feedback, Nudge** — all new backend features now accessible from the Dashboard UI\r\n\r\n## 2.0.0 (2026-07-11)\r\n\r\n### Added\r\n- **Knowledge Graph** — entities + relationships + entity_mentions tables, rule-based entity extraction, depth-traversal graph queries (`/graph/*` endpoints)\r\n- **Memory Tiers** — Hot/Warm/Standard/Cold auto-assignment based on importance, recency, confidence\r\n- **Memory Versioning** — `memory_versions` table tracks every change with reason\r\n- **Memory Compression** — intelligent multi-line compression (keep first 40%, last 20%, compress middle)\r\n- **Memory Consolidation** — embedding-similarity clustering groups related memories into summarized parents\r\n- **Memory Merge** — `/memory/merge` endpoint merges multiple memories, reparents sources\r\n- **Memory Editor** — `/memory/update/{id}` inline content + type editing\r\n- **Memory Feedback** — `/feedback/{id}?helpful=true/false` adjusts importance + confidence\r\n- **Memory Nudge** — `/nudge` returns top important recent facts (inspired by Hermes Built-In nudges)\r\n- **Temporal Search** — `?days_back=N` filter on `GET /search`\r\n- **Self-wiring Graph** — 15 relation patterns (built/leads/part_of/implements/located_at/communicates/preceded_by + original 6)\r\n- **pgvector HNSW Index** — automatic HNSW index creation (falls back to IVFFlat)\r\n- **Auto-Sync Daemon** — background thread imports new Hermes sessions every 5 minutes\r\n\r\n### Changed\r\n- Capture pipeline now extracts entities + relationships + compressed version on every `POST /capture`\r\n- Optimizer loop runs tier assignment + consolidation every cycle\r\n- Dashboard auto-refresh uses JS setTimeout (galaxy stays open)\r\n- README comparison table expanded to 6 systems (Cognee, LangMem, Supermemory, gBrain, Mem0)\r\n\r\n## 1.5.0 (2026-07-11)\r\n\r\n### Added\r\n- CONTRIBUTING.md with PR review structure, linting, commit conventions, merge strategy\r\n- PR template (.github/PULL_REQUEST_TEMPLATE.md)\r\n- \"Contributions Welcome\" section in README and SKILL.md\r\n\r\n## 1.4.4 (2026-07-11)\r\n\r\n### Added\r\n- Document auto-import step in One-Click Install table\r\n\r\n## 1.4.3 (2026-07-11)\r\n\r\n### Added\r\n- Subtle CTA at end of README and SKILL.md\r\n\r\n## 1.4.2 (2026-07-11)\r\n\r\n### Added\r\n- Auto-Capture Cron section in SKILL.md (3 cron jobs for auto-install)\r\n\r\n## 1.4.1 (2026-07-11)\r\n\r\n### Added\r\n- One-Click Install section in SKILL.md\r\n\r\n## 1.4.0 (2026-07-11)\r\n\r\n### Added\r\n- Memory Galaxy Dashboard — interactive full-screen Canvas visualization\r\n\r\n## 1.3.1 (2026-07-11)\r\n\r\n_ClawHub auto-publish_\r\n\r\n## 1.1.0 (2026-07-11)\r\n- `secrets.yaml` — documented required environment secrets\r\n- `scripts/install.ps1` — install verification script (checks Python, deps, Sidecar)\r\n- `scripts/update.ps1` — update check script (compares with ClawHub)\r\n- `scripts/smoke_test.ps1` — comprehensive integration tests (8 test cases)\r\n- `README.md` — professional documentation with install steps and examples\r\n- `CHANGELOG.md` — version history\r\n\r\n### Changed\r\n- `scripts/memory.py` — major optimization:\r\n  - Structured `SidecarError` class with status/detail\r\n  - Timeout handling (15s) with ConnectionError fallback\r\n  - `ValueError` for empty text validation\r\n  - Config resolution extracted to `_resolve_config()` for testability\r\n  - `_show_result()` helper for clean output formatting\r\n  - Logger integration (debug mode)\r\n  - Input bounds clamping (`limit` capped 1–100)\r\n  - Type annotations throughout\r\n- `SKILL.md` — restructured with privacy disclosure and clearer sections\r\n\r\n### Fixed\r\n- All search results now return flat content strings (no raw JSON)\r\n- Empty captures properly rejected before API call\r\n- Connection errors handled gracefully instead of stack traces\r\n\r\n## 1.0.1 (2026-07-11)\r\n\r\n### Added\r\n- `skill-card.md` — ClawHub marketplace card\r\n- Privacy & consent disclosure in `SKILL.md`\r\n\r\n### Fixed\r\n- Security scan: privacy disclosure added to address SkillSpector findings\r\n\r\n## 1.0.0 (2026-07-11)\r\n\r\n### Added\r\n- Initial publish to ClawHub\r\n- `SKILL.md` with auto-capture/search/autosave instructions\r\n- `scripts/memory.py` CLI tool\n\nFile v2.9.0:skill-card.md\n\n## Description: <br>\nAuto-capture chat to Hermes DB, load context on fresh chats, scheduled DB maintenance. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[sunme1977](https://clawhub.ai/user/sunme1977) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agent users use this skill to persist selected conversation facts, preferences, project context, and session backups in a local HermesClawZero Sidecar, then retrieve relevant memory on future chats. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill asks the agent to silently store and reuse conversation data across sessions. <br>\nMitigation: Install only when the user explicitly accepts persistent memory behavior, and avoid storing sensitive or unrelated information. <br>\nRisk: Configuration can read a local Sidecar URL and API key from environment files. <br>\nMitigation: Verify MEM_PUBLIC_URL points to a trusted local service and avoid placing unrelated secrets in the readable .env file. <br>\nRisk: Background jobs and chat import can process past and future conversations. <br>\nMitigation: Enable cron jobs, chat backup, or import behavior only after explicit user approval. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory) <br>\n- [Artifact README](artifact/README.md) <br>\n- [Declared permissions](artifact/permissions.yaml) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown instructions with inline shell commands and configuration values] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May direct the agent to call a local Sidecar API for memory capture, search, and autosave.] <br>\n\n## Skill Version(s): <br>\n2.9.0 (source: evidence.release.version and SKILL.md frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v2.9.0:permissions.yaml\n\n# permissions.yaml\n# Declared permissions for hermesclawzero-auto-memory skill.\n# These are the MINIMUM required permissions — no unnecessary access.\n\nversion: 1\n\npermissions:\n  # Network access to the local HermesClawZero Sidecar API\n  - id: sidecar-http\n    description: \"HTTP access to the local Sidecar API (default http://localhost:8010)\"\n    type: network\n    allowed_hosts:\n      - \"localhost\"\n      - \"127.0.0.1\"\n    allowed_ports:\n      - 8010\n    protocols:\n      - http\n    justification: \"Required to capture/search/autosave memories via Sidecar API\"\n\n  # Filesystem access to .env config\n  - id: env-read\n    description: \"Read .env files for API_KEY and MEM_PUBLIC_URL configuration\"\n    type: filesystem\n    access: read\n    paths:\n      - \".env\"\n    justification: \"Required to load API credentials from project or script directory\"\n\n  # Background cron jobs (user must explicitly opt in)\n  - id: cron-gardener\n    description: \"Nightly memory tagging job (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 3 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\gardener.py\"\n    justification: \"Optional DB maintenance — tags unlabeled memories\"\n\n  - id: cron-reminder\n    description: \"Daily memory highlight push (user-enabled only)\"\n    type: cron\n    enabled_by_default: false\n    schedule: \"0 9 * * *\"\n    command: \"python C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\daily_reminder.py\"\n    justification: \"Optional daily summary — pushes reminders via Telegram\"\n\nFile v2.9.0:secrets.yaml\n\n# secrets.yaml\n# Environment secrets required by hermesclawzero-auto-memory.\n\nversion: 1\n\nsecrets:\n  - name: API_KEY\n    description: \"API key for HermesClawZero Sidecar authentication.\"\n    required: true\n    source: env\n    env_var: API_KEY\n    sensitive: true\n\n  - name: MEM_PUBLIC_URL\n    description: \"Base URL of the HermesClawZero Sidecar API.\"\n    required: false\n    source: env\n    env_var: MEM_PUBLIC_URL\n    default: \"http://localhost:8010\"\n    sensitive: false\n\nArchive v2.7.0: 12 files, 20102 bytes\n\nFiles: CHANGELOG.md (10216b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2816b), SKILL.md (8181b), _meta.json (145b)\n\nFile v2.7.0:SKILL.md\n\n---\r\nname: \"hermesclawzero-auto-memory\"\r\ndescription: \"Auto-capture chat to Hermes DB, load context on fresh chats, scheduled DB maintenance.\"\r\nversion: \"2.7.0\"\r\ntags:\r\n  - memory\r\n  - hermes\r\n  - persistence\r\n  - vector-search\r\ncategories:\r\n  - agents\r\n  - knowledge\r\ntopics:\r\n  - Memory\r\n  - Vector Search\r\n  - Chat Persistence\r\n  - pgvector\r\n  - Embeddings\r\n---\r\n\r\n# HermesClawZero Auto Memory\r\n\r\nAutomatically captures conversation context to HermesClawZero DB so the agent remembers across sessions. Loads relevant memories on fresh chats and supports scheduled DB maintenance.\r\n\r\n> 🌌 **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.\r\n\r\n---\r\n\r\n## 🤖 One‑Click Install\r\n\r\nPaste this into **Hermes**, **OpenClaw**, or any AI agent:\r\n\r\n```text\r\nInstall this project from GitHub:\r\nhttps://github.com/SunMe1977/HermesClawZero-ConfigSidecar\r\n```\r\n\r\n**⬆️ The agent clones, configures, and starts everything.**  \r\nAfter ~30s open → [`http://localhost:8010/dashboard`](http://localhost:8010/dashboard)\r\n\r\n### What gets installed:\r\n| Step | What happens |\r\n|------|-------------|\r\n| 1 | Repo cloned + `.env` configured |\r\n| 2 | Docker Compose starts PostgreSQL + Ollama + API |\r\n| 3 | Dashboard live on `:8010` |\r\n| 4 | Memory skill activated in Hermes |\r\n| 5 | **Auto-import:** All existing Hermes sessions + messages are migrated into the Sidecar DB on first API startup — no manual migration needed |\r\n| 6 | Auto-capture begins on next conversation |\r\n\r\n### Manual start (if you don't have an agent):\r\n```bash\r\ngit clone https://github.com/SunMe1977/HermesClawZero-ConfigSidecar.git\r\ncd HermesClawZero-ConfigSidecar\r\nsetup.bat          # Windows   (or: ./setup.sh on Linux)\r\nstart.bat          # Windows   (or: ./start.sh on Linux)\r\n```\r\n\r\n---\r\n\r\n## ⚠️ Privacy & Consent\r\n\r\nBy activating this skill you consent to automatic memory capture.\r\n\r\n- **Data stays local** — all processing runs via the Sidecar API on your machine; no third-party data sharing  \r\n- **Captures structured facts** — the agent summaries and stores key information, not raw chat logs\r\n- **Cron jobs** (nightly gardener, daily reminder) are only created when you explicitly ask to set them up\r\n\r\n## Script Path\r\n\r\n```bash\r\n# The CLI lives alongside the sidecar, NOT in the skill directory:\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py <command> \"<text>\"\r\n```\r\n\r\nConfig is read from `.env` or env vars (`MEM_PUBLIC_URL`, `API_KEY`) automatically.\r\n\r\n---\r\n\r\n## 🔄 Auto-Capture Cron (Setup on Install)\r\n\r\nWhen a user runs the one-click install (or says \"install this skill\"), **set up these cron jobs automatically:**\r\n\r\n### A. Session Memory Capture — every 30m\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-auto-capture\" \\\r\n  --schedule \"30m\" \\\r\n  --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.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n### B. Nightly Memory Gardener (auto-tagging)\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-memory-gardener\" \\\r\n  --schedule \"0 3 * * *\" \\\r\n  --prompt \"Run python memory.py gardener to auto-tag uncategorized memories. Report only errors.\" \\\r\n  --script \"C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py\" \\\r\n  --no-agent true\r\n```\r\n\r\n### C. Daily Reminder (opt-in, ask first)\r\nOnly if user says yes:\r\n```bash\r\nhermes cron create \\\r\n  --name \"hermes-daily-reminder\" \\\r\n  --schedule \"0 9 * * *\" \\\r\n  --prompt \"Summarize yesterday's top memories and remind user of open items.\" \\\r\n  --skills hermesclawzero-memory\r\n```\r\n\r\n> All three run silently — the user won't see cron output unless something fails.\r\n\r\n---\r\n\r\n## 1. Auto-Load on Fresh Chat (Session Start)\r\n\r\n**When:** Every new session begins (you receive context that it's a fresh chat).\r\n\r\n**What to do:**\r\n1. Silently run: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"user profile preferences current project state\" 5`\r\n2. Absorb the returned context internally.\r\n3. **Do not** output raw JSON or mention the search to the user unless they explicitly ask.\r\n\r\n---\r\n\r\n## 2. Auto-Capture — Deterministic Triggers\r\n\r\n**When to capture** (run `memory.py capture \"...\"` immediately):\r\n\r\n| Trigger | Example | What to capture |\r\n|---|---|---|\r\n| **New fact stated** | \"I live in Berlin\" | `\"User lives in Berlin\"` |\r\n| **Preference revealed** | \"I prefer dark mode\" | `\"User prefers dark mode in all UIs\"` |\r\n| **Instruction given** | \"Call me Hans\" | `\"User's name is Hans, goes by Hans\"` |\r\n| **Project detail shared** | \"Working on DiskRaptor v0.3\" | `\"Current project: DiskRaptor v0.3, focus on UI tests\"` |\r\n| **Decision made** | \"Let's go with PostgreSQL\" | `\"Chose PostgreSQL for the data layer\"` |\r\n| **Error/blocker mentioned** | \"The build fails on Windows\" | `\"DiskRaptor: build fails on Windows, needs investigation\"` |\r\n| **Tool/config change** | \"I set up Ollama on port 11435\" | `\"Ollama configured on port 11435\"` |\r\n| **User corrects you** | \"No, the port is 8080 not 3000\" | `\"Corrected: server runs on port 8080\"` |\r\n\r\n**How to capture:**\r\n```bash\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<concise summary of the fact>\"\r\n# Optional: pass a scope_id for logical grouping\r\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"<fact>\" \"project_name\"\r\n```\r\n\r\n**Do NOT capture when:**\r\n- User is just making small talk (\"hello\", \"thanks\", \"ok\")\r\n- User is asking a question (capture the *answer/fact*, not the question)\r\n- User is giving multi-turn instructions that aren't final yet (wait for resolution)\r\n- The information is already captured (avoid duplicates)\r\n- The information is temporary/throwaway (\"let me try something real quick\")\r\n\r\n**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.\r\n\r\n---\r\n\r\n## 3. Full Chat History Sync (On Request)\r\n\r\n**When:** User explicitly asks to back up the session (\"save this chat\", \"backup session\").\r\n\r\n**What to do:**\r\n1. Use `sessions_history` to get the current visible session.\r\n2. Format messages into a text summary.\r\n3. Execute: `python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"<formatted_chat_history>\" \"chat_backup.md\"`\r\n\r\n---\r\n\r\n## 4. Automated Database Maintenance (Cron Jobs)\r\n\r\n**When:** User asks to \"setup memory background jobs\" or \"enable memory maintenance\".\r\n\r\nCreate these cron jobs:\r\n\r\n**A. Nightly Memory Gardener (Auto-tagging):**\r\n- Name: `hermes-memory-gardener`\r\n- Expression: `0 3 * * *` (daily 3:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\gardener.py`\r\n\r\n**B. Daily Memory Highlight (Telegram Push):**\r\n- Name: `hermes-daily-reminder`\r\n- Expression: `0 9 * * *` (daily 9:00 AM)\r\n- Session target: isolated\r\n- AgentTurn message: `exec python C:\\dev\\HermesClawZero-ConfigSidecar\\daily_reminder.py`\r\n\r\nCurrent cron jobs already exist for both (checked during setup).\r\n\r\n---\r\n\r\n## Quick Reference\r\n\r\n```bash\r\n# Load context (session start, silent):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py search \"user profile preferences current project state\" 5\r\n\r\n# Save a fact (deterministic triggers above):\r\npython C:\\\\dev\\\\HermesClawZero-ConfigSidecar\\\\memory.py capture \"<fact>\" [scope_id]\r\n\r\n# Backup sess\n\nArchive v2.6.0: 12 files, 19463 bytes\n\nFiles: CHANGELOG.md (9171b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2329b), SKILL.md (8181b), _meta.json (145b)\n\nArchive v2.5.1: 12 files, 19461 bytes\n\nFiles: CHANGELOG.md (9171b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2331b), SKILL.md (8181b), _meta.json (145b)\n\nArchive v2.5.0: 12 files, 19597 bytes\n\nFiles: CHANGELOG.md (9148b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2601b), SKILL.md (8181b), _meta.json (145b)\n\nArchive v2.4.0: 12 files, 19088 bytes\n\nFiles: CHANGELOG.md (8099b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2654b), SKILL.md (8181b), _meta.json (145b)\n\nArchive v2.3.0: 12 files, 18395 bytes\n\nFiles: CHANGELOG.md (7015b), install_skill.ps1 (585b), permissions.yaml (1530b), README.md (6256b), scripts/install.ps1 (1552b), scripts/memory.py (8140b), scripts/smoke_test.ps1 (2329b), scripts/update.ps1 (1368b), secrets.yaml (474b), skill-card.md (2263b), SKILL.md (8181b), _meta.json (145b)","readmeExcerpt":"Skill: Openclaw Auto Memory Skill Owner: sunme1977 Summary: Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat... Tags: latest:3.0.2 Version history: v3.0.2 | 2026-07-14T20:00:11.013Z | auto - Added a new logo file (logo.svg) to the project. - No code or documentation changes; functionality remains the same. v3.","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"openclaw skills install hermesclawzero-auto-memory"},{"language":"bash","snippet":"MEM_PUBLIC_URL=http://localhost:8010\nAPI_KEY=your_api_key_here"},{"language":"bash","snippet":"python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"hello world\" 3"},{"language":"text","snippet":"── Session 1 ──\nYou: \"Hey, I'm Hans. I work on DiskRaptor v0.3, mostly UI tests.\"\nAgent: *silently captures: \"User's name is Hans\", \"Working on DiskRaptor v0.3\", \"Focus: UI tests\"*\nAgent: \"Hi Hans! What would you like to do with DiskRaptor today?\"\n\nYou: \"I prefer dark mode in all my tools.\"\nAgent: *silently captures: \"User prefers dark mode in all UIs\"*\n\nSome time passes. A new session starts.\n\n── Session 2 (fresh chat) ──\nAgent: *silently loads past memories*\nAgent: \"Welcome back, Hans! Last time you were working on DiskRaptor v0.3 UI tests.\n       Shall we pick that up, or is there something new?\""},{"language":"bash","snippet":"# Capture a fact\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py capture \"User prefers dark mode\" ui_preferences\n\n# Search memories\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"project preferences\" 5\n\n# Backup session history\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py autosave \"$(cat backup.md)\" \"session_backup.md\""},{"language":"bash","snippet":"python C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"test\" 1"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\r\nname: \"hermesclawzero-auto-memory\"\r\ndescription: \"Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimization, multi-tenant dashboard with pgvector search.\"\r\nversion: \"3.0.0\"\r\ntags:\r\n  - memory\r\n  - hermes\r\n  - auto-capture\r\n  - governance\r\nenforce:\r\n  - id: foundation-rule\r\n    priority: critical\r\n    rule: \"Agent MUSS alle enforce-Regeln befolgen; sie stehen über Memory.\"\r\n    policy:\r\n      tool: \"*\"\r\n      pattern: \"*\"\r\n      action: allow\r\n      reason: \"Foundation rule — enables all other policies.\"\r\n  - id: deny-destructive-git-docker\r\n    priority: critical\r\n    rule: \"Terminal: git push, merge, reset, destructive rm, and Docker prune/rm are blocked.\"\r\n    policy:\r\n      tool: terminal\r\n      pattern: \"git push*|git merge*|git reset*|rm -*|docker system prune*|docker volume rm*|docker image rm*\"\r\n      action: deny\r\n      reason: \"Destructive git/Docker operations require explicit user approval.\"\r\n  - id: prompt-file-changes\r\n    priority: high\r\n    rule: \"Vor jeder Dateiänderung, Commit oder destruktiven Aktion Bestätigung einholen.\"\r\n    policy:\r\n      tool: terminal|file\r\n      pattern: \"git commit*|git push*|rm *|mv *|cp *|chmod*|chown*\"\r\n      action: prompt\r\n      reason: \"Ask user before modifying files or git state.\"\r\n  - id: persist-corrections\r\n    priority: high\r\n    rule: \"User-Korrekturen sofort als Memory speichern.\"\r\n    policy:\r\n      tool: memory\r\n      pattern: \"correction|wrong|fix|error\"\r\n      action: always\r\n      reason: \"User feedback must be persisted immediately.\"\r\ncategories:\r\n  - agents\r\n  - knowledge\r\ntopics:\r\n  - Memory\r\n  - Vector Search\r\n  - Chat Persistence\r\n  - pgvector\r\n  - Embeddings\r\n---\r\n\r\n# HermesClawZero Auto Memory\r\n\r\nAutomatically captures conversation context to HermesClawZero DB so the agent remembers across sessions. Loads relevant memories on fresh chats and supports scheduled DB maintenance.\r\n\r\n> 🌌 **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.\r\n\r\n> ⚡ **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.\r\n\r\n> **🧠 Shared Brain**\r\n\r\n## 🤖 One‑Click Install\r\n\r\nPaste this into **Hermes**, **OpenClaw**, or any AI agent:\r\n\r\n```text\r\nInstall this project from GitHub:\r\nhttps://github.com/SunMe1977/HermesClawZero-ConfigSidecar\r\n```\r\n\r\n**⬆️ The agent clones, configures, and starts everything.**  \r\nAfter ~30s open → [`http://localhost:8010/dashboard`](http://localhost:8010/dashboard)\r\n\r\n> **🧠 Shared Brain** — Hermes and OpenClaw share the same memory store simultaneously.\r\n>\r\n> **v3.0.0 führt enforce-Regeln ein. Alte Memory-Regeln entfernt. Enforce ist jetzt die verbindliche Governance-Schicht.**\r\n>\r\n> Both agent"},{"path":"README.md","content":"# HermesClawZero Auto Memory\n\n[![ClawHub](https://img.shields.io/badge/ClawHub-hermesclawzero--auto--memory-blue)](https://clawhub.ai/sunme1977/skills/hermesclawzero-auto-memory)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\n**Your agent remembers across conversations.** Facts, preferences, project context, past decisions — the agent captures them automatically and loads relevant context on every new session.\n\nAll processing runs **locally** via HermesClawZero Sidecar (PostgreSQL + pgvector + Ollama for embeddings). No data leaves your machine.\n\n---\n\n## Features\n\n| Capability | What it means for you |\n|---|---|\n| **Auto-Capture** | Agent saves new facts, preferences, and project details *as you talk* — no manual saving needed |\n| **Auto-Load** | On fresh chats, the agent searches past memories and picks up where you left off |\n| **Semantic Search** | Finds memories by meaning, not just keywords (hybrid vector + lexical) |\n| **Chat Backup** | Say \"save this session\" and get a full searchable snapshot |\n| **DB Maintenance** | Optional nightly tagging + daily reminders (cron, opt-in) |\n\n---\n\n## Quickstart (3 minutes)\n\n### 1. Install\n\n```bash\nopenclaw skills install hermesclawzero-auto-memory\n```\n\n### 2. Configure\n\nThe memory.py CLI lives at `C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py`.  \nIt reads config from `.env` or environment variables.\n\nCreate or edit your `.env` with:\n\n```bash\nMEM_PUBLIC_URL=http://localhost:8010\nAPI_KEY=your_api_key_here\n```\n\n> 💡 `MEM_PUBLIC_URL` points to the HermesClawZero Sidecar API. Default is `http://localhost:8010`.\n> `API_KEY` must match the `API_KEY` in your Sidecar's `.env`.\n\n### 3. Verify connectivity\n\n```bash\npython C:\\dev\\HermesClawZero-ConfigSidecar\\memory.py search \"hello world\" 3\n```\n\nIf the Sidecar is running, you'll see matching memories (or no output if the DB is empty — that's fine).\n\n### 4. Done! The skill is active.\n\nNow when you talk to the agent, it will:\n- **Silently load** context from past memories on fresh sessions\n- **Automatically capture** new facts, preferences, and project details\n- **Respond without re-introducing** who you are or what you're working on\n\n---\n\n## Example Workflow\n\n```\n── Session 1 ──\nYou: \"Hey, I'm Hans. I work on DiskRaptor v0.3, mostly UI tests.\"\nAgent: *silently captures: \"User's name is Hans\", \"Working on DiskRaptor v0.3\", \"Focus: UI tests\"*\nAgent: \"Hi Hans! What would you like to do with DiskRaptor today?\"\n\nYou: \"I prefer dark mode in all my tools.\"\nAgent: *silently captures: \"User prefers dark mode in all UIs\"*\n\nSome time passes. A new session starts.\n\n── Session 2 (fresh chat) ──\nAgent: *silently loads past memories*\nAgent: \"Welcome back, Hans! Last time you were working on DiskRaptor v0.3 UI tests.\n       Shall we pick that up, or is there something new?\"\n```\n\n## Deterministic Capture Triggers\n\nThe agent captures when you share:\n\n| Trigger | Example | Gets captured |\n|---|---|---|\n| **Name / identity** | \"Call me Hans\" | `\"User's name is Ha"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn72qpcz7hn4drhmgfd6d36x6n89zr3z\",\n  \"slug\": \"hermesclawzero-auto-memory\",\n  \"version\": \"3.0.2\",\n  \"publishedAt\": 1784059211013\n}"},{"path":"references/enforce-architecture.md","content":"# Enforce Governance Architecture — v2 Proposal\n\n## Current Architecture\n\n```\nSystem Prompt\n↓\nEnforce Rules\n↓\nLong-Term Memory\n↓\nConversation\n↓\nUser\n```\n\n## Proposed Two-Layer Architecture\n\n### Layer 1 – Prompt Governance (existing)\nParse `enforce:` from SKILL.md → inject rules above memory → preserve priority ordering.\n\n### Layer 2 – Runtime Policy Engine (new)\nValidates every dangerous action before execution:\n\n```\nLLM\n↓\nAction Proposal\n↓\nPolicy Engine\n↓\nAllowed?\n  ├─ Yes → Execute\n  └─ No  → BLOCKED + reason\n```\n\n### Structured Policies replace free-text rules\n\n```yaml\nenforce:\n  - priority: critical\n    rule: \"Never push directly to main.\"\n    policy:\n      tool: terminal\n      pattern: \"git push origin main\"\n      action: deny\n      reason: \"Direct pushes to main are not allowed.\"\n```\n\n### Policy Resolution\n`critical > high > medium` — most restrictive rule wins. `allow + deny = deny`.\n\n### Audit Log\nEvery blocked/approved action: timestamp, action, tool, rule matched, decision, reason.\n\n### Plugin Architecture\n`GitPolicy`, `FilesystemPolicy`, `DockerPolicy`, `ShellPolicy`, `DatabasePolicy`, `MCPPolicy`, `CustomSkillPolicies`.\n\n### Final Architecture\n\n```\nSystem Prompt\n↓\nEnforce Rules (Layer 1)\n↓\nLong-Term Memory\n↓\nConversation\n↓\nLLM Decision\n↓\nRuntime Policy Engine (Layer 2)\n↓\nTool Execution\n```\n\nThree independent layers: **Memory** (facts), **Governance** (behavior), **Execution** (actions)."},{"path":"CHANGELOG.md","content":"# Changelog\r\n\r\n## 3.0.0 (2026-07-14)\r\n\r\n### Breaking\r\n- **Enforceable Skill Rules** — Skills can now define `enforce:` rules with `priority: critical`. Rules appear as structured directives above memory in every turn. Agents must follow them.\r\n- **Loader ready** — `scripts/enforce_loader.py` parses SKILL.md frontmatter and outputs injectable YOU-MUST directives.\r\n- **Kaskadierung** — Child skills inherit enforce rules from parent skills. Loader scans all loaded skills.\r\n\r\n### Added\r\n- **scripts/enforce_loader.py** — CLI tool to extract enforce rules from any installed skill\r\n- **README enforce notice** — v3.0.0 führt enforce-Regeln ein. Alte Memory-Regeln entfernt. Enforce ist jetzt die Governance-Schicht.\r\n\r\n### Fixed\r\n- **Galaxy \"loading\" fix** — scope mapping now correctly matches unscoped items (`__unscoped__`), all items loaded (up to 20000), deadlock protection via lock_timeout\r\n- **Favicon 401** — `/favicon.ico`, `/favicon.svg`, `/site.webmanifest` served at root, bypass auth\r\n- **Unscoped in MV** — materialized view now includes empty/NULL scope_ids directly\r\n\r\n## 2.9.0 (2026-07-13)\r\n\r\n### Added\r\n- **Unscoped galaxy tenant** — memories without scope_id now show as 📂 Unscoped tenant\r\n- **Fire-and-forget update** — dashboard update no longer hangs (response completes before container restart)\r\n- **Shared Brain documentation** — README + SKILL.md document Hermes+OpenClaw shared memory\r\n- **OPENCLAW_SCOPE_PREFIX** — env var for separate OpenClaw scope tagging\r\n- **Pre-rebuild backup + docker prune** — start scripts now run backup + cleanup before rebuild\r\n\r\n### Fixed\r\n- **Galaxy unscoped display on Linux** — all 3800+ memories now visible as planets\r\n- **Galaxy tags column** — query now uses subquery from tags table (was crashing silently)\r\n\r\n## 2.7.0 (2026-07-13)\r\n\r\n### Added\r\n- **Memory Galaxy real content** — hover shows actual stored text, importance, tags, date\r\n- **Memory Galaxy all nodes** — up to 40 planets per scope, enriched with real data\r\n- **Playwright dashboard test** — CI verifies dashboard renders without errors\r\n- **BOM-safe .env writing** — setup.ps1 no longer writes UTF-8 BOM\r\n\r\n### Fixed\r\n- **Galaxy query timeout** — uses PK index (`id > MAX(id)-250`) instead of `ORDER BY created_at`\r\n- **Non-existent `tags` column** — galaxy items query now uses subquery from `tags` table\r\n- **Dashboard raw CSS** — fixed broken `</style>` tag that rendered CSS as text\r\n- **`API_URL` warning** — silenced with empty default in docker-compose\r\n- **PgBouncer `:latest` pin** — pinned by SHA256 digest (no version tags available)\r\n\r\n### Changed\r\n- **Type hints** added to auth, db, update, embedding_queue, scoring modules\r\n- **Shared route helpers** extracted to `routes/_shared.py`\r\n- **Docker builds** — `.dockerignore` reduces image size by ~237MB\r\n\r\n## 2.5.1 (2026-07-13)\r\n\r\n### Added\r\n- **Multi-Replica API** — Redis + Caddy load balancer, 2 API instances (api1/api2)\r\n- **PgBouncer custom Dockerfile** — edoburu/pgbouncer with password via build"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat... Skill: Openclaw Auto Memory Skill Owner: sunme1977 Summary: Unified memory platform for Hermes, OpenClaw and AI agents — persistent long-term memory, cross-skill sharing, automated capture, governance rules, optimizat... Tags: latest:3.0.2 Version history: v3.0.2 | 2026-07-14T20:00:11.013Z | auto - Added a new logo file (logo.svg) to the project. - No code or documentation changes; functionality remains the same. v3.","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1718,"uniquenessScore":50,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T16:40:16.167Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T16:40:16.167Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:50:32.342Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}