记忆

Totalreclaw

试用

OpenClaw 原生 kind:memory 提供方,端到端加密、链上去中心化存储,后台自动捕获事实。

它能做什么

TotalReclaw 是 OpenClaw 原生的 kind:memory 提供方。回忆通过标准的 memory_search 与 memory_get 工具完成,事实由轨迹轮询器在后台自动提取,无需每条偏好都手动调用工具。记忆以端到端加密方式存储在去中心化网络上,而不是任何单一公司的服务器,也不会写入本地 MEMORY.md/USER.md 等文件。配对由用户在浏览器中扫码发起,12 词恢复助记词始终不进入 Agent 的上下文。

什么时候用它

  • 回忆 Agent 关于用户的记忆(回答"我的 X 是什么""你还记得吗")
  • 用户明确说"记住 X / 保存 X / 别忘了 X"时调用 memory_save 写入
  • 通过浏览器扫码流程配对加密记忆钱包
  • 修复重装后插件停留在 Status: disabled、内存槽卡在 memory-core 的情况

技能文档

TotalReclaw — OpenClaw native memory provider

End-to-end encrypted memory stored across a decentralized network (not on a single company server). TotalReclaw is OpenClaw's native kind:"memory" provider: recall runs through the conventional memory_search / memory_get tools (the same surface active-memory uses), and facts are captured automatically in the background — you do not call a tool to remember each fact. This skill tells you the install + account-setup flow and when to drive recall explicitly.

How memory works here (read first)

  • Recall is native. memory_search and memory_get are the memory tools. OpenClaw's active-memory sub-agent routes recall through them and the plugin injects guidance telling you when to search. When the user asks about themselves ("what's my X?", "do I X?", "what do you remember?"), call memory_search. If 0 results, say so plainly — don't guess from session history.
  • Capture is automatic. The plugin extracts facts from the conversation in the background (trajectory poller). You do not call a tool on every preference/fact the user states — that happens for you. Never write user facts to MEMORY.md, USER.md, or any local file; those are agent-persona config, user memories live encrypted on-chain.
  • Explicit remember only on request, via the memory_save tool. If the user explicitly says "remember X" / "save X" / "note X" / "don't forget X", call the memory_save tool with the fact as text — one call per distinct atomic fact. Read the returned ok/stored and report it truthfully: say "Saved" only when stored >= 1; stored: 0 means it was a near-duplicate of an existing memory (say so, do NOT say "Saved"); ok: false means the store failed (surface the error to the user). Use the memory_save tool for this — never a shell command (see the next rule).
  • NEVER shell out to tr or any CLI to store a memory. A bare tr remember "X" runs GNU coreutils tr — a character-translator that exits silently with no output, NOT a TotalReclaw command — so reporting "Saved" after it is silent data loss (the exact bug this rule exists to prevent). Explicit "remember X" goes through the memory_save tool ONLY. If memory_save is unavailable (not registered, or it returned disabled/ok: false), do NOT fall back to a shell command or to writing MEMORY.md/USER.md/any local file — tell the user plainly that you cannot store the memory right now and surface the tool's error. There is no second write path.

Do not describe storage as "local", "local-only", "stored locally", "on disk", or "without an account" — memories are decentralized on-chain (not on any single company server) and an account is required to derive the encryption key.

Phrase safety (HARD)

The 12-word recovery phrase MUST NEVER enter chat or the agent's LLM context. The plugin's browser-based pair flow handles phrase generation and import. Never echo it, never ask the user to paste it, never pass it to any tool. If the user pastes one anyway, tell them it's compromised and re-pair for a fresh wallet.

HARD guardrail — install/reinstall/upgrade flows: During install, reinstall, upgrade, or any verification steps, the agent MUST NOT read, list, cat, show, display, or inspect credentials.json, ~/.totalreclaw/credentials.json, ~/.totalreclaw*/credentials.json, ~/.openclaw/plugins/totalreclaw/credentials.json, or ANY credentials/phrase/key/secrets file — for ANY reason, including "verifying the install." These files contain encryption key material and Smart Account addresses that MUST NOT enter the LLM context. Never run ls, find, cat, show, or similar commands against plugin directories to "check files."

Install

openclaw plugins install @totalreclaw/totalreclaw
openclaw skills install totalreclaw
openclaw plugins enable totalreclaw

Published on npm + ClawHub (p-diogo, GitHub-verified). For a release candidate, pin with @rc; stable resolves from latest. Run openclaw plugins enable totalreclaw right after install, always — it binds the memory slot. On a clean install that's a no-op; on a reinstall over a previous version it's what stops the plugin from landing Status: disabled with the slot stuck at memory-core (a disabled plugin never registers its memory tools or pair routes, so pairing later fails with a 502). The plugin self-applies the rest of the gateway config it needs on load and auto-reloads (see Restart below) — no manual gateway restart.

Reinstall recovery. If install reports already exists / delete it first, do not add --force (it writes a broken version=None record). Clean the leftover package dir and reinstall — this never touches your credentials, which live under ~/.totalreclaw/:

