返回顶部
g

good-memory

Session 历史记录恢复技能。Session重置后自动恢复对话上下文,解决系统自动重置导致的"失忆"问题。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.0.1
安全检测
已通过
176
下载量
0
收藏
概述
安装方式
版本历史

good-memory

# Good-Memory v2.0.0 帮助 Agent 在 session 重置后快速恢复对话上下文。通过检测 `.reset.` 后缀的 session 文件实现,**安装后自动运行,无需手动操作**。 ## 核心特性 - ✅ **全平台支持**:支持飞书、Discord、Telegram、Signal等所有OpenClaw平台 - ✅ **零配置**:安装后自动生效,不需要修改配置 - ✅ **轻量高效**:仅基于文件名匹配,不需要解析文件内容,速度快 - ✅ **低侵入性**:默认只修改main的AGENTS.md,不影响其他Agent - ✅ **自动清理**:历史记录最多保留10条,自动清理过期文件 ## 工作原理 1. **重置检测**:每次session启动时自动检测两种重置类型: - ✅ **显式重置**:session 文件被系统添加 `.reset.` 后缀(系统自动重置 /new /reset 命令触发) - ✅ **隐式切换**:新 session UUID 生成但旧 session 未打 reset 标记(系统自动会话轮换/后台重启触发) 2. **历史恢复**:如果检测到重置/切换,自动读取上一个会话文件的最后50条对话 3. **自动提示**:首条回复会告知用户已恢复历史记录 ## 安装 ### 🚀 一键安装(推荐) ```bash # 下载并安装 curl -sSL https://wry-manatee-359.convex.site/api/v1/download?slug=good-memory | bash -s install ``` ### 手动安装 ```bash # 1. 创建目录 mkdir -p ~/.openclaw/workspace/skills/good-memory cd ~/.openclaw/workspace/skills/good-memory # 2. 下载解压 curl -L https://wry-manatee-359.convex.site/api/v1/download?slug=good-memory | unzip - # 3. 执行安装 bash scripts/install.sh ``` ## 环境变量(可选) 如果你的OpenClaw安装在非默认路径,可以设置: ```bash export OPENCLAW_BASE="/path/to/your/openclaw" # 默认:/root/.openclaw export SESSIONS_DIR="/path/to/sessions" # 默认:$OPENCLAW_BASE/agents/main/sessions export AGENTS_MD="/path/to/AGENTS.md" # 默认:$OPENCLAW_BASE/workspace/AGENTS.md ``` ## 手动使用 ```bash # 查看最新的reset文件 bash ~/.openclaw/workspace/skills/good-memory/scripts/recovery.sh latest # 读取最新reset的50条记录 bash ~/.openclaw/workspace/skills/good-memory/scripts/recovery.sh read --lines 50 # 列出所有reset文件 bash ~/.openclaw/workspace/skills/good-memory/scripts/recovery.sh list ``` ## 数据结构 `session-tracker.json` 格式(简化版): ```json { "description": "Session tracker - maps agent+chat to session files", "last_updated": "2026-03-27T15:00:00Z", "agents": { "main": { "ou_123456": { "session_key": "", "active": "/path/to/current.jsonl", "active_uuid": "abc123", "last_history": "/path/to/old.jsonl.reset.2026-03-27T15:00:00Z", "history": [ "/path/to/old.jsonl.reset.2026-03-27T15:00:00Z", "/path/to/older.jsonl.reset.2026-03-26T10:00:00Z" ] } } } } ```

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 good-memory-1776003182 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 good-memory-1776003182 技能

通过命令行安装

skillhub install good-memory-1776003182

下载 Zip 包

⬇ 下载 good-memory v2.0.1

文件大小: 18.16 KB | 发布时间: 2026-4-13 10:28

v2.0.1 最新 2026-4-13 10:28
Good Memory v2.0.1 – Automatic Session Context Recovery

- Improved documentation with updated installation steps, usage examples, and troubleshooting.
- Refined description and metadata for clarity and better platform compatibility.
- Maintenance scripts and recovery logic reorganized for efficiency and easier management.
- Removed the redundant README.md; now consolidated into primary docs.
- Ensured compatibility with all OpenClaw platforms and streamlined session cleanup policy.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部