/install auto-memory-distiller
Auto-Memory-Distiller
简介 (Introduction)
这是一个在后台静默运行的 OpenClaw 长期记忆自动提炼技能 (Skill)。 它负责将无序的超长对话流水账 (JSONL 记录),增量转化为结构化、按主题分类、可溯源的长期知识库 (Markdown 记忆卡片)。
特性 (Features)
- 增量游标 (Incremental):通过
state.json记录每个 Session 的已读行数,每次只处理新增对话,绝不重复消耗 Token。 - 主题聚合 (Topic Merge):自动读取已有的主题目录,将新知识合并入旧主题,防止知识碎片化。
- 安全过滤 (Redaction):利用大模型清洗真实的 API Key 和无关痛痒的报错日志。
- 溯源指针 (Pointers):生成的知识卡片永远带上原始对话的物理文件路径和行号。
依赖配置 (Prerequisites)
脚本默认使用 Gemini API,依赖以下 Python 库:
pip install google-genai python-dotenv
请在系统的环境变量,或者 ~/.openclaw/workspace/.env 中配置你的密钥:
GEMINI_API_KEY=your_gemini_api_key_here
使用方法 (Usage)
无需人工干预。建议把该脚本绑定到系统的 crontab 或者通过 OpenClaw 的 heartbeat 在闲暇时自动触发:
# 手动运行
python ~/.openclaw/workspace/skills/auto-distiller/distiller.py
存储目录 (Directory Structure)
distiller.py: 核心脚本。state.json: 游标记录文件(自动生成)。- 输出的记忆目录:
~/.openclaw/workspace/memory/topics/*.md
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install auto-memory-distiller - After installation, invoke the skill by name or use
/auto-memory-distiller - Provide required inputs per the skill's parameter spec and get structured output
What is Auto Memory Distiller?
Automatically converts raw long conversations into structured, themed Markdown knowledge cards with source traceability, running incrementally and silently i... It is an AI Agent Skill for Claude Code / OpenClaw, with 329 downloads so far.
How do I install Auto Memory Distiller?
Run "/install auto-memory-distiller" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Auto Memory Distiller free?
Yes, Auto Memory Distiller is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Auto Memory Distiller support?
Auto Memory Distiller is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Auto Memory Distiller?
It is built and maintained by Peng Shu (@mashirops); the current version is v1.0.0.