跳到主内容
智客 ZICQ

技能库 智客分类:其他 neural-memory OpenClaw

Neural Memory

与传播活化 持续,智能的回想有关联 在下列情况下采用鼓励性方法: (1)您需要记住事实,决定,错误,或整个会话的背景 (2) 用户询问"您是否记得"或者引用过去的对话 (3) 开始一个新的任务——从记忆中注入相关的上下文 (4) 在做出决定或遇到错误后存储以备日后参考 (5) 用户询问"X为什么会发生?" 通过记忆零LLM依赖来追踪因果关系链. 有赫比学的神经图,记忆衰减,矛盾检测,以及时间推理.

430 安装量 · 10 星标

官方网址:作者主页

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

与传播活化 持续,智能的回想有关联 在下列情况下采用鼓励性方法: (1)您需要记住事实,决定,错误,或整个会话的背景 (2) 用户询问"您是否记得"或者引用过去的对话 (3) 开始一个新的任务——从记忆中注入相关的上下文 (4) 在做出决定或遇到错误后存储以备日后参考 (5) 用户询问"X为什么会发生?" 通过记忆零LLM依赖来追踪因果关系链. 有赫比学的神经图,记忆衰减,矛盾检测,以及时间推理.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:NeuralMemory — Associative Memory for AI Agents、Setup、1. Install NeuralMemory、2. Install the OpenClaw Plugin (Recommended)、Install from npm、Alternative: MCP Configuration (Manual)。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Associative memory with spreading activation for persistent, intelligent recall. Use PROACTIVELY when: (1) You need to remember facts, decisions, errors, or context across sessions (2) User asks "do you remember..." or references past conversations (3) Starting a new task — inject relevant context from memory (4) After making decisions or encountering errors — store for future reference (5) User asks "why did X happen?" — trace causal chains through memory Zero LLM dependency. Neural graph with Hebbian learning, memory decay, contradiction detection, and temporal reasoning.

NeuralMemory — Associative Memory for AI AgentsSetup1. Install NeuralMemory2. Install the OpenClaw Plugin (Recommended)Install from npmAlternative: MCP Configuration (Manual)3. VerifyTroubleshootingTools ReferenceCore Memory ToolsIntelligence ToolsManagement Tools

来源分类:ClawHub Learning

SKILL.md 与 Agent 调用

官方规范 ↗
name
neural-memory
description
Associative memory with spreading activation for persistent, intelligent recall. Use PROACTIVELY when: (1) You need to remember facts, decisions, errors, or context across sessions (2) User asks "do you remember..." or references past conversations (3) Starting a new task — inject relevant context from memory (4) After making decisions or encountering errors — store for future reference (5) User asks "why did X happen?" — trace causal chains through memory Zero LLM dependency. Neural graph with Hebbian learning, memory decay, contradiction detection, and temporal reasoning.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「neural-memory」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-1682d383f24cb38f-Neural-Memory.html
请存为 .cursor/skills/neural-memory/SKILL.md 或 .claude/skills/neural-memory/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

当前没有明确的 GitHub 技能包地址,请按来源页面的安装器说明操作。

ClawHub ↗

