agent-memory-hub
A persistent, intelligent long-term memory system for AI agents with BM25 full-text search, auto-tagging, importance scoring, and recency weighting.
store_memory— Save any information (facts, preferences, project details, notes) with a unique key; auto-detects tags and importance (1–10) if omitted.search_memory— BM25 full-text ranked search across all memories, with optional tag filtering and result limits.get_relevant_context— Automatically surface the most relevant memories for a given query or task; ideal for injecting context at session start.update_memory— Modify the content, tags, or importance score of an existing memory by its key.list_memories— Browse stored memories with optional tag filtering, sorted by recency, importance, or access count.forget_memory— Permanently delete a specific memory by its key.memory_summary— Get a high-level overview: total memory count, top tags, most important/accessed memories, and statistics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-memory-hub store that my favorite color is blue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-memory-hub
Persistent, intelligent, searchable long-term memory for AI agents.
Store facts, preferences, notes, and project context. Retrieve them with full-text BM25 search, importance scoring, and recency weighting. No API keys. No external servers. Works out of the box.
Features
7 powerful tools — store, search, retrieve context, update, list, forget, summarize
BM25 full-text search — proper ranked search with IDF, not just string matching
Auto-tagging — automatically infers categories (preference, project, technical, task, credential, etc.)
Auto importance scoring — detects urgency signals in content
Recency + importance weighting — more relevant memories surface first
Atomic writes — corruption-safe file persistence
Zero dependencies — only the MCP SDK; no native binaries, no Python, no Docker
Configurable storage — override path with
AGENT_MEMORY_DIRenv var
Related MCP server: haksnbot-memory
Installation
1. Clone and build
git clone https://github.com/yourname/agent-memory-hub
cd agent-memory-hub
npm install
npm run build2. Add to Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"agent-memory-hub": {
"command": "node",
"args": ["C:\\Users\\HP\\agent-memory-hub\\build\\index.js"]
}
}
}3. Add to Claude Code (MCP CLI)
claude mcp add agent-memory-hub -- node "C:\Users\HP\agent-memory-hub\build\index.js"Custom storage directory
{
"mcpServers": {
"agent-memory-hub": {
"command": "node",
"args": ["C:\\Users\\HP\\agent-memory-hub\\build\\index.js"],
"env": {
"AGENT_MEMORY_DIR": "C:\\Users\\HP\\my-agent-memories"
}
}
}
}Default storage: ~/.agent-memory/memories.json
Tools
store_memory
Store any piece of information worth remembering.
key: "user_preferred_language"
content: "User always prefers TypeScript over JavaScript"
tags: ["preference", "technical"] ← auto-detected if omitted
importance: 7 ← auto-scored if omitted
overwrite: true ← upsert: update if key exists, create if notBy default, storing a key that already exists returns an error. Set overwrite: true to silently update the existing memory instead — useful when you want "set this value" semantics without checking first.
search_memory
BM25 full-text search across all memories.
query: "typescript preferences"
limit: 5 ← optional, default 5
tags: ["technical"] ← optional filterget_relevant_context
Auto-retrieve the best memories for a given query. Use this at session start.
user_query: "Help me set up the project authentication"
→ Returns: identity memories, project memories, technical preferencesupdate_memory
Modify existing memory content, tags, or importance.
key: "user_preferred_language"
new_content: "User prefers TypeScript, but accepts Python for scripts"
importance: 8list_memories
Browse memories with sorting and filtering.
tags: ["project"]
sort: "importance" ← "recent" | "importance" | "access"
limit: 10forget_memory
Permanently delete a memory.
key: "old_api_key"memory_summary
Get a full overview — counts, top tags, most important and most accessed memories.
Storage Format
Memories are stored as plain JSON at ~/.agent-memory/memories.json. Human-readable, easy to backup or inspect.
{
"version": "1.0.0",
"created": "2025-01-01T00:00:00.000Z",
"lastUpdated": "2025-06-01T12:00:00.000Z",
"memories": [
{
"id": "uuid",
"key": "user_preferred_language",
"content": "User prefers TypeScript over JavaScript",
"tags": ["preference", "technical"],
"importance": 7,
"createdAt": "...",
"updatedAt": "...",
"accessCount": 12,
"lastAccessed": "..."
}
]
}Auto-Tagging Categories
The system auto-detects these categories from content:
Tag | Trigger signals |
| prefer, like, love, hate, favorite, avoid |
| project, working on, building, repository |
| I am, my name, I work, my role |
| code, api, database, framework, docker |
| todo, must, deadline, remind |
| password, secret, token, api key |
| note, remember that, fyi, heads up |
| name is, email, phone, contact |
| config, setting, env var, port, url |
Development
npm run dev # watch mode
npm run build # production buildLicense
MIT
Available Tools
7 toolsforget_memoryA
Permanently delete a specific memory by key.
Inputs: key (required).
get_relevant_contextA
Auto-retrieve the most relevant memories for a given user query or task. Use this at the start of any session or when the user references past context. Returns formatted context ready to inject into your reasoning.
Inputs: user_query (required).
list_memoriesA
Browse stored memories with optional tag filtering and sort order.
Inputs: tags, limit, sort.
memory_summaryA
Get a high-level overview of what the agent knows — total count, top tags, most important memories, and access statistics. Good for orientation at session start.
Inputs: no named parameters.
search_memoryA
Search memories using BM25 full-text search with importance and recency weighting. Supports optional tag filtering to narrow scope.
Inputs: query (required), limit, tags.
store_memoryA
Store a new memory — fact, preference, project detail, note, or any information worth remembering. Tags and importance are auto-detected from content if not provided.
Inputs: key (required), content (required), tags, importance.
update_memoryB
Update the content, tags, or importance of an existing memory by key.
Inputs: key (required), new_content, tags, importance.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes, but get_relevant_context and search_memory both retrieve memories based on relevance, which could cause confusion. However, descriptions differentiate automatic context retrieval from explicit search.
Majority follow verb_noun pattern (forget_memory, list_memories, search_memory, store_memory, update_memory). Two exceptions: get_relevant_context adds an adjective, and memory_summary inverts the order. Overall, mostly consistent with minor deviations.
7 tools is well-scoped for a memory management system. Each tool addresses a essential operation: create, read, update, delete, search, browse, and summarize, without unnecessary bloat.
Core CRUD and retrieval operations are covered. However, there is no direct 'get memory by key' tool; agents must infer keys from list or search results. This is a minor gap that agents can work around using existing tools.
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Hosted persistent memory with semantic search, importance and TTL for AI agents.
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to store and retrieve persistent memories using BM25 search, allowing them to remember past conversations and context across sessions.8MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent memory storage for AI agents with full-text search, tagging, and importance levels, enabling agents to store and retrieve memories efficiently.MIT
- AlicenseAqualityCmaintenanceProvides persistent, searchable memory for AI agents, enabling them to retain, recall, and reflect on information across conversations.191MIT
- AlicenseNot gradedqualityCmaintenanceA searchable long-term memory server for AI agents using BM25 indexing over document chunks, enabling durable recall across sessions without cloud dependencies.1Apache 2.0