openclaw plugins uninstall totalreclaw
rm -rf ~/.openclaw/npm/projects/*totalreclaw-totalreclaw*
openclaw plugins install @totalreclaw/totalreclaw
openclaw plugins enable totalreclaw

Setup (pair — user-initiated QR)

Pairing is a deliberate, user-initiated flow (the plugin does not auto-pair on load). When credentials don't exist:

  1. Mint a pair session via the plugin's in-process HTTP route — the gateway process owns the relay pair WebSocket, so it survives until the user completes:

    curl -s http://localhost:18789/plugin/totalreclaw/pair/init
    

    → returns {"url":"https://…/pair/p/#pk=…","pin":"123456","expires_at_ms":…}.

    Do NOT use tr pair --json for this. The CLI holds the pair WebSocket in a subprocess that OpenClaw's ~30s shell-tool timeout kills — the WS then drops, and when the user submits their phrase the relay returns a 502 (gateway_disconnected). The in-process route above avoids that entirely. Only fall back to the CLI if the route is unreachable (no curl, or a pre-3.3.12 plugin), and then it MUST be detached so the WS outlives the shell exec: setsid -f node "$TR_CLI" pair --json < /dev/null — never run tr pair in the foreground.

  2. Surface the url and pin to the user verbatim (read from the JSON; never invent values): "Open in your browser, enter PIN, and generate or paste your 12-word recovery phrase. This link expires in 10 minutes (at ``). Reply done once it's sealed." Emit the URL as plain text on its own line — the #pk= fragment breaks if wrapped in backticks/markdown.

  3. The user completes in the browser (phrase is generated/imported browser-side, encrypted, uploaded to the relay — never touches this chat). On completion ~/.totalreclaw/credentials.json is written.

  4. Confirm: ✓ TotalReclaw set up. (If credentials already exist when first asked: ✓ TotalReclaw is already set up.)

Pair is UNCONDITIONAL when no credentials — the user installing/requesting setup IS the consent; do not add a second consent gate. tr --help lists every subcommand.

TR_CLI="$(ls -d ~/.openclaw/npm/node_modules/@totalreclaw/totalreclaw/dist/cli/tr-cli.js ~/.openclaw/extensions/totalreclaw/dist/cli/tr-cli.js 2>/dev/null | head -1)"
node "$TR_CLI" status --json      # {"version":"…","paired":true,…}

Restart (agent-driven, never user-manual)

The plugin self-reloads: after install it writes the gateway config it needs and signals SIGUSR1 to its own PID so the gateway picks it up without a manual restart. If memory_search/memory_get are not bound (tools didn't take effect on first load), issue the literal slash command /totalreclaw-restart autonomously — announce it in one line, never ask the user to authorize it, never stall, never kill / docker restart / prompt the user to restart. This mirrors the autonomous-restart pattern other runtimes use; the user should never perform a manual restart.

Tools + CLI surface

Agent-facing (native memory contract): memory_search (recall), memory_get (read one memory by citation), memory_save (explicit write — use for "remember X" / "save X" / "note X").

Curation + status CLI (tr, i.e. node "$TR_CLI" …): tr pin / tr unpin · tr retype · tr set_scope · tr status · tr export · tr pair. The tr remember --json "X" CLI is the underlying store path the memory_save tool wraps — prefer the tool (it cannot be confused with GNU coreutils tr). Import + plan upgrade run via the gateway subcommand: openclaw totalreclaw import from --file [--json], openclaw totalreclaw upgrade [--json], openclaw totalreclaw import status|abort.

The legacy totalreclaw_* agent tools and the tr recall CLI are retired — recall is memory_search, explicit capture is the memory_save tool (not a shell-out to tr). If a stale guide references them, follow this SKILL instead.

Full guide:

常见问题

如何回忆记忆?
调用 memory_search;若返回 0 条结果,请直接说明没找到,不要从会话历史中猜测。用 memory_get 按 citation 读取单条记忆。
能用 shell 调用 `tr` 来保存记忆吗?
不可以 —— 裸 `tr` 是 GNU coreutils 的字符翻译工具,会静默退出,不是 TotalReclaw。请用 memory_save 工具处理"记住 X"这类请求;若该工具不可用,不要回退到 shell 命令或写入 MEMORY.md/USER.md 等本地文件。
记忆存在哪里,需要账户吗?
端到端加密存储在去中心化网络上,不在任何单一公司服务器上,也不是本地文件。需要先完成配对以派生加密密钥;12 词恢复助记词在浏览器侧生成并保留,严禁进入 Agent 上下文。

相关技能

OpenClaw memory distillation & organization: distill conversations into MEMORY.md + daily logs, solves context overflow, first-run memory building, dedup, sensitive-info skip, per-agent isolated. 中文:OpenClaw 记忆整理工具,对话蒸馏为结构化记忆,解决上下文溢出;缺失时自动首次建忆;增量去重;敏感信息跳过;每个 agent 独立处理。触发词:蒸馏记忆/整理对话/压缩上下文。

OpenClaw 版 Claude-Mem:自动扫描旧 Session 文件,AI 提炼决策、偏好、事实,追加写入 memory/;同步清理 .jsonl + .trajectory.jsonl,释放数百 MB 磁盘。提炼比清理先跑,记忆不丢失;提炼失败的文件自动 Quarantine 不删,避免静默丢数据。

21 次安装

OpenClaw local knowledge-base retriever: hierarchical data_structure.md index navigation + progressive retrieval, zero external dependencies, Windows & macOS. Use when user asks to retrieve/answer from a knowledge base directory (knowledge base/retrieve/ RAG over local files). 面向本地知识库目录的检索和问答助手。

Long-term memory for OpenClaw agents — SQLite hybrid recall (FTS5 + keyword + associative expansion + optional LLM embeddings), raw/curated anchors, session...

Inspect, back up, search, export, and update OpenClaw long-term memory stored with MemoryOS. Use when Codex needs to manage MemoryOS memory files for an Open...

24 次安装

Reuse, inspect, search, or append shared OpenClaw memory on the current machine. Use when a request depends on remembered local servers, deploy hosts, intern...

15 次安装