據 AlphaMoat 統計,截至 2026-09,Persistent Memory 累計下載 2,919 次、獲 0 個星標,在全部 5,078 個 AI 技能中排名第 3,790 位,在「AI 智慧體」分類(969 個)中排名第 763 位。
| 平台 | 累計安裝 | 累計下載 | 星標 | 評論 |
|---|---|---|---|---|
| ClawHub ↗ | 86 | 2919 | - | - |
| SkillHub ↗ | 119 | 2881 | - | — |
各平台的計數口徑不同,統計時間不一致。
把 Markdown 記憶檔案作為來源,由索引器生成 ChromaDB 向量索引和 NetworkX 關係圖;可檢索記錄、檢視索引狀態,並在編輯記憶檔案後重新索引。按文件範例透過統一指令碼安裝和設定,依賴包括 ChromaDB、NetworkX 與 sentence-transformers。內建檢索預設不覆蓋所有工作區檔案;按說明擴充設定並重新索引。
資料釋出於 2026-10-26
以下是根據技能文件生成的示例,不代表實際執行結果。
依據技能文件中的宣告整理,未經實際安裝或執行驗證。
2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。
| 月份 | 累計下載 | 環比 | 星標 |
|---|---|---|---|
| 2026-09 | 2919 | — | - |
| 2026-08 | 2765 | +7.8% | - |
| 2026-07 | 2566 | +17.1% | - |
| 2026-06 | 2191 | +11.6% | - |
| 2026-05 | 1964 | — | - |
| 2026-03 | 1065 | — | - |
以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。
--- name: persistent-memory version: 3.0.0 description: Three-layer persistent memory system (Markdown + ChromaDB vectors + NetworkX knowledge graph) for long-term agent recall across sessions. One-command setup with automatic OpenClaw integration. Use when the agent needs to remember decisions, facts, context, or institutional knowledge between sessions. --- # Persistent Memory Adds persistent three-layer memory to any OpenClaw workspace. The agent gains semantic recall across sessions — decisions, facts, lessons, and institutional knowledge survive restarts.
## Architecture
| Layer | Technology | Purpose |
|-------|-----------|---------|
| L1: Markdown | MEMORY.md + daily logs + reference/ | Human-readable curated knowledge |
| L2: Vector | ChromaDB + all-MiniLM-L6-v2 | Semantic search across all memories |
| L3: Graph | NetworkX | Relationship traversal between concepts |
All three layers sync together. The indexer updates L2 and L3 from L1 automatically.
## ⚠️ Critical Integration: OpenClaw Memory Configuration
**Problem:** OpenClaw has its own built-in memory search system, but by default it only indexes `MEMORY.md` and `memory/*.md` files. Critical workspace files like `SOUL.md` (agent directives), `AGENTS.md` (behavior rules), and `PROJECTS.md` (active work) are **ignored**.
**Impact:** Agents can violate explicit directives because they're not found in memory searches. This causes operational failures where agents ignore their own rules.
**Solution:** The `configure_openclaw.py` script adds a `memorySearch` configuration block to OpenClaw that indexes all critical workspace files. This makes directive compliance **automatic** rather than optional.
## Setup
**One command from workspace root:**
```bash
bash skills/persistent-memory/scripts/unified_setup.sh
```
This automatically:
- ✅ Creates 3-layer memory system (Markdown + Vector + Graph)
- ✅ Installs all Python dependencies (ChromaDB, NetworkX, sentence-transformers)
- ✅ Configures OpenClaw memorySearch integration (directive compliance)
- ✅ Indexes existing MEMORY.md if present
- ✅ Sets up daily maintenance automation
**No manual configuration needed.** The script handles everything including OpenClaw integration that prevents agents from ignoring workspace directives (SOUL.md, AGENTS.md, etc.).
## Daily Usage
### Writing Memories
- **MEMORY.md** — Curated long-term knowledge (decisions, architecture, lessons learned). Update after significant events.
- **memory/YYYY-MM-DD.md** — Daily logs. Raw notes of what happened each day.
- **reference/*.md** — Institutional facts (people, repos, infrastructure, business rules). The agent's encyclopedia.
### Indexing (after editing any memory file)
```bash
vector_memory/venv/bin/python vector_memory/indexer.py
```
The indexer parses MEMORY.md, reference/*.md, and memory/*.md into vector embeddings and rebuilds the knowledge graph. Run after every edit to keep layers in sync.
### Searching
```bash
vector_memory/venv/bin/python vector_memory/search.py "your query"
```
Returns top-3 semantically similar chunks with source file and section.
### Sync Status Check
```bash
vector_memory/venv/bin/python vector_memory/auto_retrieve.py --status
```
Reports sync health: MEMORY.md hash vs indexed state, chunk count, graph size. Use in heartbeats to detect drift.
## Agent Behavior Rules
Add these to AGENTS.md or SOUL.md:
### Pre-Response (mandatory)
Before answering questions about prior work, decisions, dates, people, or preferences — search memory first. Use `memory_search` or run `auto_retrieve.py` with the query. Never say "I don't remember" without checking.
**CRITICAL:** OpenClaw's built-in memory search should now automatically find directive files (SOUL.md, AGENTS.md) if `configure_openclaw.py` was run. If memory searches are not finding agent rules or workspace directives, the OpenClaw integration is missing or broken.
### Pre-Action (mandatory)
Before executing any action that references an external identifier (URL, handle, email, repo name, address) — query `reference/` files for the exact value. If not found, query vector memory. If still not found, ask the user. **Never fabricate identifiers.**
### Post-Edit (mandatory)
After editing MEMORY.md or any file in reference/ or memory/ — re-index:
```bash
vector_memory/venv/bin/python vector_memory/indexer.py
```
### Heartbeat Integration
Add to HEARTBEAT.md:
```
## Memory Sync Check
Run `vector_memory/venv/bin/python vector_memory/auto_retrieve.py --status` and if status is OUT_OF_SYNC, re-index with `vector_memory/venv/bin/python vector_memory/indexer.py`.
```
## Reference Directory (Optional but Recommended)
Create `reference/` in the workspace root as the agent's institutional knowledge base:
```
reference/
├── people.md — Contacts, roles, communication details
├── repos.md — GitHub repositories, URLs, status
├── infrastructure.md — Hosts, IPs, ports, services
├── business.md — Company info, strategies, rules
└── properties.md — Domain-specific entities (deals, products, etc.)
```
These files are vector-indexed alongside MEMORY.md. The agent queries them before any action involving external identifiers. Facts accumulate over time — the agent that never forgets.
## File Structure After Setup
```
workspace/
├── MEMORY.md — Curated long-term memory (L1)
├── memory/
│ ├── 2026-02-17.md — Daily log
│ └── heartbeat-state.json — Sync tracking
├── reference/ — Institutional knowledge (optional)
│ ├── people.md
│ └── ...
└── vector_memory/
├── indexer.py — Index all markdown into vectors + graph
├── search.py — Semantic search CLI
├── graph.py — NetworkX knowledge graph
├── auto_retrieve.py — Status checker + auto-retrieval
├── chroma_db/ — Vector database (gitignored)
├── memory_graph.json — Knowledge graph (auto-generated)
└── venv/ — Python venv (gitignored)
```
## Troubleshooting
- **"No module named chromadb"** — Run setup.sh again or activate the venv: `source vector_memory/venv/bin/activate`
- **OUT_OF_SYNC status** — Run the indexer: `vector_memory/venv/bin/python vector_memory/indexer.py`
- **Empty search results** — Check that MEMORY.md has content and the indexer has been run at least once
- **SIGSEGV on indexing** — Usually caused by incompatible ML libs. The setup script pins known-good versions.
- **Agent ignoring SOUL.md/AGENTS.md directives** — OpenClaw integration missing. Run `python skills/persistent-memory/scripts/configure_openclaw.py` to fix.
- **Memory searches not finding workspace files** — Check OpenClaw configuration: `openclaw config get | grep memorySearch`
- **"Configuration verification failed"** — Restart OpenClaw manually: `openclaw gateway restart`
記錄自身發現以實現自我改進的技能
幫助使用者發現和安裝智慧體技能,當用戶詢問如「如何做X」、「找X的技能」、「有能做...的嗎」等問題時
給 AI agent 用的瀏覽器自動化命令列技能。
自我反思+自我批評+自我學習+自組織記憶。智慧體評估自身工作、發現錯誤並持續改進。
在安裝第三方技能之前,按清單審查來源、許可權與危險模式的技能。
類型化知識圖譜,用於結構化智慧體記憶與可組合技能。適用於以下場景:建立/查詢實體(人物、專案、任務、事件、文件)、關聯相關物件、強制執行約束、將多步操作規劃為圖譜變換,或當技能需要共享狀態時。觸發關鍵詞包括"記住""我知道關於什麼""將X連結到Y""顯示依賴關係"、實體增刪改查操作,以及跨技能資料訪問。
將 AI 代理從任務執行者轉變為能夠預見需求、持續最佳化的主動夥伴。現已支援 WAL Protocol、Working Buffer、Autonomous Crons 及經過實戰驗證的模式。屬於 Hal Stack 🦞。
建立有效技能指南。當用戶希望建立新技能(或更新現有技能)以利用專業知識、工作流程或工具整合擴充套件 Claude 的能力時,應使用此技能。
資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。