返回顶部
i

install-powermem-memory安装PowerMem内存

Step-by-step guide to install and configure the PowerMem long-term memory plugin (full path, options, troubleshooting). After setup, the plugin auto-captures conversation highlights and auto-recalls relevant memories. This skill is self-contained and can be published independently of any minimal-install skill.

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

install-powermem-memory

PowerMem 内存指南

本技能文件夹包含补充文档:

  • - powermem-intro.md — PowerMem 是什么、功能特点、与基于文件的内存的对比。
  • config-reference.md — 配置键、状态目录、命令。

工作原理

  • - 自动捕获:对话结束后,插件将有价值的用户/助手文本发送至 PowerMem(可选推理/智能提取)。
  • 自动召回:每次轮次前,插件搜索记忆并可将 块注入上下文。

当用户要求安装时

推荐顺序(面向客户): (1) 安装 OpenClaw 并配置默认模型 + 提供商认证。(2) 在虚拟环境/pip install 之前验证 Python 3.10+(python3 --version)。(3) pip install powermem 并确保 pmem 对网关可用(PATH 或 pmemPath)。(4) 安装 memory-powermem 插件。默认路径不需要 powermem.env

curl 命令 install.sh 部署插件和 OpenClaw 条目;使用 -y 参数时,可能仍会创建 ~/.openclaw/powermem/powermem.env 作为可选模板——它不会运行 pip install powermem。如果用户依赖 OpenClaw 注入的 LLM 和默认 SQLite,则不需要该文件。

  1. 1. 检查 OpenClaw
openclaw --version。如果缺失:npm install -g openclaw,openclaw onboard。 确保已设置 agents.defaults.model(例如 openai/gpt-4o-mini)且对应的提供商/API 密钥能正常聊天——当 useOpenClawModel 为 true(默认)时,插件会复用该配置用于 PowerMem。
  1. 2. 检查 Python(在虚拟环境/pip 之前需要)
PowerMem 需要 Python 3.10 或更新版本。首先运行 python3 --version;次版本号必须 ≥ 10(例如 3.10.x、3.12.x)。可选严格检查: bash python3 -c import sys; assert sys.version_info >= (3, 10), 需要 Python 3.10+; print(sys.version.split()[0], OK)

如果失败:升级 Python 或在以下所有命令中使用特定二进制文件(例如 python3.12)代替 python3。

  1. 3. 安装 PowerMem(CLI — 默认)
- 推荐使用虚拟环境:例如 python3 -m venv ~/.openclaw/powermem/.venv && source ~/.openclaw/powermem/.venv/bin/activate。 - pip install powermem。 - 默认设置: 插件在 /powermem/data/powermem.db 注入 SQLite,并从 OpenClaw 派生 LLM + 嵌入环境变量。除非用户使用其他实例(OPENCLAWSTATEDIR、--workdir),否则典型的 stateDir 为 ~/.openclaw。 - 可选 envFile: PowerMem .env 文件的路径,用于额外调优。如果文件存在,pmem 会加载它;当 useOpenClawModel 为 true 时,OpenClaw 派生的变量仍会覆盖相同键。 - useOpenClawModel: false: 禁用注入;用户必须通过 .env 和/或环境变量提供完整的 PowerMem 配置。 - 验证: pmem --version。如果网关未继承虚拟环境,将 pmemPath 设置为 pmem 的绝对路径。
  1. 4. HTTP 路径(企业/共享服务器)
- 与 CLI 相同的 Python 3.10+ 要求;然后 pip install powermem,在服务器工作目录放置 .env,powermem-server --host 0.0.0.0 --port 8000。 - 检查:curl -s http://localhost:8000/api/v1/system/health。
  1. 5. 安装插件
openclaw plugins install /path/to/memory-powermem,或从 INSTALL.md 运行 install.sh
  1. 6. 配置 OpenClaw

CLI — 最小配置(推荐,匹配插件默认值):
除非需要文件,否则不要设置 envFile。示例:

