loading…
Search for a command to run...
loading…
Enables AI agents to store, search, and retrieve long-term memories with BM25 full-text search, auto-tagging, and importance scoring.
Enables AI agents to store, search, and retrieve long-term memories with BM25 full-text search, auto-tagging, and importance scoring.
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.
AGENT_MEMORY_DIR env vargit clone https://github.com/yourname/agent-memory-hub
cd agent-memory-hub
npm install
npm run build
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"agent-memory-hub": {
"command": "node",
"args": ["C:\\Users\\HP\\agent-memory-hub\\build\\index.js"]
}
}
}
claude mcp add agent-memory-hub -- node "C:\Users\HP\agent-memory-hub\build\index.js"
{
"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
store_memoryStore 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
search_memoryBM25 full-text search across all memories.
query: "typescript preferences"
limit: 5 ← optional, default 5
tags: ["technical"] ← optional filter
get_relevant_contextAuto-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 preferences
update_memoryModify existing memory content, tags, or importance.
key: "user_preferred_language"
new_content: "User prefers TypeScript, but accepts Python for scripts"
importance: 8
list_memoriesBrowse memories with sorting and filtering.
tags: ["project"]
sort: "importance" ← "recent" | "importance" | "access"
limit: 10
forget_memoryPermanently delete a memory.
key: "old_api_key"
memory_summaryGet a full overview — counts, top tags, most important and most accessed memories.
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": "..."
}
]
}
The system auto-detects these categories from content:
| Tag | Trigger signals |
|---|---|
preference |
prefer, like, love, hate, favorite, avoid |
project |
project, working on, building, repository |
identity |
I am, my name, I work, my role |
technical |
code, api, database, framework, docker |
task |
todo, must, deadline, remind |
credential |
password, secret, token, api key |
note |
note, remember that, fyi, heads up |
person |
name is, email, phone, contact |
config |
config, setting, env var, port, url |
npm run dev # watch mode
npm run build # production build
MIT
Run in your terminal:
claude mcp add agent-memory-hub -- npx