← Back to Skills Marketplace
anfengxiaoguo

Conversation Archive

by AnFengxiaoGuo · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
105
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install conversation-archive
Description
对话记忆仓库:自动归档 session 对话,保留原始记录,支持检索和误解纠正。可与 memory-never-forget 联动形成完整记忆体系。
README (SKILL.md)

⚠️ 作者信息待填写:ClawHub 上传前需要确认你的 ClawHub/GitHub 用户名

💬 Conversation Archive(对话记忆仓库)

核心理念

「记忆会骗人,但对话记录不会。」

当缪斯说「我不记得了」「我可能理解错了」——去对话仓库里找原始记录,比问老豆更快、更准。


工作流程

Session 结束
    ↓
1. ARCHIVE(归档)
   - 保存原始对话 JSON
   - 生成结构化摘要
   - 提取关键信息(主题/决策/教训)
   ↓
2. INDEX(索引)
   - 按日期/主题/关键词写入 index.json
   - (未来:生成 embedding 向量)
   ↓
3. RETRIEVE(检索)
   - 当需要回溯时 → 搜对话仓库
   - 当发现误解时 → 拉原始记录纠正
   ↓
4. INTEGRATE(整合)
   - 与 memory-never-forget 联动
   - 从归档中提取值得记忆的内容 → 4层分类

目录结构

conversation_archive/
├── sessions/           # 原始对话存档
│   └── YYYY-MM/
│       └── {session_id}.json
├── index.json          # 内存索引
└── embeddings/         # 预留:向量索引(未来)

Session JSON 格式

{
  "sessionId": "ccba19e7-...",
  "date": "2026-04-07",
  "channel": "webchat",
  "participants": ["Simon", "Muse"],
  "topics": ["OpenClaw升级", "Dreaming", "记忆系统"],
  "decisions": [
    {"text": "开启Dreaming每天0点运行", "context": "老豆同意"}
  ],
  "feedback": [
    {"user": "不要用Markdown表格", "from": "Simon"}
  ],
  "summary": "讨论了OpenClaw升级和记忆系统...",
  "messages": [
    {"role": "user", "content": "...", "time": "..."},
    {"role": "assistant", "content": "...", "time": "..."}
  ],
  "archivedAt": "2026-04-07T17:30:00+08:00"
}

工具(Tools)

1. archive_session — 归档当前 session

触发时机: session 结束前 / 手动触发 / cron 触发

{
  "name": "archive_session",
  "arguments": {
    "sessionKey": "agent:main:main",
    "includeMessages": true
  }
}

自动触发逻辑:

  • 当 session 被 compact 或 restart 时自动归档
  • 每次 webchat 超过 30 分钟无活动时归档

2. search_archive — 搜索对话

触发时机: 老豆问「我之前说过什么」「那次对话」「记得3月29日吗」

{
  "name": "search_archive",
  "arguments": {
    "query": "OpenClaw升级",
    "date": "2026-03-29",
    "limit": 5
  }
}

3. get_session — 获取原始对话

触发时机: 发现缪斯理解错了,用原始记录纠正

{
  "name": "get_session",
  "arguments": {
    "sessionId": "ccba19e7-..."
  }
}

4. extract_memories — 从归档中提取记忆

触发时机: 与 memory-never-forget 联动时

{
  "name": "extract_memories",
  "arguments": {
    "sessionId": "ccba19e7-...",
    "types": ["user", "feedback", "project"]
  }
}

检索策略

当前(关键词模式)

# 搜索逻辑
1. 在 index.json 中模糊匹配 query
2. 匹配 topic、keywords、summary 字段
3. 按日期倒序返回 top N
4. 展示匹配的摘要片段

未来(向量模式)

当 embedding 配置好后:

# 向量搜索
1. query → embedding 向量
2. 在 embeddings/ 目录做余弦相似度搜索
3. 返回 top N 最语义相关的对话

接入条件: agents.defaults.memorySearch 配置了 embedding provider


与 memory-never-forget 的联动

conversation_archive  ──→  memory-never-forget
     │                              │
     │ 提取值得记忆的内容              │ 使用4层分类
     ↓                              ↓
decisions/feedback/          memory/{user,feedback,
project/                     project,reference}/
     │                              │
     └───────────升华──────────────→ knowledge/

联动触发: 每次归档后,自动调用 extract_memories 把值得记忆的内容传给 memory-never-forget 处理。


自动归档规则

立即归档:

  • session restart / compact 时
  • 超过 30 分钟无活动时
  • 每天 23:59 强制归档所有活跃 session

保留对话:

  • 最近 7 天:完整原始记录
  • 7-30 天:仅摘要(messages 字段清除)
  • 30 天以上:压缩归档,保留摘要和元数据

安全清理:

  • 不存 API key、token、密码等敏感信息
  • messages 字段在归档时做敏感信息扫描和脱敏

误解纠正流程

