OpenClaw Agent 的自进化记忆系统。
零 token 成本运行 — 脚本自动压缩/索引/检索,不烧 Agent token。Obsidian vault 实时同步 — 知识库自动进入 Agent 记忆。自进化 — 执行模式自动提炼为规则,记忆越用越聪明。自愈 — 出错自动修复,不需要人管。
Self-evolving memory system for OpenClaw Agent.
Zero-token operation — scripts handle compression/indexing/search, no Agent tokens burned. Obsidian vault real-time sync — knowledge base auto-enters Agent memory. Self-evolving — execution patterns auto-distilled into rules, memory gets smarter over time. Self-healing — errors auto-fixed, no human intervention.
自进化记忆、零 token、本地知识库、自动记忆管理、长期记忆、向量检索、Obsidian vault、Qdrant、embedding、agent memory、自愈监控、自动维护、DAG 调度、抗体自愈、概念聚合、记忆蒸馏、健康检查
self-evolving memory, zero token, local knowledge base, auto memory management, long-term memory, vector search, Obsidian vault, Qdrant, embedding, agent memory, self-healing, auto maintenance, DAG scheduler, antibody healing, concept consolidation, memory distillation, health monitoring
一个 OpenClaw 的记忆增强技能。解决了三个问题:
memory_search 搜不到ClawHub 上大部分记忆技能是纯 SKILL.md — 用 prompt 教 Agent 自己写文件、grep 搜索、手动整理。问题:
本技能用 30 个 Python 脚本替代 Agent 的手动操作:
操作纯 prompt 方案本技能存一条记忆Agent 读+写+分类 ≈ 2000 tokencompress.py 0 token搜一条记忆grep 返回原始文本 ≈ 1000+ tokenmemory_search 返回 3 条 ≈ 300 token整理 100 条Agent 全读再分类 ≈ 50000 tokenheartbeat 自动跑 0 token文件膨胀token 线性增长token 不变(脚本扛)
装好后完全自动运行,不需要人工干预:
你不需要提醒 Agent “该整理了”,不需要手动清理过期文件,不需要检查向量库是否同步。脚本按时间表自动跑,出问题自动修。
bash
cd ~/.openclaw/workspace/skills
git clone https://github.com/yxyujian98-png/vault-memory-system.git
cd openclaw-memory-system
pip install -r requirements.txt
docker-compose up -d
python scripts/setup.py --vault-dir /path/to/vault
组件必需说明Python 3.10+✅脚本运行环境Qdrant✅向量数据库嵌入服务✅LM Studio / Ollama / OpenAI 兼容Obsidian Vault✅Markdown 知识库LLM API可选高重要性记忆才需要
text
┌─────────────────────────────────────────────────────┐
│ Layer 1: OpenClaw 内置 │
│ │
│ session-memory hook → memory/YYYY-MM-DD-HHMM.md │
│ memory-compact hook → compaction 前提取记忆 │
│ memory-extract hook → /new、/reset 时提取 │
│ ↓ │
│ memory_search ← SQLite (FTS5 + sqlite-vec + 混合) │
└─────────────────────────────────────────────────────┘
│ sync_vault_memory.py
↓
┌─────────────────────────────────────────────────────┐
│ Layer 2: 自定义脚本 │
│ │
│ Cron 每 45 分钟 → orchestrator --light --parallel │
│ → vault_guardian / extract_memories / memory_health│
│ → 12 个任务按 DAG 拓扑并行执行 │
│ │
│ Qdrant (knowledge_base) │
│ → vault 分块 / 工具观察 / 融合概念 │
└─────────────────────────────────────────────────────┘
An OpenClaw memory enhancement skill. Solves three problems:
memory_search can't find themMost memory skills on ClawHub are pure SKILL.md — they teach the Agent to write files, grep search, and organize manually. Problems:
This skill replaces manual Agent operations with 30 Python scripts:
OperationPure prompt approachThis skillStore one memoryAgent read+write+classify ≈ 2000 tokenscompress.py 0 tokensSearch one memorygrep returns raw text ≈ 1000+ tokensmemory_search returns 3 results ≈ 300 tokensOrganize 100 itemsAgent reads all then classifies ≈ 50K tokensheartbeat auto-runs 0 tokensFile growthtokens scale linearlytokens stay flat (scripts handle it)
Runs fully automatic after installation. No human intervention needed:
You don't need to remind Agent “time to organize”. Don't need to manually clean expired files. Don't need to check if vector DB is synced. Scripts run on schedule, fix problems automatically.
bash
cd ~/.openclaw/workspace/skills
git clone https://github.com/yxyujian98-png/vault-memory-system.git
cd openclaw-memory-system
pip install -r requirements.txt
docker-compose up -d
python scripts/setup.py --vault-dir /path/to/vault
ComponentRequiredDescriptionPython 3.10+✅Script runtimeQdrant✅Vector databaseEmbedding server✅LM Studio / Ollama / OpenAI-compatibleObsidian Vault✅Markdown knowledge baseLLM APIOptionalOnly for high-importance memories
text
┌─────────────────────────────────────────────────────┐
│ Layer 1: OpenClaw Built-in │
│ │
│ session-memory hook → memory/YYYY-MM-DD-HHMM.md │
│ memory-compact hook → extract before compaction │
│ memory-extract hook → extract on /new, /reset │
│ ↓ │
│ memory_search ← SQLite (FTS5 + sqlite-vec + hybrid)│
└─────────────────────────────────────────────────────┘
│ sync_vault_memory.py
↓
┌─────────────────────────────────────────────────────┐
│ Layer 2: Custom Scripts │
│ │
│ Cron every 45m → orchestrator --light --parallel │
│ → vault_guardian / extract_memories / memory_health│
│ → 15 tasks in DAG topological parallel │
│ │
│ Qdrant (knowledge_base) │
│ → vault chunks / tool observations / fused concepts│
└─────────────────────────────────────────────────────┘
MIT