← 返回 Skills 市场
Smart Memory
作者
chenghaifeng08-creator
· GitHub ↗
· v2.5.1
· MIT-0
137
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install smart-memory-automaton
功能描述
Persistent local cognitive memory for OpenClaw via a Node adapter and FastAPI engine.
安全使用建议
This package appears to implement a full local memory runtime and mostly does what it says, but there are several elevated-risk items to review before installing and wiring it into a live agent:
- Prompt injection: The SKILL.md recommends adding lines to your agent base prompt and using hooks that inject [ACTIVE CONTEXT] before model responses. That will change the model's system-level guidance; inspect/modify those lines to ensure they don't give unintended privileges or instructions.
- Local file access: The integration/priming steps read local files (SOUL.md, USER.md, memory/YYYY-MM-DD.md and other workspace files). Confirm the allowlist/path restrictions and verify the server's code (search for any file-read code) so it doesn't access unintended system files. The changelog mentions path-traversal fixes and an allowlist, but you should validate those protections in the code shipped to you.
- Remote code/model downloads: The Nomic embedder uses sentence-transformers with trust_remote_code=True and a nomic model — installing or instantiating this will download remote model artifacts and may execute code. If you must use this embedder, prefer a controlled environment (air-gapped or vetted model wheels) or use the deterministic hashing embedder fallback.
- Post-install scripts: Review postinstall.js, install.sh, and smem-hook.sh before running npm/pip install. Run installs inside an isolated virtualenv or container and avoid running as root.
- Run in isolation first: Start the memory service in a container or VM with mounted data volumes you control, and verify network activity before connecting it to production agents. Monitor the service's outgoing network calls during model downloads and runtime.
- If you plan to auto-wire this into an agent's startup flow, consider keeping the memory server as a sidecar process and require explicit operator approval before the agent adopts injected system prompts.
If you want, I can point to the exact files/functions to audit (postinstall.js, smem-hook.sh, embeddings/nomic_embedder.py, and any file-read paths) or create a short checklist of lines to review.
功能分析
Type: OpenClaw Skill
Name: smart-memory-automaton
Version: 2.5.1
The Smart Memory v2.5 bundle is a comprehensive local cognitive memory system for OpenClaw agents. It utilizes a FastAPI backend (server.py) for neural embeddings and vector storage (SQLite), managed by a Node.js adapter (smart-memory/index.js) that handles the lifecycle of the local service. The system implements sophisticated memory features including episodic/semantic storage, background reflection, and importance-based decay. Analysis of the installation scripts (install.sh, postinstall.js) and the core logic shows no evidence of malicious intent; the code operates strictly on the local loopback (127.0.0.1) and within the designated OpenClaw workspace. The documentation (SKILL.md, README.md) provides legitimate instructions for agent integration, and the changelog indicates a history of proactive security fixes (e.g., addressing path traversal in v2.1.2).
能力评估
Purpose & Capability
Name/description match the included code: FastAPI server, Node adapter, ingestion/retrieval, background cognition, and OpenClaw hooks. The files and exported methods align with a local memory runtime. Minor mismatch: code reads an env var (COGNITIVE_EMBEDDER) and supports Nomic embeddings but requires no declared env vars in the registry metadata.
Instruction Scope
SKILL.md instructs agents/operators to inject active context into the agent base prompt and to run priming scripts that read local files (SOUL.md, USER.md, .session-memory-context.json, memory/YYYY-MM-DD.md). This is functionally consistent with a memory skill, but the explicit advice to modify the agent base prompt and to run startup scripts is a prompt-injection vector that can influence model behavior beyond typical tool calls. The docs also instruct reading workspace files — appropriate for memory but increases risk of accidental exposure of sensitive files if misconfigured. The changelog references earlier path-traversal fixes and allowlists, which mitigates some file-read risk but the runtime instructions still grant broad discretion to read and inject local context.
Install Mechanism
There is no automated install spec in the registry, but SKILL.md directs full local installation (python venv, pip install torch from PyTorch CPU index, pip -r requirements, npm install). The package contains postinstall.js and install scripts (postinstall, install.sh, smem-hook.sh). More importantly, the local Nomic embedder uses sentence-transformers with trust_remote_code=True and model nomic-ai/nomic-embed-text-v1.5 — this will fetch models/code from remote hosts during install/runtime. That behavior increases risk and should be reviewed before running network install steps.
Credentials
Registry metadata declares no required env vars or credentials, which is consistent with a local-only memory skill. However, the code checks COGNITIVE_EMBEDDER (not declared) and the Nomic embedder may fetch remote weights/code. There are no cloud API keys requested, which is good. The combination of on-disk storage under data/ and instructions to copy scripts into ~/.openclaw implies write/read access to home/workspace files — appropriate for a memory runtime but not proportionally trivial, so operators should confirm intended storage locations and permissions.
Persistence & Privilege
The skill is not force-included (always:false) and does not itself request system-wide privileges. However, documentation instructs copying priming scripts into user home and adding lines to the agent base prompt; those are manual steps that, if followed, make the agent read local context automatically at startup. That is expected for a memory skill but increases the blast radius if the skill or its prompt guidance is malicious.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install smart-memory-automaton - 安装完成后,直接呼叫该 Skill 的名称或使用
/smart-memory-automaton触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.5.1
- Internal metadata updated (`_meta.json`).
- No changes to functionality, APIs, or documentation content.
- All interfaces and usage remain the same.
v1.0.0
Initial release
元数据
常见问题
Smart Memory 是什么?
Persistent local cognitive memory for OpenClaw via a Node adapter and FastAPI engine. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 137 次。
如何安装 Smart Memory?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install smart-memory-automaton」即可一键安装,无需额外配置。
Smart Memory 是免费的吗?
是的,Smart Memory 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Smart Memory 支持哪些平台?
Smart Memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Smart Memory?
由 chenghaifeng08-creator(@chenghaifeng08-creator)开发并维护,当前版本 v2.5.1。
推荐 Skills