Install
openclaw skills install @thcjp/neural-memory-enhanced-2扩散激活的联想记忆,持久智能回忆,主动使用。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
openclaw skills install @thcjp/neural-memory-enhanced-2A 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.
pip install neural-memory
nmem init
This creates ~/.neuralmemory/ with a default brain and configures 协议 automatically.
Add to your Skill平台 协议 configuration (~/.skill-platform/协议.json or project skill-platform.json):
{
"mcpServers": {
"neural-memory": {
"command": "python3",
"args": ["-m", "neural_memory.协议"],
"env": {
"NEURALMEMORY_BRAIN": "default"
}
}
}
}
nmem stats
You should see brain statistics (neurons, synapses, fibers).
| 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 with 30-day expiry | Task tracking |
| Tool | Purpose | When to Use |
|---|---|---|
nmem_auto | Auto-extract memories from text | After important conversations — captures decisions, errors, s 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 |
| 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 |
nmem_context to inject recent memories into your awarenessnmem_recall with that topicnmem_remember with type="decision"nmem_remember with type="error"nmem_remember with type="preference"nmem_recall with appropriate depthnmem_auto with action="process" on important conversation segmentsnmem_remember(
content="Use 关系型数据库 for production, SQLite for development",
type="decision",
tags=["database", "infrastructure"],
priority=8
)
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.
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.
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. : update API docs."
)
Automatically extracts: 1 decision, 1 fact, 1 .
| 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 |
~/.neuralmemory/brains/<brain>.dbnmem_remember returns fiber_id for reference tracking| 依赖项 | 类型 | 是否必需 | 获取方式 |
|---|---|---|---|
| LLM API | API | 必需 | 由Agent内置LLM提供 |
| 场景 | 输入 | 输出 |
|---|---|---|
| 基础使用 | 用户请求 | 处理结果 |
不适用于:需要人工判断的复杂决策场景
| 错误场景 | 原因 | 处理方式 |
|---|---|---|
| 配置错误 | 参数缺失或格式错误 | 检查依赖说明中的配置要求 |
| 运行时错误 | 运行环境不满足 | 确认运行环境符合依赖说明 |
| 网络错误 | 连接超时或不可达 | 检查网络连接后重试,参考国内替代方案 |
A: 请先阅读使用流程章节,确认环境满足依赖说明中的要求。
A: 请参考错误处理章节,按照表格中的处理方式操作。
A: 请参考已知限制章节了解具体限制。