Claude Skill
dztabel-happy/openclaw-memory-fusion
OpenClaw Memory Fusion provides a zero-plugin, zero-intrusion three-tier cron memory pipeline for Claude Skill, ensuring automatic extraction, distillation, and consolidation for never-forgetting c...
Overview
Repository
Install this Skill
git clone https://github.com/dztabel-happy/openclaw-memory-fusion.gitRegistry
Summary
OpenClaw Memory Fusion is a zero-plugin, zero-intrusion memory solution for Claude Skill that implements a three-tier cron-based memory pipeline: automatic extraction, distillation, and consolidation. It ensures persistent, never-forgetting context across sessions without modifying any existing code.
🧠 OpenClaw 融合记忆方案 — 三层 cron 自动记忆提取/蒸馏/巩固,零插件、零侵入、永不失忆
Key features
- Three-tier cron pipeline: extraction, distillation, consolidation
- Zero plugin and zero intrusion – no code modification required
- Automatic memory persistence across Claude Skill sessions
- Never-forgetting context with scheduled memory refresh
- Lightweight Python implementation for easy integration
Use cases
- Maintain long-term conversation context in Claude Skill
- Automate memory management for AI assistants
- Build persistent knowledge bases without external plugins
- Enhance Claude Skill with session-spanning recall
- Simplify memory workflows for developers and power users
README excerpt
# OpenClaw Memory Fusion > 一套基于 OpenClaw 原生能力的「永不失忆」融合记忆方案:**不漏、去噪、防套娃、可运维、可升级**。 这套方案的核心理念是: - **事实源**来自本地 session JSONL(而不是 `sessions_list/sessions_history`) - **提炼**来自 LLM(但只喂干净、可控的高信号输入) - **落盘**来自 Markdown(可审计、可迁移、可被 QMD 搜索) 说明: - OpenClaw 近版本已经提供 **pre-compaction memory flush** 与可选的 **`session-memory` hook** - 本仓库的定位不是替代官方 memory,而是在其上补强 **deterministic 提取**、**isolated cron 可见性** 与 **Telegram 可观测运维** ## 为什么需要这个? OpenClaw 官方现在已经提供默认的 memory flush,并且可以用 hook 在 `/new` 前做补充快照;这些能力很好,也建议保留。 本方案聚焦的是另一层问题: - `--session isolated` 的后台任务仍可能遇到 session 可见性与上下文膨胀问题 - 你可能希望**固定时刻**运行三段记忆整理,而不是把它们并入 heartbeat - 你可能希望**每次任务结果都投递到 Telegram 群/话题**,形成可巡检的运营面板 因此这里保留 **三层 cron**,但尽量与官方 memory / QMD / config hot reload 的当前做法对齐。 ## 参考与融合来源 | 来源 | 我们采纳/改良的点 | |---|---| | Calicastle 三层架构 | Hourly/Daily/Weekly 分层分频 | | Linux.do 终极记忆系统 | 去噪、剪枝、MEMORY.md 软上限思路 | | OpenClaw 官方 | QMD 后端(BM25+向量+reranking)与 sessions transcript 索引 | 链接(仅供阅读,不影响运行): - Calicastle: https://x.com/calicastle/status/2021229394724102229 - Linux.do: https://linux.do/t/topic/1621623 - OpenClaw Memory/QMD: https://docs.openclaw.ai/concepts/memory ## 你会得到什么(优势) ### 1) isolated cron 下也不会“看不到主会话” 很多实现依赖 `sessions_list(activeMinutes=...)`,但在 `--session isolated` 的 cron 中,工具可见性可能被限制为“当前 session tree”,造成漏读。 当前推荐同时给 cron job 开启 `--light-context`,避免后台任务把整套 bootstrap context 带满。 本方案把 **`~/.openclaw/agents/<agent>/sessions/`** 作为唯一事实来源: - `*.jsonl`(活跃会话持续 append) - `*.jsonl.reset.*`(`/new` 归档) ### 2) 增量游标按 byte offset:不丢不重 - 每个文件维护一个 **byte offset cursor**(写在 `memory/_state/*.json`) - 只推进到最后一个完整换行(容忍半行 JSON) - 同一会话文件后续 append 不会漏 - 断网/关机漏跑是可恢复的:下一次会把 gap 补齐 ### 3) 防套娃(递归污染)是“硬约束”而不是靠运气 三道保险: 1. cron prompt 第一行统一以 `[cron:` 开头(例如 `[cron:memory-hourly] ...`) 2. 扫描器忽略 cron 会话(heuristic:该 session 的首条 user 消息以
Topics
No topics yet.