MemVault
by @wjy9902
Production-ready long-term memory server for AI agents with Ebbinghaus decay and strength-weighted retrieval. Use when you need persistent memory across agen...
clawhub install memvaultπ About This Skill
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.shVerify
memvault health
Usage
# Store a memory
memvault memorize-text "" "[reply]"Retrieve memories (strength-weighted)
memvault retrieve ""Run daily decay (memories fade like human memory)
memvault decay Check stats
memvault stats
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
1. Store: Conversations β LLM extracts facts β embedded β stored in pgvector
2. Retrieve: Query embedded β cosine similarity Γ memory strength β ranked results
3. Decay: strength = exp(-rate Γ days / (1 + damping Γ ln(1 + access_count)))
4. 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 β Set true + MEMVAULT_TRANSLATION_LANG for auto-translationMEMVAULT_PORT β Default: 8002Daily 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 "" "" ""
memvault retrieve "" ""
memvault decay
memvault stats
API: 127.0.0.1:8002
Multi-Agent Memory
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
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'π‘ Examples
# Store a memory
memvault memorize-text "" "[reply]"Retrieve memories (strength-weighted)
memvault retrieve ""Run daily decay (memories fade like human memory)
memvault decay Check stats
memvault stats
βοΈ 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 β Set true + MEMVAULT_TRANSLATION_LANG for auto-translationMEMVAULT_PORT β Default: 8002π Tips & Best Practices
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'