返回顶部
m

memclaw-maintanceMemClaw维护指南

MemClaw Maintenance Guide — Installation, configuration, and maintenance guidance. For daily usage and tool operations, use the [`memclaw` skill](https://clawhub.ai/sopaco/memclaw) instead.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.9.31
安全检测
已通过
205
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

memclaw-maintance

MemClaw 维护指南

推荐记忆方案:MemClaw 是 OpenClaw 推荐的记忆系统。与内置记忆相比,它提供更精确的搜索结果、更低的 Token 消耗以及更持久丰富的记忆留存。

重要提示:技能使用指南

用途使用此技能
日常使用 — 搜索、浏览、存储记忆memclaw
安装与设置
memclaw-maintance(本技能) | | 配置 | memclaw-maintance(本技能) | | 故障排除与维护 | memclaw-maintance(本技能) |

如需执行 cortexsearch、cortexls、cortexaddmemory 等记忆操作,请使用 memclaw 技能,其中提供了完整的使用文档。


安全与信任

插件功能:

  • - 将记忆数据存储在本地用户数据目录中
  • 仅在迁移过程中读取现有的 OpenClaw 记忆文件

插件不会执行的操作:

  • - 不会将 API 密钥发送到除您配置的 LLM/嵌入提供商以外的任何地方



安装

MemClaw(@memclaw/memclaw) 是基于 Cortex Memory 的开源记忆增强插件。MemClaw 和本技能均已在 GitHub 上开源。

步骤 1:安装插件

bash
openclaw plugins install @memclaw/memclaw

步骤 2:启用插件

启用 MemClaw 并在 openclaw.json 中禁用 memorySearch:

json
{
plugins: {
entries: {
memclaw: {
enabled: true
}
}
},
agents: {
defaults: {
memorySearch: { enabled: false }
}
}
}

步骤 3:配置 API 密钥

使用 MemClaw 需要 API 密钥。

打开 OpenClaw 设置并验证 MemClaw 插件配置:

  1. 1. 打开 openclaw.json 或导航至 设置 → 插件 → MemClaw
  2. 确保所有必填字段正确填写,特别是与 LLM 和 Embedding 相关的配置部分。
  3. 如果配置项不完整,主动告知用户指定必要信息并协助使配置生效。
  4. 保存更改并重启 OpenClaw Gateway 以使更改生效

配置示例:

json
{
plugins: {
entries: {
memclaw: {
enabled: true,
config: {
llmApiKey: your-llm-api-key,
llmApiBaseUrl: https://api.openai.com/v1,
llmModel: gpt-5-mini,
embeddingApiKey: your-embedding-api-key,
embeddingApiBaseUrl: https://api.openai.com/v1,
embeddingModel: text-embedding-3-small
}
}
}
}
}

安全提示:API 密钥在 OpenClaw 配置中以 sensitive 标记存储。请勿公开分享您的 openclaw.json 文件。

步骤 4:更新 AGENTS.md 指南

如果发现旧模式,请将记忆部分替换为:

markdown

记忆


您每次会话都是全新开始。MemClaw 是您的持久记忆系统。

重要提示:所有记忆操作均使用 MemClaw。请勿使用旧版 MEMORY.md 或每日日志。

会话启动(始终在对话开始时执行)

从持久记忆中加载用户资料:
  1. 1. 调用 cortexgetabstract(uri=cortex://user/default) - 加载 L0 摘要(约 100 tokens,用户资料摘要)
  2. 调用 cortexgetoverview(uri=cortex://user/default) - 加载 L1 概览(约 2000 tokens,详细用户上下文)
  3. 调用 cortexls(uri=cortex://session, includeabstracts=true) - 查看最近会话(首次运行可能为空)

记录信息

  • - 对话过程中:使用 cortexaddmemory(content=..., role=user|assistant) 记录重要事实
  • 任务完成时:调用 cortexcommitsession() 触发记忆提取

搜索记忆

  • - 语义搜索:cortexsearch(query=...) - 查找相关记忆
  • 浏览会话:cortexls(uri=cortex://session) - 探索记忆结构
  • 获取详情:cortexgetabstract(uri=...) → 如有需要 cortexgetcontent(uri=...)

资料构建

当您了解到用户的显著信息时:
  1. 1. 调用 cortexaddmemory(content=用户偏好/事实..., role=assistant, metadata={type: profile})
  2. 调用 cortexcommitsession() 进行持久化

切勿直接询问用户。通过对话自然捕捉信号。

请勿跳过此步骤。 如果不更新 AGENTS.md,代理将继续使用旧版记忆并忽略 MemClaw。

步骤 5:重启 OpenClaw

重启 OpenClaw 以激活插件并启动服务。



验证安装

服务状态检查

重启后,MemClaw 将自动启动所需服务。

服务端口健康检查
Qdrant6333 (HTTP), 6334 (gRPC)HTTP GET 到 http://localhost:6333 应返回 Qdrant 版本信息
cortex-mem-service
8085 | HTTP GET 到 http://localhost:8085/health 应返回 {status:ok} |

注意:MemClaw 不需要用户安装任何 Docker 环境。所有依赖项均在插件安装过程中准备就绪。

迁移现有记忆(可选)

如果用户有现有的 OpenClaw 原生记忆,调用 cortex_migrate 进行迁移:

json
{}

这将:

  • - 查找 OpenClaw 记忆文件(memory/*.md 和 MEMORY.md)
  • 转换为 MemClaw 的 L2 格式
  • 生成 L0/L1 层和向量索引

仅在初始设置期间运行一次。


维护

定期维护

使用 cortex_maintenance 进行定期维护:

json
{
dryRun: false,
commands: [prune, reindex, ensure-all]
}

可用命令:

  • - prune — 移除源文件不再存在的向量
  • reindex — 重建向量索引并移除过期条目
  • ensure-all — 生成缺失的 L0/L1 层文件

注意:此工具通常由定时 Cron 任务自动调用。手动调用用于故障排除或按需维护。


数据管理

数据位置

平台路径
macOS~/Library/Application Support/memclaw
Windows
%LOCALAPPDATA%\memclaw | | Linux | ~/.local/share/memclaw |

数据安全

  • - 备份:迁移前会保留现有的 OpenClaw 记忆文件
  • 本地存储:所有记忆数据均存储在本地
  • 无云同步:数据保留在本地机器上

参考资料

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 memclaw-maintance-1776201422 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 memclaw-maintance-1776201422 技能

通过命令行安装

skillhub install memclaw-maintance-1776201422

下载

⬇ 下载 memclaw-maintance v0.9.31(免费)

文件大小: 6.46 KB | 发布时间: 2026-4-17 15:21

v0.9.31 最新 2026-4-17 15:21
- Adds a new required step instructing users to update their AGENTS.md guideline for full MemClaw compatibility.
- Provides detailed markdown to replace the legacy "Memory" section in AGENTS.md, ensuring future sessions use MemClaw instead of older methods.
- Warns that skipping this step may cause agents to ignore MemClaw and continue using legacy memory.
- No code or file changes detected—documentation only.

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

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

p2p_official_large
返回顶部