简介
MemVault
原始描述
Production-ready long-term memory server for AI agents with Ebbinghaus decay and strength-weighted retrieval. Use when you need persistent memory across agen...
通过你的 Agent 添加
安装目录:memvault/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: memvault
description: "Production-ready long-term memory server for AI agents with Ebbinghaus decay and strength-weighted retrieval. Use when you need persistent memory across agent sessions, memory decay (forgetting curve), memory statistics, or multi-agent memory tracking. Triggers: long-term memory, remember, recall, memory decay, Ebbinghaus, agent memory, memvault. Requires Docker."
MemVault — Long-term Memory for AI Agents
Quick Start
# Install (one command — Docker handles everything)
bash scripts/install.sh
# Verify
memvault health
Usage
# Store a memory
memvault memorize-text <user_id> "<message>" "[reply]"
# Retrieve memories (strength-weighted)
memvault retrieve <user_id> "<query>"
# Run daily decay (memories fade like human memory)
memvault decay <user_id>
# Check stats
memvault stats <user_id>
API Endpoints
Method
Endpoint
Description
POST
/memorize
Store conversation → extract facts/events/knowledge
POST
/retrieve
Strength-weighted vector search (similarity × strength)
POST
/decay
Ebbinghaus forgetting curve (run daily via cron)
GET
/stats
Memory distribution, access patterns, agent breakdown
GET
/health
Service health
How It Works
- Store: Conversations → LLM extracts facts → embedded → stored in pgvector
- Retrieve: Query embedded → cosine similarity × memory strength → ranked results
- Decay:
strength = exp(-rate × days / (1 + damping × ln(1 + access_count)))
- Access boost: Each retrieval increments
access_count, slowing decay
Quick Start
# Install (one command — Docker handles everything)
bash scripts/install.sh
# Verify
memvault health
# Store a memory
memvault memorize-text <user_id> "<message>" "[reply]"
# Retrieve memories (strength-weighted)
memvault retrieve <user_id> "<query>"
# Run daily decay (memories fade like human memory)
memvault decay <user_id>
# Check stats
memvault stats <user_id>
API Endpoints
Method
Endpoint
Description
POST
/memorize
Store conversation → extract facts/events/knowledge
POST
/retrieve
Strength-weighted vector search (similarity × strength)
POST
/decay
Ebbinghaus forgetting curve (run daily via cron)
GET
/stats
Memory distribution, access patterns, agent breakdown
GET
/health
Service health
How It Works
- Store: Conversations → LLM extracts facts → embedded → stored in pgvector
- Retrieve: Query embedded → cosine similarity × memory strength → ranked results
- Decay:
strength = exp(-rate × days / (1 + damping × ln(1 + access_count)))
- Access boost: Each retrieval increments
access_count, slowing decay
| Method | Endpoint | Description |
|---|---|---|
| POST | /memorize |
Store conversation → extract facts/events/knowledge |
| POST | /retrieve |
Strength-weighted vector search (similarity × strength) |
| POST | /decay |
Ebbinghaus forgetting curve (run daily via cron) |
| GET | /stats |
Memory distribution, access patterns, agent breakdown |
| GET | /health |
Service health |
- Store: Conversations → LLM extracts facts → embedded → stored in pgvector
- Retrieve: Query embedded → cosine similarity × memory strength → ranked results
- Decay:
strength = exp(-rate × days / (1 + damping × ln(1 + access_count))) - Access boost: Each retrieval increments
access_count, slowing decay
Fading memories (strength < 0.1) are excluded from search.
Configuration
All via environment variables in .env (created by install script):
MEMVAULT_LLM_BASE_URL— Default: Ollama local. Set to OpenAI/Groq/etc URL if preferredMEMVAULT_LLM_MODEL— Default:qwen2.5:3bMEMVAULT_TRANSLATION— Settrue+MEMVAULT_TRANSLATION_LANGfor auto-translationMEMVAULT_PORT— Default:8002
Daily Cron Setup
Add Ebbinghaus decay to your agent's cron:
0 3 * * * curl -s -X POST 'http://127.0.0.1:8002/decay?user_id=YOUR_USER_ID'
TOOLS.md Snippet
## MemVault 🧠
memvault memorize-text "<user_id>" "<content>" "<context>"
memvault retrieve "<user_id>" "<query>"
memvault decay <user_id>
memvault stats <user_id>
- API: 127.0.0.1:8002
Multi-Agent Memory
## MemVault 🧠
memvault memorize-text "<user_id>" "<content>" "<context>"
memvault retrieve "<user_id>" "<query>"
memvault decay <user_id>
memvault stats <user_id>
- API: 127.0.0.1:8002
Tag memories by source agent:
curl -X POST http://localhost:8002/memorize -H "Content-Type: application/json" \
-d '{"conversation": [
{"role": "metadata", "content": "{\"source_agent\": \"research-bot\"}"},
{"role": "user", "content": "Found new papers on transformers"}
], "user_id": "team"}'
Troubleshooting
- "Connection refused" → Run
docker compose -f ~/.openclaw/workspace/skills/memvault/docker-compose.yml up -d
- Slow memorize → Normal, LLM extraction takes 5-15s per conversation
- No results from retrieve → Check
memvault stats — if total=0, nothing stored yet
- All memories fading → Reduce decay_rate:
curl -X POST 'http://localhost:8002/decay?decay_rate=0.05'
docker compose -f ~/.openclaw/workspace/skills/memvault/docker-compose.yml up -dmemvault stats — if total=0, nothing stored yetcurl -X POST 'http://localhost:8002/decay?decay_rate=0.05'正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。