diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index f08cdfd..0000000 --- a/INSTALL.md +++ /dev/null @@ -1,205 +0,0 @@ -# Install PowerMem Memory for OpenClaw - -Give [OpenClaw](https://github.com/openclaw/openclaw) long-term memory via [PowerMem](https://github.com/oceanbase/powermem): intelligent extraction, Ebbinghaus forgetting curve. After setup, OpenClaw can **remember** facts from conversations and **recall** relevant context before responding. - ---- - -## One-Click Install (Linux / macOS) - -**Prerequisites:** OpenClaw installed (`openclaw --version`). - -**Default path:** The script configures **CLI mode** (no `powermem-server`). With current plugin defaults you **do not need** `powermem.env`: the plugin injects **SQLite** under your OpenClaw state directory and **LLM/embedding** from OpenClaw `agents.defaults.model` + provider keys (same as the gateway). The script may still create `~/.openclaw/powermem/powermem.env` as an optional override template. You still need `pip install powermem` and `pmem` on PATH (or `pmemPath`). - -```bash -curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash -``` - -Or run from the repo root (no download): - -```bash -cd /path/to/memory-powermem -bash install.sh -``` - -Non-interactive (defaults: **CLI** mode, env file `~/.openclaw/powermem/powermem.env`, SQLite template if new): - -```bash -curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash -s -y -``` - -Install to a specific OpenClaw instance: - -```bash -curl -fsSL ... | bash -s -- --workdir ~/.openclaw-second -``` - -The script will: 1) resolve OpenClaw workdir, 2) ask mode (**cli** / http) and paths, 3) for CLI, seed `powermem.env` if absent, 4) deploy the plugin into `/extensions/memory-powermem`, 5) run `npm install` there, 6) set OpenClaw config (plugins.enabled, slots.memory, entries.memory-powermem). - -**After running (CLI):** Ensure `pmem` is on PATH (or set `pmemPath`), then `openclaw gateway` and `openclaw ltm health`. With plugin defaults you normally **do not** need to edit `powermem.env`—LLM keys come from OpenClaw. Optional template file may still be created under `~/.openclaw/powermem/`. - -**After running (HTTP / enterprise):** Start PowerMem in a directory with `.env`, then `openclaw gateway`. - ---- - -## Quick Start (Let OpenClaw Install It) - -Copy **one** skill you want into OpenClaw’s skills directory, then ask OpenClaw to follow it. The two skills below are **independent** (each is complete for its scope; neither references the other). - -### OpenClaw skill — minimal install (`install-powermem-memory-minimal`) - -Short steps, no `powermem.env` required. - -**Linux / macOS:** - -```bash -mkdir -p ~/.openclaw/skills/install-powermem-memory-minimal -cp /path/to/memory-powermem/skills/install-powermem-memory-minimal/SKILL.md \ - ~/.openclaw/skills/install-powermem-memory-minimal/ -``` - -Then say e.g. **「PowerMem 快速安装」** / **“PowerMem quickstart”** or **「memory-powermem 最小安装」** / **“Minimal install memory-powermem”** / **“Install powermem memory minimal”**. - -### OpenClaw skill — full guide (`install-powermem-memory`) - -Install, configuration options, tools, and troubleshooting (includes bundled reference docs in the skill folder). - -**Linux / macOS:** - -```bash -mkdir -p ~/.openclaw/skills/install-powermem-memory -cp /path/to/memory-powermem/skills/install-powermem-memory/SKILL.md \ - ~/.openclaw/skills/install-powermem-memory/ -``` - -**Windows (PowerShell):** - -```powershell -New-Item -ItemType Directory -Force "$env:USERPROFILE\.openclaw\skills\install-powermem-memory" -Copy-Item "path\to\memory-powermem\skills\install-powermem-memory\SKILL.md" ` - "$env:USERPROFILE\.openclaw\skills\install-powermem-memory\" -``` - -Then say **「安装 PowerMem 记忆」** or **“Install PowerMem memory”**. - -For manual installation, continue below. - ---- - -## Prerequisites - -| Component | Purpose | -|-------------|---------| -| **OpenClaw** | CLI + gateway; run `openclaw --version` and `openclaw onboard` if needed. | -| **PowerMem** | **CLI (recommended):** `pip install powermem`, `pmem` on PATH, `.env` at `~/.openclaw/powermem/powermem.env` (install script can create a template). **HTTP:** run `powermem-server` and set plugin `mode: http` + `baseUrl`. | - -You do **not** install PowerMem inside OpenClaw; the plugin runs `pmem` subprocesses (CLI) or calls a HTTP API (server). - ---- - -## Manual Installation Steps - -### 1. Install PowerMem (CLI first) - -```bash -python3 -m venv ~/.openclaw/powermem/.venv -source ~/.openclaw/powermem/.venv/bin/activate -pip install powermem -``` - -Create or edit `~/.openclaw/powermem/powermem.env` (see [PowerMem .env.example](https://github.com/oceanbase/powermem/blob/master/.env.example)). Minimal fields: `DATABASE_PROVIDER=sqlite`, `SQLITE_PATH` (absolute path recommended), `LLM_*`, `EMBEDDING_*`. - -Verify: `pmem --version` (with venv activated). - -**(Optional) HTTP mode:** install PowerMem, put `.env` in a working directory, run `powermem-server --host 0.0.0.0 --port 8000`, verify `curl -s http://localhost:8000/api/v1/system/health`. - -### 2. Install the plugin into OpenClaw - -```bash -openclaw plugins install /path/to/memory-powermem -# Or symlink for development: -openclaw plugins install -l /path/to/memory-powermem -``` - -Confirm: `openclaw plugins list` shows `memory-powermem`. - -### 3. Configure OpenClaw - -Edit `~/.openclaw/openclaw.json` (or set via `openclaw config set`). - -**CLI mode (default, no server):** - -```json -{ - "plugins": { - "enabled": true, - "slots": { "memory": "memory-powermem" }, - "entries": { - "memory-powermem": { - "enabled": true, - "config": { - "mode": "cli", - "envFile": "/home/you/.openclaw/powermem/powermem.env", - "pmemPath": "pmem", - "autoCapture": true, - "autoRecall": true, - "inferOnAdd": true - } - } - } - } -} -``` - -Use your real home path for `envFile`. If `pmem` is only inside a venv, set `pmemPath` to the absolute path of the `pmem` binary. - -**HTTP mode (shared / enterprise):** - -```json -"config": { - "mode": "http", - "baseUrl": "http://localhost:8000", - "autoCapture": true, - "autoRecall": true, - "inferOnAdd": true -} -``` - -If you omit `mode` but set a non-empty `baseUrl`, the plugin treats the backend as **http** (backward compatible). - -### 4. Restart and verify - -Restart the OpenClaw gateway (or app), then: - -```bash -openclaw ltm health -openclaw ltm add "I prefer Americano in the morning" -openclaw ltm search "coffee" -``` - -If health is OK and search returns the memory, setup is complete. - ---- - -## Multi-Instance (--workdir) - -To target a different OpenClaw instance: - -```bash -# Install script -curl -fsSL ... | bash -s -- --workdir ~/.openclaw-second - -# Manual config -OPENCLAW_STATE_DIR=~/.openclaw-second openclaw config set plugins.slots.memory memory-powermem -``` - ---- - -## Troubleshooting - -| Symptom | Fix | -|--------|-----| -| `openclaw ltm health` fails | **CLI:** `pmem` not on PATH or wrong `pmemPath`; fix `.env` keys. **HTTP:** server down or wrong `baseUrl`. | -| Plugin not loaded | Ensure `plugins.slots.memory` is `memory-powermem` and gateway restarted. | -| Add/search returns 500 or empty | Check PowerMem logs; usually missing `LLM_*` / `EMBEDDING_*` in `.env`. | - -More: [README.md#troubleshooting](README.md#troubleshooting). diff --git a/README.md b/README.md index a9e90a3..c248c18 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ No HTTP server. Matches the plugin’s **default** (`mode: cli`). pip install powermem ``` -2. **Config** — Use [INSTALL.md](INSTALL.md) one-liner `install.sh` to create `~/.openclaw/powermem/powermem.env` (SQLite template), or copy from PowerMem’s `.env.example`. Set `LLM_*` and `EMBEDDING_*`. +2. **Config** — From a clone of this repo, run `bash install.sh` (or the curl one-liner under **Install options** below) to create an optional `~/.openclaw/powermem/powermem.env` template, or copy from PowerMem’s `.env.example`. Set `LLM_*` and `EMBEDDING_*` when not relying on OpenClaw-injected models. 3. If `pmem` exists only inside the venv, set `pmemPath` in the plugin `config` to the absolute path of `pmem` in that venv. @@ -157,9 +157,13 @@ JSON response means the server is up. API docs: `http://localhost:8000/docs`. ## Install options -- **One-click (Linux/macOS):** See [INSTALL.md](INSTALL.md) for `install.sh` (curl or run from repo root). -- **OpenClaw skill (minimal install):** Copy [skills/install-powermem-memory-minimal/SKILL.md](skills/install-powermem-memory-minimal/SKILL.md) to `~/.openclaw/skills/install-powermem-memory-minimal/`, then say **「PowerMem 快速安装」** / **“PowerMem quickstart”** or **“Minimal install memory-powermem”** / **“Install powermem memory minimal”**. -- **OpenClaw skill (full guide):** Copy [skills/install-powermem-memory/SKILL.md](skills/install-powermem-memory/SKILL.md) (and its sibling `.md` files in that folder if you mirror the repo) to `~/.openclaw/skills/install-powermem-memory/`, then say **「安装 PowerMem 记忆」** / **“Install PowerMem memory”**. The minimal and full skills are **independent**; use whichever fits your workflow. +- **One-click (Linux/macOS):** + ```bash + curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash + ``` + From a clone: `cd /path/to/memory-powermem && bash install.sh`. Non-interactive: same URL but pipe to `bash -s -y`. Another OpenClaw instance: `bash -s -- --workdir ~/.openclaw-second`. Details and troubleshooting: OpenClaw skill **`install-memory-powermem-full`** ([skills/install-memory-powermem-full/](skills/install-memory-powermem-full/)). +- **OpenClaw skill — quickstart (`install-memory-powermem`):** Copy [skills/install-memory-powermem/SKILL.md](skills/install-memory-powermem/SKILL.md) to `~/.openclaw/skills/install-memory-powermem/`, then say **「PowerMem 快速安装」** / **“PowerMem quickstart”** or **“Minimal install memory-powermem”** / **“Install memory powermem minimal”**. +- **OpenClaw skill — full guide (`install-memory-powermem-full`):** Copy [skills/install-memory-powermem-full/SKILL.md](skills/install-memory-powermem-full/SKILL.md) (and its sibling `.md` files in that folder if you mirror the repo) to `~/.openclaw/skills/install-memory-powermem-full/`, then say **「安装 PowerMem 记忆」** / **“Install PowerMem memory”**. The quickstart and full-guide skills are **independent**; use whichever fits your workflow. - **Manual:** Steps below. --- diff --git a/README_CN.md b/README_CN.md index 0bb1203..8456c71 100644 --- a/README_CN.md +++ b/README_CN.md @@ -40,7 +40,7 @@ pip install powermem ``` -2. 配置:用 [INSTALL.md](INSTALL.md) 里的一键 `install.sh` 生成 `~/.openclaw/powermem/powermem.env`(SQLite 模板),或复制 PowerMem 官方 `.env.example`,填写 `LLM_*`、`EMBEDDING_*`。 +2. 配置:克隆本仓库后在根目录执行 `bash install.sh`(或使用下方「安装方式」里的 curl 一键命令)可生成可选的 `~/.openclaw/powermem/powermem.env` 模板;也可复制 PowerMem 官方 `.env.example` 并填写 `LLM_*`、`EMBEDDING_*`(不依赖 OpenClaw 注入模型时需要)。 3. 若 `pmem` 只在 venv 里,在插件 `config` 里把 `pmemPath` 设为该 venv 下 `pmem` 的绝对路径。 @@ -158,9 +158,13 @@ curl -s http://localhost:8000/api/v1/system/health ## 安装方式 -- **一键安装(Linux/macOS):** 见 [INSTALL.md](INSTALL.md),使用 `install.sh`(curl 或从仓库根目录执行)。 -- **OpenClaw skill(最小安装):** 将 [skills/install-powermem-memory-minimal/SKILL.md](skills/install-powermem-memory-minimal/SKILL.md) 复制到 `~/.openclaw/skills/install-powermem-memory-minimal/`,然后说「**PowerMem 快速安装**」或「**memory-powermem 最小安装**」或 **“Install powermem memory minimal”**。 -- **OpenClaw skill(完整指南):** 将 [skills/install-powermem-memory/SKILL.md](skills/install-powermem-memory/SKILL.md)(若从仓库拷贝,建议连同该目录下其余 `.md` 一并放入 skill 目录)复制到 `~/.openclaw/skills/install-powermem-memory/`,然后说「**安装 PowerMem 记忆**」。最小安装与完整指南两个 skill **彼此独立**,按需选用其一即可。 +- **一键安装(Linux/macOS):** + ```bash + curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash + ``` + 已克隆仓库:`cd /path/to/memory-powermem && bash install.sh`。非交互:同一 curl 命令改为接到 `bash -s -y`。指定另一数据目录:`bash -s -- --workdir ~/.openclaw-second`。更完整的说明与排错见 OpenClaw skill **`install-memory-powermem-full`**([skills/install-memory-powermem-full/](skills/install-memory-powermem-full/))。 +- **OpenClaw skill — 快速安装(`install-memory-powermem`):** 将 [skills/install-memory-powermem/SKILL.md](skills/install-memory-powermem/SKILL.md) 复制到 `~/.openclaw/skills/install-memory-powermem/`,然后说「**PowerMem 快速安装**」或「**memory-powermem 最小安装**」或 **“Install memory powermem minimal”**。 +- **OpenClaw skill — 完整指南(`install-memory-powermem-full`):** 将 [skills/install-memory-powermem-full/SKILL.md](skills/install-memory-powermem-full/SKILL.md)(若从仓库拷贝,建议连同该目录下其余 `.md` 一并放入 skill 目录)复制到 `~/.openclaw/skills/install-memory-powermem-full/`,然后说「**安装 PowerMem 记忆**」。快速安装与完整指南两个 skill **彼此独立**,按需选用其一即可。 - **手动安装:** 按下面步骤操作。 --- diff --git a/install.sh b/install.sh index 7841087..d4403d2 100644 --- a/install.sh +++ b/install.sh @@ -83,7 +83,7 @@ case "$(uname -s)" in *) OS="unknown";; esac if [[ "$OS" == "windows" ]]; then - err "Windows is not supported by this script. Use manual install (see INSTALL.md)." + err "Windows is not supported by this script. Use README.md or skills/install-memory-powermem-full for manual steps." exit 1 fi diff --git a/skills/install-powermem-memory/SKILL.md b/skills/install-memory-powermem-full/SKILL.md similarity index 65% rename from skills/install-powermem-memory/SKILL.md rename to skills/install-memory-powermem-full/SKILL.md index 0ad59a9..31c3c11 100644 --- a/skills/install-powermem-memory/SKILL.md +++ b/skills/install-memory-powermem-full/SKILL.md @@ -1,6 +1,6 @@ --- -name: install-powermem-memory -description: 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. +name: install-memory-powermem-full +description: OpenClaw full guide skill (id and folder name install-memory-powermem-full). Step-by-step install and configuration for the PowerMem long-term memory plugin—options, tools, troubleshooting—and bundled reference docs. Complements the quickstart skill install-memory-powermem; either can be used alone. triggers: - "安装 PowerMem 记忆" - "安装 PowerMem 记忆插件" @@ -13,7 +13,9 @@ triggers: - "What is PowerMem" --- -# PowerMem Memory Guide +# PowerMem Memory — Full Guide + +**Skill id / OpenClaw folder name:** `install-memory-powermem-full`. For the shortest install-only path, use **`install-memory-powermem`** (quickstart). This skill folder includes supplementary docs: @@ -55,11 +57,11 @@ The curl **`install.sh`** deploys the plugin and OpenClaw entries; with **`-y`** - Check: `curl -s http://localhost:8000/api/v1/system/health`. 5. **Install the plugin** - `openclaw plugins install /path/to/memory-powermem`, or **`install.sh`** from [INSTALL.md](https://github.com/ob-labs/memory-powermem/blob/main/INSTALL.md). + `openclaw plugins install /path/to/memory-powermem` (or `openclaw plugins install memory-powermem` from npm), or run **`install.sh`** from the [memory-powermem](https://github.com/ob-labs/memory-powermem) repo — see **One-click plugin deploy (`install.sh`)** below for curl / flags / `--workdir`. 6. **Configure OpenClaw** - **CLI — minimal (recommended, matches plugin defaults):** + **CLI — defaults (recommended, matches plugin defaults):** Do **not** set `envFile` unless you need a file. Example: ```bash @@ -105,6 +107,84 @@ The curl **`install.sh`** deploys the plugin and OpenClaw entries; with **`-y`** openclaw ltm search "coffee" ``` +## One-click plugin deploy (`install.sh`) + +**Requires:** OpenClaw installed (`openclaw --version`). The script does **not** run `pip install powermem`; ensure **`pmem`** is on PATH when the gateway runs or set **`pmemPath`**. + +**Default:** configures plugin **CLI** mode. With **`-y`**, it may still create **`~/.openclaw/powermem/powermem.env`** as an optional template — not required if you use OpenClaw-injected LLM + default SQLite. + +```bash +curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash +``` + +From a local clone (no download): + +```bash +cd /path/to/memory-powermem && bash install.sh +``` + +Non-interactive (defaults: CLI, may seed env file): + +```bash +curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash -s -y +``` + +Target a different OpenClaw instance: + +```bash +curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash -s -- --workdir ~/.openclaw-second +``` + +**What the script does:** resolve OpenClaw workdir → choose or default **cli** / **http** and paths → for CLI, optionally seed `powermem.env` if missing → deploy plugin to `/extensions/memory-powermem` → `npm install` there → set OpenClaw config (`plugins.enabled`, `slots.memory`, `entries.memory-powermem`). + +**After (CLI):** `openclaw gateway`, then `openclaw ltm health` — you usually **do not** need to edit `powermem.env` when using plugin defaults. + +**After (HTTP):** start PowerMem with a proper `.env` in the server cwd, then start the gateway. + +## Copy a skill into OpenClaw + +Copy **one** skill you want into `~/.openclaw/skills//` (folder name should match the skill id). The quickstart and full-guide skills are **independent**. + +**Quickstart (`install-memory-powermem`) — Linux / macOS:** + +```bash +mkdir -p ~/.openclaw/skills/install-memory-powermem +cp /path/to/memory-powermem/skills/install-memory-powermem/SKILL.md \ + ~/.openclaw/skills/install-memory-powermem/ +``` + +**Full guide (`install-memory-powermem-full`) — Linux / macOS:** copy **all** `.md` files in that folder. + +```bash +mkdir -p ~/.openclaw/skills/install-memory-powermem-full +cp /path/to/memory-powermem/skills/install-memory-powermem-full/*.md \ + ~/.openclaw/skills/install-memory-powermem-full/ +``` + +**Full guide — Windows (PowerShell):** + +```powershell +New-Item -ItemType Directory -Force "$env:USERPROFILE\.openclaw\skills\install-memory-powermem-full" +Copy-Item "path\to\memory-powermem\skills\install-memory-powermem-full\*.md" ` + "$env:USERPROFILE\.openclaw\skills\install-memory-powermem-full\" +``` + +## Multi-instance OpenClaw (`--workdir` / `OPENCLAW_STATE_DIR`) + +**Install script:** + +```bash +curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash -s -- --workdir ~/.openclaw-second +``` + +**Manual config** for that instance: + +```bash +OPENCLAW_STATE_DIR=~/.openclaw-second openclaw config set plugins.slots.memory memory-powermem +``` + +Plugin data and default SQLite follow **that** instance’s `stateDir`. + ## Available Tools | Tool | Description | @@ -154,3 +234,4 @@ Restart the gateway after slot or plugin config changes. | **Wrong SQLite file / instance** | Data is under **that OpenClaw instance’s `stateDir`** (`OPENCLAW_STATE_DIR` / `--workdir`). | | **HTTP mode** | Server running, **`baseUrl`** correct, **`apiKey`** if enabled. | | **`openclaw plugins list`**: no `memory-powermem`, or status is not **loaded** | Re-run plugin install; set `plugins.enabled` true and `plugins.slots.memory` = `memory-powermem`; restart **gateway**; run `openclaw plugins list` again until **memory-powermem** shows **loaded**. | +| **Add/search returns 500 or empty** | Check PowerMem / gateway logs; often missing or mismatched **`LLM_*` / `EMBEDDING_*`** in **`envFile`** when **`useOpenClawModel`** is false or overrides are incomplete. | diff --git a/skills/install-powermem-memory/config-reference.md b/skills/install-memory-powermem-full/config-reference.md similarity index 65% rename from skills/install-powermem-memory/config-reference.md rename to skills/install-memory-powermem-full/config-reference.md index c822ef0..86f9ab5 100644 --- a/skills/install-powermem-memory/config-reference.md +++ b/skills/install-memory-powermem-full/config-reference.md @@ -1,6 +1,6 @@ # Config & Commands Quick Reference -Quick reference for this skill folder. See **SKILL.md** for the full install flow. +Quick reference for skill **`install-memory-powermem-full`**. See **SKILL.md** in this folder for the full install flow. --- @@ -8,7 +8,7 @@ Quick reference for this skill folder. See **SKILL.md** for the full install flo - **Python 3.10+** — `python3 --version`. - **Install** — `pip install powermem` (virtualenv recommended). -- **CLI (default)** — No `powermem.env` required for a minimal setup: the plugin injects **SQLite** (under the OpenClaw **state directory**) and **LLM + embedding** from OpenClaw (`agents.defaults.model` + provider keys), as long as `useOpenClawModel` is `true` (default). +- **CLI (default)** — No `powermem.env` required for the default setup: the plugin injects **SQLite** (under the OpenClaw **state directory**) and **LLM + embedding** from OpenClaw (`agents.defaults.model` + provider keys), as long as `useOpenClawModel` is `true` (default). - **`pmem` on PATH** — When you start `openclaw gateway`, the same environment should expose `pmem`, or set plugin `pmemPath` to the binary’s absolute path (e.g. inside a venv). - **Optional `.env`** — Set `envFile` to a PowerMem `.env` if you want file-based overrides; if the file exists, it is loaded first, then OpenClaw-derived variables **override** the same keys (when `useOpenClawModel` is true). - **HTTP (shared server)** — Run `powermem-server` with its own `.env`; plugin `mode: http` + `baseUrl`. Verify with `curl` on `/api/v1/system/health`. @@ -67,3 +67,49 @@ openclaw config set plugins.slots.memory memory-powermem ``` Restart the gateway after changing plugin or memory-slot config. + +--- + +## Example `openclaw.json` fragments (manual edit) + +Prefer `openclaw config set` when possible; use these when editing **`~/.openclaw/openclaw.json`** (or your instance’s config) directly. Replace paths with the user’s home / real `pmem` binary path. + +**CLI mode (explicit `envFile`; optional when using OpenClaw-injected LLM + defaults):** + +```json +{ + "plugins": { + "enabled": true, + "slots": { "memory": "memory-powermem" }, + "entries": { + "memory-powermem": { + "enabled": true, + "config": { + "mode": "cli", + "envFile": "/home/you/.openclaw/powermem/powermem.env", + "pmemPath": "pmem", + "autoCapture": true, + "autoRecall": true, + "inferOnAdd": true + } + } + } + } +} +``` + +If `pmem` lives only inside a venv, set **`pmemPath`** to that binary’s absolute path. With **`useOpenClawModel: true`** and no need for a file, you can omit **`envFile`** (see **SKILL.md** for the recommended `openclaw config set` flow). + +**HTTP mode (shared server):** + +```json +"config": { + "mode": "http", + "baseUrl": "http://localhost:8000", + "autoCapture": true, + "autoRecall": true, + "inferOnAdd": true +} +``` + +If you omit **`mode`** but set a non-empty **`baseUrl`**, the plugin treats the backend as **http** (backward compatible). Add **`apiKey`** when the server requires it. diff --git a/skills/install-powermem-memory/powermem-intro.md b/skills/install-memory-powermem-full/powermem-intro.md similarity index 94% rename from skills/install-powermem-memory/powermem-intro.md rename to skills/install-memory-powermem-full/powermem-intro.md index 0bf64f0..cc7f672 100644 --- a/skills/install-powermem-memory/powermem-intro.md +++ b/skills/install-memory-powermem-full/powermem-intro.md @@ -1,6 +1,6 @@ # PowerMem Introduction -Use this doc when the user asks "what is PowerMem", "why use PowerMem", or needs a product overview. +Ships with OpenClaw skill **`install-memory-powermem-full`** (folder `install-memory-powermem-full`). Use this doc when the user asks "what is PowerMem", "why use PowerMem", or needs a product overview. --- diff --git a/skills/install-powermem-memory-minimal/SKILL.md b/skills/install-memory-powermem/SKILL.md similarity index 72% rename from skills/install-powermem-memory-minimal/SKILL.md rename to skills/install-memory-powermem/SKILL.md index 15e4959..dd6af1b 100644 --- a/skills/install-powermem-memory-minimal/SKILL.md +++ b/skills/install-memory-powermem/SKILL.md @@ -1,6 +1,6 @@ --- -name: install-powermem-memory-minimal -description: memory-powermem 最小安装步骤(OpenClaw + PowerMem 长期记忆),面向个人用户;无需单独配置 powermem.env,复用 OpenClaw 里已配好的对话模型。本 skill 可独立分发,不依赖其他安装类 skill。 +name: install-memory-powermem +description: OpenClaw skill「快速安装」路径(skill id 与目录名均为 install-memory-powermem):memory-powermem + PowerMem 最少步骤,面向个人用户;无需单独配置 powermem.env,复用 OpenClaw 里已配好的对话模型。可独立分发;完整选项、工具说明与排错见 install-memory-powermem-full。 triggers: - "PowerMem 快速安装" - "PowerMem 最简单安装" @@ -12,10 +12,12 @@ triggers: - "PowerMem quickstart" - "Easiest PowerMem setup" - "Minimal install memory-powermem" - - "Install powermem memory minimal" + - "Install memory powermem minimal" --- -# PowerMem 记忆 · 极简安装(个人用户) +# PowerMem 记忆 · 快速安装(个人用户) + +本 skill 在 OpenClaw 中的标识与建议目录名为 **`install-memory-powermem`**。若需要 HTTP/多实例、工具表与详细排错,请改用 **`install-memory-powermem-full`**(仓库内 `skills/install-memory-powermem-full/`,需一并拷贝该目录下全部 `.md`)。 你只要记住几件事:**OpenClaw 能正常聊天**、**Python 先确认 ≥ 3.10**、**本机装好 PowerMem**、**装上插件**。不用手写 `powermem.env`,记忆用的模型和 Key 会跟你在 OpenClaw 里配的一样。 @@ -52,11 +54,12 @@ triggers: - 在插件配置里把 **`pmemPath`** 写成 venv 里 `pmem` 的**完整路径**(装完后可用 `which pmem` 查看)。 5. **一键装插件(推荐)** - 在 **Mac / Linux** 上执行(需已安装 OpenClaw): + 在 **Mac / Linux** 上执行(需已安装 OpenClaw)。脚本**不会**替你执行 `pip install powermem`;装插件前仍需完成上面的 PowerMem 与 `pmem` 步骤。 ```bash curl -fsSL https://raw.githubusercontent.com/ob-labs/memory-powermem/main/install.sh | bash -s -y ``` - 脚本会把插件放进 OpenClaw,并打开「用 OpenClaw 的模型驱动记忆」等默认选项。 + 已克隆本仓库时,也可在仓库根目录执行:`bash install.sh`(可加 `-y`、或 `bash -s -- --workdir ~/.openclaw-second` 指定另一套 OpenClaw 数据目录)。 + 脚本会把插件放进 OpenClaw,并打开「用 OpenClaw 的模型驱动记忆」等默认选项;带 `-y` 时仍可能生成可选模板 **`~/.openclaw/powermem/powermem.env`**(默认路径下通常不必手改)。 6. **重启网关并检查** ```bash @@ -88,7 +91,7 @@ triggers: | `pmem` 找不到 | 激活 venv,或配置 **`pmemPath`** 为绝对路径。 | | `plugins list` 没有 **memory-powermem**,或状态不是 **loaded** | 确认已执行安装脚本或 `openclaw plugins install`;`plugins.enabled` 为 true、`plugins.slots.memory` 为 **memory-powermem**;改完后**重启 gateway**,再执行 `openclaw plugins list` 复查。 | | `ltm health` 不健康 | 确认 OpenClaw 里**默认模型**和 API Key 本身能聊天;升级 OpenClaw 到较新版本后再试。 | -| 想要更多选项(多实例、HTTP、自建服务器等) | 查阅 **[memory-powermem](https://github.com/ob-labs/memory-powermem)** 仓库根目录的 **INSTALL.md** 与 **README**。 | +| 想要更多选项(多实例、HTTP、`install.sh` 细节、工具与排错表等) | 使用 **`install-memory-powermem-full`** skill(含 **config-reference.md**),或查阅 **[memory-powermem](https://github.com/ob-labs/memory-powermem)** 的 **README**。 | ---