← 返回 Skills 市场
zhuyu28

Neural Memory Enhanced

作者 zhuyu28 · GitHub ↗ · v1.0.0
darwinlinuxwin32 ⚠ suspicious
514
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install neural-memory-enhanced
功能描述
Associative memory with spreading activation for persistent, intelligent recall. Use PROACTIVELY when: (1) You need to remember facts, decisions, errors, or...
使用说明 (SKILL.md)

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

pip install neural-memory
nmem init

This creates ~/.neuralmemory/ with a default brain and configures MCP automatically.

2. Configure MCP for OpenClaw

Add to your OpenClaw MCP configuration (~/.openclaw/mcp.json or project openclaw.json):

{
  "mcpServers": {
    "neural-memory": {
      "command": "python3",
      "args": ["-m", "neural_memory.mcp"],
      "env": {
        "NEURALMEMORY_BRAIN": "default"
      }
    }
  }
}

3. Verify

nmem stats

You should see brain statistics (neurons, synapses, fibers).

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

  1. When a decision is made: nmem_remember with type="decision"
  2. When an error occurs: nmem_remember with type="error"
  3. When user states a preference: nmem_remember with type="preference"
  4. When asked about past events: nmem_recall with appropriate depth

At Session End

  1. Call nmem_auto with action="process" on important conversation segments
  2. 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 \x3C10ms 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/\x3Cbrain>.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
安全使用建议
This skill appears to be a local Python-based memory MCP that needs python3 and a 'brain' identifier; the main red flag is inconsistent registry install metadata (it lists 'node' while the README/instructions use pip). Before installing: (1) verify the neural-memory PyPI package source matches the GitHub repo URL and inspect the package code (or download the wheel) for unexpected network calls or data exfiltration; (2) back up ~/.openclaw/mcp.json before adding the MCP server entry; (3) confirm what NEURALMEMORY_BRAIN contains — do not set a secret token unless you know the package requires it; (4) review the behavior of tools that process conversation text (nmem_auto) and any 'transplant' or export features to ensure they don't upload your data to remote servers; (5) prefer installing in an isolated environment (virtualenv or container) to limit impact. The registry metadata inconsistency lowers confidence in automated installation — treat this as a sign to manually validate the package and repo before proceeding.
功能分析
Type: OpenClaw Skill Name: neural-memory-enhanced Version: 1.0.0 The skill bundle describes a local associative memory system for AI agents using a neural graph and spreading activation. It provides a comprehensive set of tools for storing and recalling context (e.g., `nmem_remember`, `nmem_recall`) and uses a local SQLite database for storage. While there is a minor metadata inconsistency in `SKILL.md` (listing the installation 'kind' as 'node' while the command is 'pip'), the instructions and logic are consistent with a legitimate utility, and there is no evidence of data exfiltration, malicious execution, or harmful prompt injection.
能力评估
Purpose & Capability
The SKILL.md describes a local Python-based memory system and the declared requirements (python3, NEURALMEMORY_BRAIN) align with that purpose. However the registry's install metadata lists a 'node' kind while the documentation and runtime use pip/python; this mismatch is incoherent and could confuse automated installers or reviewers.
Instruction Scope
Instructions are concrete and scoped to installing the package, initializing a local brain (~/.neuralmemory), and registering an MCP entry in the user's OpenClaw config. The skill directs the agent to run local commands (nmem tools) and to pass conversation text to nmem_auto; it does not instruct sending data to external endpoints in the SKILL.md itself. Users should confirm what nmem_auto and nmem_transplant do, since they operate on conversation content and brain data.
Install Mechanism
The SKILL.md instructs 'pip install neural-memory' (PyPI/Python), but the registry install entry is labeled with kind 'node' and id 'pip' (inconsistent). This metadata mismatch is concerning because automated install flows might attempt the wrong mechanism. Installing from PyPI is the likely intent (moderate risk); you should verify the package source, review its code, and ensure the PyPI package matches the listed GitHub repo before running pip install.
Credentials
Only one env var (NEURALMEMORY_BRAIN) is required and that matches the documented MCP configuration. It is declared as the primary credential in metadata, but the SKILL.md suggests this is a brain identifier (e.g., 'default') rather than a secret token. Confirm whether NEURALMEMORY_BRAIN holds a non‑sensitive name/ID or a secret credential before storing it in your environment.
Persistence & Privilege
The skill does not request always:true and is user‑invocable. It instructs writing a local brain directory (~/.neuralmemory) and editing the user's MCP config (~/.openclaw/mcp.json), which is reasonable for an MCP plugin. There is no instruction to modify other skills or system-wide privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install neural-memory-enhanced
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /neural-memory-enhanced 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of neural-memory-enhanced skill. - Provides associative memory with spreading activation for persistent, intelligent recall across sessions. - Features a neural graph with Hebbian learning, memory decay, contradiction detection, and temporal reasoning. - Offers command-line tools for remembering, recalling, auto-extracting, and managing memories. - Supports workflow tools, brain versioning, and memory transplant for cross-project knowledge sharing. - Operates independently of large language models; fully algorithmic and stores data locally.
元数据
Slug neural-memory-enhanced
版本 1.0.0
许可证
累计安装 2
当前安装数 1
历史版本数 1
常见问题

Neural Memory Enhanced 是什么?

Associative memory with spreading activation for persistent, intelligent recall. Use PROACTIVELY when: (1) You need to remember facts, decisions, errors, or... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 514 次。

如何安装 Neural Memory Enhanced?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install neural-memory-enhanced」即可一键安装,无需额外配置。

Neural Memory Enhanced 是免费的吗?

是的,Neural Memory Enhanced 完全免费(开源免费),可自由下载、安装和使用。

Neural Memory Enhanced 支持哪些平台?

Neural Memory Enhanced 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux, win32)。

谁开发了 Neural Memory Enhanced?

由 zhuyu28(@zhuyu28)开发并维护,当前版本 v1.0.0。

💬 留言讨论