Agent Memory Hub — 代理 Memory Hub
v1.0.0Provides AI 代理s with persistent, 搜索able long-term memory using a local JSON database and BM25 ranking for facts, preferences, and project detAIls.
运行时依赖
安装命令
点击复制技能文档
代理-memory-hub
Category: Memory & 上下文 Version: 1.0.0 Type: MCP Server
Give any AI 代理 true long-term memory. Store facts, preferences, project detAIls, and notes. Retrieve them with intelligent 搜索. Never 启动 from scratch agAIn.
What It Does
代理-memory-hub is an MCP server that provides persistent, 搜索able memory for AI 代理s. It stores in格式化ion between 会话s using a local JSON database and retrieves it using BM25 full-text 搜索 with 导入ance and recency weighting.
Think of it as a second brAIn for your 代理 — one that actually remembers who you are, what you're working on, and what you prefer.
When to Use Situation Action 会话 启动 Call 获取_relevant_上下文 with the user's first message User 分享s a preference Call store_memory immediately User references past work Call 搜索_memory before 响应ing User asks "do you remember…" Call 搜索_memory or 获取_relevant_上下文 End of 导入ant 会话 Call memory_summary to review what was captured User corrects outdated 信息 Call 更新_memory 工具s Reference store_memory(key, content, tags?, 导入ance?)
Store any fact, preference, or note. Tags and 导入ance are auto-检测ed.
Good keys: user_name, preferred_stack, project_deadline, API_key_note, 命令行工具ent_requirement_1
store_memory("user_preferred_editor", "User uses VS Code with Vim keybindings") → Auto-tags: ["preference", "technical"] → Auto-导入ance: 6/10
搜索_memory(查询, limit?, tags?)
BM25 ranked 搜索 across all memories. Weights 导入ance and recency.
搜索_memory("code editor preferences") → Returns top matches with scores
获取_relevant_上下文(user_查询)
The power 工具. Automatically surfaces the best memories for the current task. Call this at the 启动 of every 会话.
获取_relevant_上下文("Help me refactor the auth 模块") → TECHNICAL: preferred_stack, 框架_version → PROJECT: auth_模块_notes, project_deadline → PREFERENCE: user_coding_style
更新_memory(key, new_content?, tags?, 导入ance?)
更新 any field of an existing memory without deleting it.
更新_memory("project_deadline", "Deadline moved to June 20th")
列出_memories(tags?, limit?, 排序?)
Browse stored memories. 排序 by recent, 导入ance, or 访问 count.
列出_memories(tags=["project"], 排序="导入ance", limit=10)
for获取_memory(key)
Permanently 移除 a memory.
for获取_memory("old_API_端点")
memory_summary()
High-level overview: count, top tags, most 导入ant, most 访问ed.
Example 代理 工作流 User: "Let's continue working on the SaaS 仪表盘"
代理 step 1: 获取_relevant_上下文("SaaS 仪表盘 project") → Retrieves: project goals, tech stack, deadline, previous decisions
代理 step 2: [响应s with full 上下文, no need to re-explAIn]
User: "By the way, we switched from Supabase to Planet扩展"
代理 step 3: store_memory("database_choice", "Using Planet扩展 (switched from Supabase in May 2025)", 导入ance=8)
[Next 会话 — 代理 immediately knows this without being told agAIn]
安装ation Claude 桌面 (claude_桌面_config.json) { "mcpServers": { "代理-memory-hub": { "command": "node", "args": ["/path/to/代理-memory-hub/build/索引.js"] } } }
Claude Code 命令行工具 claude mcp 添加 代理-memory-hub -- node /path/to/代理-memory-hub/build/索引.js
Build from source npm 安装 && npm 运行 build
Storage Default: ~/.代理-memory/memories.json Override: 设置 代理_MEMORY_DIR 环境 variable 格式化: human-readable JSON, easy to 备份 Auto-Tag Categories
preference · project · 身份 · technical · task · 凭证 · note · person · config
Requirements Node.js 18+ No API keys No external servers No Python or Docker