hermes-memory-sync

Extract daily conversation summaries from Hermes Agent session logs and persist them as readable memory files. Covers the Python extraction script, cron setup, and output format.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "hermes-memory-sync" with this command: npx skills add realpda/hermes-memory-sync

Hermes Memory Sync

Automated daily memory extraction from Hermes Agent session logs. Reads session JSON/JSONL files, groups conversations by day, extracts key topics/decisions/tools used, and writes structured summaries to workspace/memory/YYYY-MM-DD.md.

When to Use

  • Setting up memory persistence for Hermes Agent (beyond built-in memory/session_search)
  • Recovering or backfilling memory from earlier sessions
  • Creating a human-readable daily log of what was discussed
  • Auditing session history by topic or tool usage

Installation

1. Place the script

Copy hermes-memory-sync.py to your workspace:

# Windows
copy hermes-memory-sync.py C:\path\to\workspace\

# Linux/macOS
cp hermes-memory-sync.py ~/workspace/

2. Verify

cd /path/to/workspace
python hermes-memory-sync.py stats

Expected output: shows active days, total messages, sessions, and existing memory files.

Usage

# Show coverage gaps between sessions and existing memory files
python hermes-memory-sync.py compare

# Backfill today's memory
python hermes-memory-sync.py backfill today

# Backfill a specific date
python hermes-memory-sync.py backfill 2026-05-03

# Backfill all missing dates (first-time setup)
python hermes-memory-sync.py backfill all

# Show stats
python hermes-memory-sync.py stats

Cron Setup (Hermes Native)

Use Hermes' built-in cron to run daily at 3 AM:

cronjob action=create name="memory-sync-daily"
  prompt="Run Hermes memory sync: cd /path/to/workspace && python hermes-memory-sync.py backfill today"
  schedule="0 3 * * *"

The cron job creates files at workspace/memory/YYYY-MM-DD.md each morning.

Output Format

Each memory file contains:

# 📅 YYYY-MM-DD

**会话数:** N | **消息总数:** N
**用户提问:** N | **助手回复:** N | **工具调用:** N
**使用的模型:** model1, model2

## 🎯 讨论主题
- Topic 1
- Topic 2

## 💬 关键对话
**Q:** User question...
> **A:** Assistant response...

## ⚡ 决策/方案
- Decision item...

## 🛠️ 工具使用
- Tool call summary...

---
*自动生成于 YYYY-MM-DD HH:MM,来自 N 个会话*

Supported Session Files

The script reads two types of Hermes session data:

1. session_*.json (full session records)

  • Located at %LOCALAPPDATA%/hermes/sessions/ (Windows)
  • Complete conversation history with messages array
  • Includes session_id, model, platform, session_start

2. YYYYMMDD_HHMMSS_*.jsonl (per-message logs)

  • Same sessions directory
  • One JSON object per line with {role, content, timestamp}
  • Uses Hermes format (NOT OpenClaw format)

Pitfalls

  • Memory usage — periodically review and consolidate memory entries. Over-full memory causes truncation and lost context.
  • JSONL vs JSON confusion — The sessions directory contains both .jsonl and .json files. The script handles both, but request_dump_*.json files (individual request/response dumps) are intentionally skipped to avoid duplication.
  • Don't confuse with ClawHub memory-sync — That skill is designed for OpenClaw's JSONL format ({type, message} schema). This Hermes-native implementation directly parses Hermes format ({role, content} schema). See clawhub-skills-install skill for format differences.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

SPIRIT State Sync

State Preservation & Identity Resurrection Infrastructure Tool (SPIRIT). Preserves AI agent identity, memory, and projects to a private Git repository. NEW:...

Registry SourceRecently Updated
8120Profile unavailable
Security

MEMORY.md Manager - 长期记忆管理 (安全版)

自动创建并每日智能筛选更新 MEMORY.md 长期记忆文件,支持敏感信息脱敏和多服务商 API 安全调用。

Registry SourceRecently Updated
980Profile unavailable
Coding

Agent Comm Hub

多智能体消息转发与上下文共享中间件 — 基于 MCP 协议实现 agent 间通信与任务协同。支持多 Agent 接入,提供标准 MCP 工具接口和本地 SQLite 存储。

Registry SourceRecently Updated
Coding

Claw Sync

Secure sync for OpenClaw memory and workspace. Use /sync to push, /restore to pull, /sync-status to check. Supports versioned backups and disaster recovery.

Registry SourceRecently Updated
3.4K6Profile unavailable