阅读排版
--- name: neural-memory description: | Associative memory with spreading activation for persistent, intelligent recall. Use PROACTIVELY when: (1) You need to remember facts, decisions, errors, or context across sessions (2) User asks "do you remember..." or references past conversations (3) Starting a new task — inject relevant context from memory (4) After making decisions or encountering errors — store for future reference (5) User asks "why did X happen?" — trace causal chains through memory Zero LLM dependency. Neural graph with Hebbian learning, memory decay, contradiction detection, and temporal reasoning. homepage: https://github.com/nhadaututtheky/neural-memory metadata: {"openclaw":{"emoji":"brain","primaryEnv":"NEURALMEMORY_BRAIN","requires":{"bins":["python3"],"env":["NEURALMEMORY_BRAIN"]},"os":["darwin","linux","win32"],"install":[{"id":"pip","kind":"node","package":"neural-memory","bins":["nmem"],"label":"pip install neural-memory"}]}} --- # NeuralMemory — Associative Memory for AI Agents A biologically-inspired memory system that uses spreading activation instead of keyword/vector search. Memories form a neural graph where neurons connect via 20 typed synapses. Frequently co-accessed memories strengthen their connections (Hebbian learning). Stale memories decay naturally. Contradictions are auto-detected. **Why not just vector search?** Vector search finds documents similar to your query. NeuralMemory finds *conceptually related* memories through graph traversal — even when there's no keyword or embedding overlap. "What decision did we make about auth?" activates time + entity + concept neurons simultaneously and finds the intersection. ## Setup ### 1. Install NeuralMemory ```bash pip install neural-memory ``` The brain and config at `~/.neuralmemory/` are auto-created on first use. ### 2. Install the OpenClaw Plugin (Recommended) The plugin occupies the exclusive **memory slot** — auto-injects context before each agent run and auto-captures memories after. ```bash # Install from npm npm install -g neuralmemory ``` Add to `~/.openclaw/openclaw.json`: ```json { "plugins": { "load": { "paths": [""] }, "entries": { "neuralmemory": { "enabled": true, "config": { "pythonPath": "python", "brain": "default", "autoContext": true, "autoCapture": true } } }, "slots": { "memory": "neuralmemory" } } } ``` **Plugin features:** - 6 tools registered automatically (nmem_remember, nmem_recall, nmem_context, nmem_todo, nmem_stats, nmem_health) - `before_agent_start` hook: injects tool instructions + relevant memories as context (persists across `/new`) - `agent_end` hook: auto-extracts facts, decisions, and TODOs from the conversation - Configurable: `contextDepth` (0-3), `maxContextTokens` (100-10000) **After installing, build the plugin:** ```bash cd npm run build ``` This compiles TypeScript to JavaScript in `dist/`. The plugin entry point is `dist/index.js`. #### Windows Installation On Windows, use forward slashes or escaped backslashes in `openclaw.json` paths: ```json { "plugins": { "load": { "paths": ["C:/Users//AppData/Roaming/npm/node_modules/neuralmemory"] } } } ``` To find the installed path: ```powershell npm list -g neuralmemory --parseable ``` If `openclaw plugins list` doesn't show the plugin: 1. Verify the path in `openclaw.json` points to the package root (where `package.json` is) 2. Ensure `npm run build` was run (the `dist/` folder must exist with compiled `.js` files) 3. Use `python` instead of `python3` in the plugin config (Windows default) ### Alternative: MCP Configuration (Manual) If you prefer MCP over the plugin, add to `~/.openclaw/mcp.json`: ```json { "mcpServers": { "neural-memory": { "command": "python", "args": ["-m", "neural_memory.mcp"], "env": { "NEURALMEMORY_BRAIN": "default" } } } } ``` On Windows, use `"python"` (not `"python3"`). This gives you all 63 MCP tools but without the auto-context/auto-capture hooks. ### 3. Verify ```bash nmem stats ``` You should see brain statistics (neurons, synapses, fibers). ### Troubleshooting | Symptom | Cause | Fix | |---------|-------|-----| | `openclaw plugins list` doesn't show plugin | Plugin path wrong or not built | Run `npm run build`, verify path in `openclaw.json` | | Agent runs `nmem remember` in terminal | Agent confused CLI vs tool | Plugin now auto-injects tool instructions via `systemPrompt` | | Agent forgets tools after `/new` | No tool instructions in new session | Plugin now injects `systemPrompt` on every `before_agent_start` | | `python3 not found` (Windows) | Windows uses `python` not `python3` | Set `pythonPath: "python"` in plugin config | | Timeout errors | Slow machine or large brain | Increase `timeout` in plugin config (max 120000ms) | ## Tools Reference ### Core Memory Tools | Tool | Purpose | When to Use | |------|---------|-------------| | `nmem_remember` | Store a memory | After decisions, errors, facts, insights, user preferences | | `nmem_recall` | Query memories | Before tasks, when user references past context, "do you remember..." | | `nmem_context` | Get recent memories | At session start, inject fresh context | | `nmem_todo` | Quick TODO with 30-day expiry | Task tracking | ### Intelligence Tools | Tool | Purpose | When to Use | |------|---------|-------------| | `nmem_auto` | Auto-extract memories from text | After important conversations — captures decisions, errors, TODOs automatically | | `nmem_recall` (depth=3) | Deep associative recall | Complex questions requiring cross-domain connections | | `nmem_habits` | Workflow pattern suggestions | When user repeats similar action sequences | ### Management Tools | Tool | Purpose | When to Use | |------|---------|-------------| | `nmem_health` | Brain health diagnostics | Periodic checkup, before sharing brain | | `nmem_stats` | Brain statistics | Quick overview of memory counts | | `nmem_version` | Brain snapshots and rollback | Before risky operations, version checkpoints | | `nmem_transplant` | Transfer memories between brains | Cross-project knowledge sharing | ## Workflow ### At Session Start 1. Call `nmem_context` to inject recent memories into your awareness 2. If user mentions a specific topic, call `nmem_recall` with that topic ### During Conversation 3. When a decision is made: `nmem_remember` with type="decision" 4. When an error occurs: `nmem_remember` with type="error" 5. When user states a preference: `nmem_remember` with type="preference" 6. When asked about past events: `nmem_recall` with appropriate depth ### At Session End 7. Call `nmem_auto` with action="process" on important conversation segments 8. This auto-extracts facts, decisions, errors, and TODOs ## Examples ### Remember a decision ``` nmem_remember( content="Use PostgreSQL for production, SQLite for development", type="decision", tags=["database", "infrastructure"], priority=8 ) ``` ### Recall with spreading activation ``` nmem_recall( query="database configuration for production", depth=1, max_tokens=500 ) ``` Returns memories found via graph traversal, not keyword matching. Related memories (e.g., "deploy uses Docker with pg_dump backups") surface even without shared keywords. ### Trace causal chains ``` nmem_recall( query="why did the deployment fail last week?", depth=2 ) ``` Follows CAUSED_BY and LEADS_TO synapses to trace cause-and-effect chains. ### Auto-capture from conversation ``` nmem_auto( action="process", text="We decided to switch from REST to GraphQL because the frontend needs flexible queries. The migration will take 2 sprints. TODO: update API docs." ) ``` Automatically extracts: 1 decision, 1 fact, 1 TODO. ## Key Features - **Zero LLM dependency** — Pure algorithmic: regex, graph traversal, Hebbian learning - **Spreading activation** — Associative recall through neural graph, not keyword/vector search - **20 synapse types** — Temporal (BEFORE/AFTER), causal (CAUSED_BY/LEADS_TO), semantic (IS_A/HAS_PROPERTY), emotional (FELT/EVOKES), conflict (CONTRADICTS) - **Memory lifecycle** — Short-term → Working → Episodic → Semantic with Ebbinghaus decay - **Contradiction detection** — Auto-detects conflicting memories, deprioritizes outdated ones - **Hebbian learning** — "Neurons that fire together wire together" — memory improves with use - **Temporal reasoning** — Causal chain traversal, event sequences, temporal range queries - **Brain versioning** — Snapshot, rollback, diff brain state - **Brain transplant** — Transfer filtered knowledge between brains - **Vietnamese + English** — Full bilingual support for extraction and sentiment ## Depth Levels | Depth | Name | Speed | Use Case | |-------|------|-------|----------| | 0 | Instant | <10ms | Quick facts, recent context | | 1 | Context | ~50ms | Standard recall (default) | | 2 | Habit | ~200ms | Pattern matching, workflow suggestions | | 3 | Deep | ~500ms | Cross-domain associations, causal chains | ## Notes - Memories are stored locally in SQLite at `~/.neuralmemory/brains/.db` - No data is sent to external services (unless optional embedding provider is configured) - Brain isolation: each brain is independent, no cross-contamination - `nmem_remember` returns fiber_id for reference tracking - Priority scale: 0 (trivial) to 10 (critical), default 5 - Memory types: fact, decision, preference, todo, insight, context, instruction, error, workflow, reference

相关技能

其他

Self Improving Agent

掌握学习、错误和校正,以便不断改进。 使用时间:(1) 命令或操作意外失败, (2) 用户更正 Claude ('No, that's wrong...', 'Actually...'), (3)用户请求具备不存在的能力,(4)外部API或工具失败,(5)克洛德意识到其知识已经过…

其他

Self Improving + Proactive Agent

自我反省+自我批评+自我学习+自我组织记忆. 特工评估自己的工作,发现错误,并永久改进. 当 (1) 命令,工具, API, 或操作失败时使用; (2) 用户纠正或拒绝您的工作; (3) 您意识到您的知识已经过时或不正确; (4) 您发现更好的方法; (5) 用户明确安装或引用当…

其他

Proactive Agent

将AI代理人从任务跟踪者转变为预先预测需要并不断改进的主动伙伴. 现在WAL协议,工作缓冲,自主克龙, 和战斗测试模式。 哈尔·斯塔克的一部分

其他

Multi Search Engine

多搜索引擎集成16个引擎(7个CN+9 Global). 支持高级搜索操作员,时间过滤器,站点搜索,隐私引擎,和WolframAlpha知识查询. 不需要 API 密钥 .