360 Secure SkillHub
360 安全技能中心

Hermesclawzero Auto Memory

该技能在对话中自动把用户新事实、偏好与项目信息写入本地 PostgreSQL+pgvector 记忆库,新会话开始时搜索并静默加载上下文,可按需备份整段会话,并可配置每日自动打标与提醒的定时任务;脚本与 Sidecar 路径硬编码在固定 Windows 目录下。

sunme1977
sunme1977
热度 59.12
最近更新 2026-07-11 20:05:11
分类:知识依赖:代码执行 / 读写文件 / 第三方 API应用场景:笔记整理 / 摘要总结 / 日程安排 / 自动化脚本 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add sunme1977/hermes-skill
Metadata
name
hermesclawzero-auto-memory
description
Auto-capture chat to Hermes DB, load context on fresh chats, scheduled DB maintenance.

HermesClawZero Auto Memory

Automatically saves meaningful chat input to HermesClawZero DB, loads user context on fresh sessions, and manages automated DB maintenance.

⚠️ Privacy & Consent

This skill captures and persistently stores conversation content in a local PostgreSQL+pgvector database. By activating this skill you consent to automatic memory capture.

  • Data stays local — all processing runs via the Sidecar API on your machine; no third-party data sharing
  • Background jobs (cron) are only created when you explicitly ask to set them up
  • Captures only meaningful facts — the agent summaries and saves key information, not raw chat logs

Script Path

The memory.py CLI lives alongside the sidecar at: C:\dev\HermesClawZero-ConfigSidecar\memory.py

It reads API config from .env or env vars (MEM_PUBLIC_URL, API_KEY) automatically.

1. Auto-Load on Fresh Chat

When a new session starts, load the user's profile and recent context:

  • Execute: python C:\dev\HermesClawZero-ConfigSidecar\memory.py search "user profile preferences current project state" 5
  • Silently absorb the context. Do not output raw JSON to the user unless they ask.

2. Auto-Save (Continuous Capture)

During conversation, if the user shares a new fact, instruction, preference, project detail, or anything worth remembering, immediately capture it:

  • Execute: python C:\dev\HermesClawZero-ConfigSidecar\memory.py capture "<Concise summary of the user's input or new fact>"
  • Optionally pass a scope_id (e.g. project name) for logical grouping.
  • Do not pass a chat_id — that makes memories unfindable via default search. Omitting it stores in chat_id=global.

3. Full Chat History Sync (On Request)

If the user asks to back up the current session:

  1. Use sessions_history to get the current visible session.
  2. Format messages into a text summary.
  3. Execute: python C:\dev\HermesClawZero-ConfigSidecar\memory.py autosave "<formatted_chat_history>" "chat_backup.md"

4. Automated Database Maintenance (Cron Jobs)

HermesClawZero requires periodic background jobs for tagging memories and push reminders.

When the user asks to "setup memory background jobs", create these cron jobs:

A. Nightly Memory Gardener (Auto-tagging):

  • Name: hermes-memory-gardener
  • Expression: 0 3 * * * (3:00 AM daily)
  • Session target: isolated
  • AgentTurn message: exec python C:\dev\HermesClawZero-ConfigSidecar\gardener.py

B. Daily Memory Highlight (Telegram Push):

  • Name: hermes-daily-reminder
  • Expression: 0 9 * * * (9:00 AM daily)
  • Session target: isolated
  • AgentTurn message: exec python C:\dev\HermesClawZero-ConfigSidecar\daily_reminder.py

Current cron jobs already exist for both (checked during setup).