Install
openclaw skills install auto-memory-distillerAutomatically converts raw long conversations into structured, themed Markdown knowledge cards with source traceability, running incrementally and silently i...
openclaw skills install auto-memory-distiller这是一个在后台静默运行的 OpenClaw 长期记忆自动提炼技能 (Skill)。 它负责将无序的超长对话流水账 (JSONL 记录),增量转化为结构化、按主题分类、可溯源的长期知识库 (Markdown 记忆卡片)。
state.json 记录每个 Session 的已读行数,每次只处理新增对话,绝不重复消耗 Token。脚本默认使用 Gemini API,依赖以下 Python 库:
pip install google-genai python-dotenv
请在系统的环境变量,或者 ~/.openclaw/workspace/.env 中配置你的密钥:
GEMINI_API_KEY=your_gemini_api_key_here
无需人工干预。建议把该脚本绑定到系统的 crontab 或者通过 OpenClaw 的 heartbeat 在闲暇时自动触发:
# 手动运行
python ~/.openclaw/workspace/skills/auto-distiller/distiller.py
distiller.py: 核心脚本。state.json: 游标记录文件(自动生成)。~/.openclaw/workspace/memory/topics/*.md