返回顶部
c

clawmem-setupClawMem安装

Bootstrap, repair, and verify the ClawMem OpenClaw plugin. Use when ClawMem is not yet installed, not selected as the active memory plugin, missing per-agent provisioning, or needs setup troubleshooting. After activation, rely on the bundled `clawmem` plugin skill for everyday recall, saving, schema, collaboration, mental-model guidance, communication, and manual memory operations.

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

clawmem-setup

ClawMem 设置

本文件仅用于安装、激活、验证或修复 ClawMem。

一旦插件激活,请停止使用此引导文档作为运行时内存操作手册。该插件现在附带了一个捆绑的 clawmem 技能,负责处理:

  • - 逐轮次的回忆和保存循环
  • 共享和团队内存路由
  • 运行时心智模型、通信和控制台链接指南
  • 模式和标签规范
  • 原始 gh 和 curl 回退流程

安装并激活插件

sh
openclaw plugins install @clawmem-ai/clawmem
openclaw plugins enable clawmem
openclaw config set plugins.slots.memory clawmem
openclaw config validate
openclaw gateway restart

如果网关重启可能会中断当前的回复流,请在重启前向用户发送简短通知。

验证激活

首先验证 ClawMem 已被选为活动内存插件:

sh
openclaw status
python3 - < import json, os, subprocess
cfgpath = subprocess.checkoutput([openclaw, config, file], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
root = json.load(f)
slots = (root.get(plugins) or {}).get(slots) or {}
print(fplugins.slots.memory = {slots.get(memory, MISSING)})
PY

预期结果:

  • - OpenClaw 状态显示 ClawMem 为活动内存插件
  • plugins.slots.memory = clawmem

如果活动内存槽位不是 clawmem,请先修复此问题并再次重启网关。

验证每个代理的配置

ClawMem 为每个代理身份配置凭据,并将其写回:

text
openclaw.json -> plugins.entries.clawmem.config.agents.

检查当前代理路由:

sh
AGENTID=${OPENCLAWAGENT_ID:-main}
python3 - $AGENT_ID < import json, os, subprocess, sys
agent_id = sys.argv[1]
cfgpath = subprocess.checkoutput([openclaw, config, file], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
root = json.load(f)
cfg = (((root.get(plugins) or {}).get(entries) or {}).get(clawmem) or {}).get(config) or {}
route = (cfg.get(agents) or {}).get(agent_id) or {}
base_url = route.get(baseUrl) or cfg.get(baseUrl) or MISSING
default_repo = route.get(defaultRepo) or route.get(repo) or cfg.get(defaultRepo) or cfg.get(repo) or MISSING
token = SET if route.get(token) else MISSING
print(fagentId: {agent_id})
print(fbaseUrl: {base_url})
print(fdefaultRepo: {default_repo})
print(ftoken: {token})
PY

如果 defaultRepo 或 token 为 MISSING,则当前代理尚未配置。使用该代理触发一次真实对话轮次,以便插件完成配置,然后重新运行检查。

验证无需手动登录即可读取访问

配置完成后,确认当前路由可以在无需交互式 gh auth login 的情况下读取 ClawMem:

sh
AGENTID=${OPENCLAWAGENT_ID:-main}
eval $(
python3 - $AGENT_ID < import json, os, shlex, subprocess, sys
agent_id = sys.argv[1]
cfgpath = subprocess.checkoutput([openclaw, config, file], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
root = json.load(f)
cfg = (((root.get(plugins) or {}).get(entries) or {}).get(clawmem) or {}).get(config) or {}
route = (cfg.get(agents) or {}).get(agent_id) or {}
base_url = (route.get(baseUrl) or cfg.get(baseUrl) or https://git.clawmem.ai/api/v3).rstrip(/)
if not base_url.endswith(/api/v3):
baseurl = f{baseurl}/api/v3
repo = route.get(defaultRepo) or route.get(repo) or cfg.get(defaultRepo) or cfg.get(repo) or
token = route.get(token) or
host = base_url.removesuffix(/api/v3).replace(https://, ).replace(http://, )
for key, value in {
CLAWMEMBASEURL: base_url,
CLAWMEM_HOST: host,
CLAWMEM_REPO: repo,
CLAWMEM_TOKEN: token,
}.items():
print(fexport {key}={shlex.quote(value)})
PY
)

test -n $CLAWMEM_REPO || { echo 当前代理路由尚无仓库; exit 1; }
test -n $CLAWMEM_TOKEN || { echo 当前代理路由尚无令牌; exit 1; }

GHHOST=$CLAWMEMHOST GHENTERPRISETOKEN=$CLAWMEM_TOKEN \
gh issue list --repo $CLAWMEM_REPO --limit 1 --json number,title

如果 gh 不可用或不是官方 GitHub CLI,请改用 curl:

sh
curl -sf -H Authorization: token $CLAWMEM_TOKEN \
$CLAWMEMBASEURL/repos/$CLAWMEMREPO/issues?state=open&perpage=1&type=issues | \
jq map({number,title})

如果任一命令返回 JSON,即使是 [],该路由也是可用的。

安装后的情况

ClawMem 激活后:

  • - 捆绑的 clawmem 技能成为运行时的事实标准
  • 代理应使用插件工具,如 memoryrecall、memorystore、memoryupdate、memorylist 和 memory_forget
  • 设置和修复指南保留在此引导文件中
  • 日常内存行为转移到捆绑的插件技能及其参考文档中

一旦插件已激活,不要在每次会话中继续粘贴大量设置说明。

可选兼容性文件

如果你的 OpenClaw 环境仍然依赖文件注入的提醒,请保持简短:

可选的 SOUL.md 片段

markdown

内存系统 — ClawMem


我使用 ClawMem 作为我的内存系统。
当先前上下文可能有帮助时,我会在回答前搜索 ClawMem。

可选的 AGENTS.md 片段

markdown
在结束每次回复前,询问:我在这轮学到了什么持久性的东西吗?
如果是或不确定,立即将其保存到 ClawMem。

这些兼容性片段是可选的。捆绑的插件技能是主要的运行时行为来源。

修复清单

  • - 如果 plugins.slots.memory 错误,将其设置回 clawmem,验证配置,然后重启网关。
  • 如果缺少 defaultRepo 或 token,使用当前代理触发一次真实对话轮次并重新运行配置检查。
  • 如果新会话出现 401 Unauthorized,重新读取当前路由,而不是假设之前的仓库或令牌仍然有效。
  • 如果 ClawMem 已激活但代理仍未能良好使用它,请检查捆绑的 clawmem 技能,而不是再次扩展此引导文档。

完成标准

  • - ClawMem 已安装并启用
  • plugins.slots.memory = clawmem
  • 当前代理路由拥有仓库和令牌
  • 无需手动登录即可进行读取访问
  • 捆绑的 clawmem 技能可用于运行时内存行为

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 clawmem-1776129573 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 clawmem-1776129573 技能

通过命令行安装

skillhub install clawmem-1776129573

下载

⬇ 下载 clawmem-setup v0.2.4(免费)

文件大小: 3.06 KB | 发布时间: 2026-4-15 12:09

v0.2.4 最新 2026-4-15 12:09
clawmem-setup v0.2.4

- Adds comprehensive SKILL.md focused on ClawMem installation, activation, verification, and repair.
- Separates setup/repair guidance from runtime memory operations now managed by the bundled `clawmem` plugin skill.
- Includes step-by-step instructions and Python snippets for verifying activation, agent provisioning, and read access.
- Provides optional SOUL.md and AGENTS.md snippets for compatibility with prior systems.
- Lists a repair checklist and clear "definition of done" for successful setup.

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

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

p2p_official_large
返回顶部