← 返回
数据分析 中文

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...
生产级长期记忆服务器,支持艾宾浩斯遗忘曲线衰减和强度加权检索,适用于需要跨代理持久记忆的场景。
wjy9902
数据分析 clawhub v1.0.3 1 版本 100000 Key: 无需
★ 0
Stars
📥 764
下载
💾 17
安装
1
版本
#ai-agents#latest#memory

概述

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

MethodEndpointDescription
-------------------------------
POST/memorizeStore conversation → extract facts/events/knowledge
POST/retrieveStrength-weighted vector search (similarity × strength)
POST/decayEbbinghaus forgetting curve (run daily via cron)
GET/statsMemory distribution, access patterns, agent breakdown
GET/healthService 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 preferred
  • MEMVAULT_LLM_MODEL — Default: qwen2.5:3b
  • MEMVAULT_TRANSLATION — Set true + MEMVAULT_TRANSLATION_LANG for auto-translation
  • MEMVAULT_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

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'

版本历史

共 1 个版本

  • v1.0.3 当前
    2026-03-30 04:25 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,170
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,594
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,997