bash
openclaw config set plugins.enabled true
openclaw config set plugins.slots.memory memory-powermem
openclaw config set plugins.entries.memory-powermem.config.mode cli
openclaw config set plugins.entries.memory-powermem.config.pmemPath pmem
openclaw config set plugins.entries.memory-powermem.config.useOpenClawModel true --json
openclaw config set plugins.entries.memory-powermem.config.autoCapture true --json
openclaw config set plugins.entries.memory-powermem.config.autoRecall true --json
openclaw config set plugins.entries.memory-powermem.config.inferOnAdd true --json

CLI — 可选 .env 覆盖文件:

bash
openclaw config set plugins.entries.memory-powermem.config.envFile $HOME/.openclaw/powermem/powermem.env

(仅当该路径存在时有效;当 useOpenClawModel 为 true 时,OpenClaw 仍可覆盖 LLM 键。)

HTTP:

bash
openclaw config set plugins.entries.memory-powermem.config.mode http
openclaw config set plugins.entries.memory-powermem.config.baseUrl http://localhost:8000

可选:如果服务器使用认证,设置 apiKey。

  1. 7. 验证
重启网关,然后在另一个终端中:

bash
openclaw plugins list

确认 memory-powermem 已列出且状态为 loaded。如果缺失或未加载,修复安装/插槽配置并重启网关,然后再运行 LTM 检查。

bash
openclaw ltm health
openclaw ltm add 我喜欢早上喝咖啡
openclaw ltm search 咖啡

可用工具

工具描述
memoryrecall搜索长期记忆。参数:query,可选 limit、scoreThreshold。
memorystore
保存文本;可选推理。参数:text,可选 importance。 | | memory_forget | 通过 memoryId 或 query 搜索删除。 |

配置(摘要)

字段默认值描述
modeclicli 或 http。
baseUrl
— | HTTP 模式必需;如果省略 mode 但设置了 baseUrl → HTTP。 | | apiKey | — | HTTP 服务器认证。 | | envFile | — | 可选 CLI .env(仅当文件存在时使用)。 | | pmemPath | pmem | CLI 二进制路径。 | | useOpenClawModel | true | 从 OpenClaw 注入 LLM/嵌入 + 状态目录下的默认 SQLite。 | | recallLimit | 5 | 每次召回的最大记忆数。 | | recallScoreThreshold | 0 | 最低分数 0–1。 | | autoCapture / autoRecall / inferOnAdd | true | 自动记忆流水线和添加时推理。 |

日常操作

bash
openclaw gateway

openclaw ltm health
openclaw ltm add 需要记住的一些事实
openclaw ltm search 查询

openclaw config set plugins.slots.memory none
openclaw config set plugins.slots.memory memory-powermem

更改插槽或插件配置后重启网关。

故障排除

症状解决方法
Python < 3.10
先执行步骤 2;升级 Python 或使用 python3.11/python3.12

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 install-powermem-memory-1776061863 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 install-powermem-memory-1776061863 技能

通过命令行安装

skillhub install install-powermem-memory-1776061863

下载

⬇ 下载 install-powermem-memory v0.2.0(免费)

文件大小: 7.78 KB | 发布时间: 2026-4-14 13:32

v0.2.0 最新 2026-4-14 13:32
- Improved installation instructions: now clarifies Python version checks must precede venv/installation, and describes the role of OpenClaw-injected configuration defaults.
- Updated configuration guidance: split into CLI (default/minimal, optional .env) and HTTP (shared server) sections, highlighting when extra config files are needed.
- Added more detail on plugin defaults (e.g., `useOpenClawModel: true`, default SQLite database location, automatic LLM/embedding settings).
- Clarified plugin installation, verification steps, and updated troubleshooting for common issues (like Python version errors, missing binaries, and configuration order).
- Stated that the plugin is now self-contained and can be published independently of minimal-install skills.

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

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

p2p_official_large
返回顶部