据 AlphaMoat 统计,截至 2026-09,Memory Tools 累计下载 3,611 次、获 4 个星标,在全部 5,078 个 AI 技能中排名第 3,012 位,在「AI 智能体」分类(969 个)中排名第 606 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 116 | 3,488 | 4 | 1 |
| SkillHub ↗ | 116 | 3,611 | 4 | — |
各平台的计数口径不同,统计时间不一致。
该技能说明记忆以本地 Markdown 文件存储,并提供搜索、更新、删除和摘要等工具;可选使用本地 QMD 搜索。记忆可能包含偏好、关系或指令等私人信息,启用自动注入或迁移前应检查配置和本地文件权限。
资料发布于 2026-10-29
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 3,611 | — | 4 |
| 2026-08 | 3,421 | +2.1% | 4 |
| 2026-07 | 3,349 | +7.4% | 4 |
| 2026-06 | 3,118 | +3.9% | 4 |
| 2026-05 | 3,002 | — | 4 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
---
name: memory-tools
description: Agent-controlled memory plugin for OpenClaw with confidence scoring, decay, and semantic search. The agent decides WHEN to store/retrieve memories — no auto-capture noise. v2 uses file-based storage with optional QMD search (no external APIs required).
homepage: https://github.com/Purple-Horizons/memory-tools
metadata:
openclaw:
emoji: 🧠
kind: plugin
---
# Memory Tools v2
Agent-controlled persistent memory for OpenClaw.
## What's New in v2
- **File-based storage** — Memories stored as readable markdown files
- **No external APIs** — No OpenAI dependency, everything runs locally
- **QMD search (optional)** — BM25 + vector + reranking via local GGUF models
- **Auto-migration** — Seamlessly upgrades from v1 SQLite/LanceDB storage
## Why Memory-as-Tools?
Traditional memory systems auto-capture everything, flooding context with irrelevant information. Memory Tools follows the [AgeMem](https://arxiv.org/abs/2409.02634) approach: **the agent decides** when to store and retrieve memories.
## Features
- **6 Memory Tools**: `memory_store`, `memory_update`, `memory_forget`, `memory_search`, `memory_summarize`, `memory_list`
- **Confidence Scoring**: Track how certain you are (1.0 = explicit, 0.5 = inferred)
- **Importance Scoring**: Prioritize critical instructions over nice-to-know facts
- **Decay/Expiration**: Temporal memories automatically become stale
- **Human-readable storage**: Markdown files with YAML frontmatter
- **Conflict Resolution**: New info auto-supersedes old (no contradictions)
## Installation
### Step 1: Install from ClawHub
```bash
clawhub install memory-tools
```
### Step 2: Build the plugin
```bash
cd skills/memory-tools
npm install
npm run build
```
### Step 3: Activate the plugin
```bash
openclaw plugins install --link .
openclaw plugins enable memory-tools
```
### Step 4: Restart the gateway
```bash
openclaw gateway restart
```
### Optional: Install QMD for better search
```bash
npm install -g @tobilu/qmd
```
Without QMD, basic filtering works. With QMD, you get semantic search (BM25 + vector + reranking).
### Node Compatibility (QMD)
- QMD may not be compatible with the newest Node ABI immediately.
- If QMD fails (for example `NODE_MODULE_VERSION` mismatch), memory-tools falls back to basic mode.
- To force basic mode: `MEMORY_TOOLS_DISABLE_QMD=true`.
- For best QMD stability, use a Node LTS version supported by your installed QMD build.
## Security Model
- No API keys or external credentials are required.
- Data is stored locally in `~/.openclaw/memories` (or configured `memoriesPath`).
- The plugin can prepend standing-instruction context at `before_agent_start` when `autoInjectInstructions=true`.
- The plugin can auto-migrate legacy v1 data from `~/.openclaw/memory/tools/memory.db` when `autoMigrateLegacy=true`.
- Defaults are conservative: both `autoInjectInstructions` and `autoMigrateLegacy` are `false`.
## Storage Format
Memories are stored as markdown files in `~/.openclaw/memories/`:
```
~/.openclaw/memories/
├── facts/
│ └── abc123-def4-5678-90ab-cdef12345678.md
├── preferences/
│ └── def456-7890-abcd-ef12-345678901234.md
├── instructions/
│ └── ghi789-0abc-def1-2345-678901234567.md
└── .deleted/
└── old-memory.md
```
Each memory file:
```markdown
---
id: abc123-def4-5678-90ab-cdef12345678
category: preference
confidence: 0.9
importance: 0.7
created_at: 2024-01-15T10:30:00Z
tags: [ui, settings]
---
User prefers dark mode in all applications.
```
## Memory Categories
| Category | Use For | Example |
|----------|---------|---------|
| fact | Static information | "User's dog is named Rex" |
| preference | Likes/dislikes | "User prefers dark mode" |
| event | Temporal things | "Dentist Tuesday 3pm" |
| relationship | People connections | "Sarah is user's wife" |
| instruction | Standing orders | "Always respond in Spanish" |
| decision | Choices made | "We decided to use PostgreSQL" |
| context | Situational info | "User is job hunting" |
| entity | Named things | "Project Apollo is their startup" |
## Tool Reference
### memory_store
```
memory_store({
content: "User prefers bullet points",
category: "preference",
confidence: 0.9,
importance: 0.7,
tags: ["formatting", "communication"]
})
```
### memory_search
```
memory_search({
query: "formatting preferences",
category: "preference",
limit: 10
})
```
### memory_update
```
memory_update({
id: "abc123",
content: "User now prefers numbered lists",
confidence: 1.0
})
```
### memory_forget
```
memory_forget({
query: "bullet points",
reason: "User corrected preference"
})
```
### memory_summarize
```
memory_summarize({
topic: "user's work projects",
maxMemories: 20
})
```
### memory_list
```
memory_list({
category: "instruction",
sortBy: "importance",
limit: 20
})
```
## CLI Commands
```bash
# Show memory statistics
openclaw memory-tools stats
# List memories
openclaw memory-tools list
openclaw memory-tools list --category fact
# Search memories (requires QMD)
openclaw memory-tools search "dark mode"
# Export all memories as JSON
openclaw memory-tools export
# Force re-index with QMD
openclaw memory-tools reindex
# Show storage path
openclaw memory-tools path
```
## Debugging
Memories are plain markdown files — just read them:
```bash
cat ~/.openclaw/memories/facts/*.md
ls ~/.openclaw/memories/
```
Export all memories:
```bash
openclaw memory-tools export > memories.json
```
## Migration from v1
v2 automatically detects v1 databases and migrates them:
1. On startup, v2 checks for `~/.openclaw/memory/tools/memory.db`
2. If found, exports all memories to markdown files
3. Original database preserved as backup
4. No manual action required
To enable auto-migration, set `autoMigrateLegacy: true` in plugin config.
## License
MIT — [Purple Horizons](https://github.com/Purple-Horizons)
把开发过程中的经验、错误与纠正记录为 Markdown 文件,供后续复用并晋升为工作区记忆。
用自然语言描述需求,在本地与远程技能市场里找技能并给出推荐的技能。
给 AI agent 用的浏览器自动化命令行技能。
把用户纠正与自我复盘沉淀成分层记忆、并按使用情况升降级的技能。
在安装第三方技能之前,按清单审查来源、权限与危险模式的技能。
把 agent 的记忆与跨技能状态存成带类型和约束的知识图谱的技能。
一份为 AI 代理规划主动跟进、工作记忆与复盘流程的工作区配置指南。
指导如何创建与更新有效 Claude 技能的写作指南。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。