当缪斯意识到自己可能理解错了:

  1. search_archive 搜相关对话
  2. get_session 拉原始记录
  3. 核对原始对话,确认误解点
  4. 更新对应分类记忆(feedback/)
  5. 在这次 session 末尾做修正性回复

触发关键词

老豆说 缪斯做
「我之前说过...」 search_archive(query="...")
「那天...」 search_archive(date="YYYY-MM-DD")
「你不记得了?」 search_archive + 展示原始记录
「理解错了」 get_session + 纠正 + 更新记忆

版本:v1.0 | 日期:2026-04-07 | 对话记忆仓库 + 未来向量检索预留

Usage Guidance
This skill's documentation promises search, retrieval, embeddings, retention policies, desensitization, and integration with another memory skill, but the included code only provides a simple local archiver that writes summarized metadata and an index to ~/.openclaw/workspace/conversation_archive. Before installing or using it: (1) treat any archived session data as potentially sensitive because the code does not implement the advertised sensitive-data scanning or retention/cleanup; (2) if you need search/get/extract features or integration, request or review the implementation for those functions — they are missing; (3) inspect and, if necessary, modify the script to include proper redaction, retention enforcement, and access controls; (4) run it in a safe environment first and verify file locations, contents, and behavior; (5) avoid using it in production for sensitive conversations until the missing features and privacy guarantees are implemented and code-reviewed.
Capability Analysis
Type: OpenClaw Skill Name: conversation-archive Version: 1.0.0 The skill exhibits a path traversal vulnerability in `scripts/archive_session.py`, as the `session_id` and `date` parameters are used to construct file paths without any sanitization, potentially allowing the overwriting of files outside the intended archive directory. Furthermore, there is a notable discrepancy between the `SKILL.md` documentation—which claims to perform sensitive information scrubbing and full message archiving—and the actual Python implementation, which lacks these security features and fails to save the conversation content itself. While no clear malicious intent or data exfiltration was found, these vulnerabilities and misleading documentation pose a security risk.
Capability Assessment
Purpose & Capability
Name/description match a conversation archiver. The included Python script (scripts/archive_session.py) legitimately implements session archiving to ~/.openclaw/workspace/conversation_archive and index updates, which is coherent with the stated purpose. However the SKILL.md claims broader capabilities (search_archive, get_session, extract_memories, embeddings integration, automatic handoff to memory-never-forget) that are not implemented in the code bundle — this is an inconsistency (documentation promises features that do not exist).
Instruction Scope
SKILL.md describes runtime tools and flows for archive_session, search_archive, get_session, extract_memories, retention rules, sensitive-data scanning/desensitization, and automated integration with memory-never-forget. The shipped code only contains a local archiver that writes a summarized archive (not the messages) and updates index.json. There is no implementation of search/get/extract/embeddings/cleanup/scanning, nor any code that integrates with other skills. The skill's instructions therefore give the agent capabilities it won't actually have, and assert privacy/sanitization behavior that the code does not perform.
Install Mechanism
No install spec and only a small Python script are included. There are no network downloads or third-party packages installed by the skill, which keeps install risk low. The script writes files to a per-user path (~/.openclaw/workspace/conversation_archive).
Credentials
The skill requests no environment variables or external credentials (proportional). However SKILL.md repeatedly claims not to store API keys/tokens and says messages are scanned/desensitized and subject to retention rules; the script does not implement sensitive-data scanning, does not store messages in the archive JSON, and does not implement retention or purging logic. That discrepancy affects privacy expectations and should be clarified.
Persistence & Privilege
always is false and the skill does not request elevated privileges. It creates and writes files under the user's home (~/.openclaw/workspace/conversation_archive) which is expected for a local archive. It does not modify other skills or global agent settings. Users should still be aware that session data will be written to disk.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install conversation-archive
  3. After installation, invoke the skill by name or use /conversation-archive
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of Conversation Archive: a session-based conversation memory system. - Automatically archives sessions, preserving original conversation JSON and generating structured summaries. - Supports keyword-based search, retrieval of original sessions, and memory extraction for integration with memory-never-forget. - Includes auto-archiving rules (on session restart/compact, inactivity, and daily force-archive). - Prevents storage of sensitive data (API keys, passwords) via message scanning and redaction. - Designed for future upgrade to vector (semantic) search.
Metadata
Slug conversation-archive
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Conversation Archive?

对话记忆仓库:自动归档 session 对话,保留原始记录,支持检索和误解纠正。可与 memory-never-forget 联动形成完整记忆体系。 It is an AI Agent Skill for Claude Code / OpenClaw, with 105 downloads so far.

How do I install Conversation Archive?

Run "/install conversation-archive" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Conversation Archive free?

Yes, Conversation Archive is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Conversation Archive support?

Conversation Archive is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Conversation Archive?

It is built and maintained by AnFengxiaoGuo (@anfengxiaoguo); the current version is v1.0.0.

💬 Comments