hmem — Humanlike Memory for AI Agents
Persistent 5-level hierarchical memory for AI agents. SQLite-backed, lazy-loaded.
About This MCP Server
> AI agents forget everything when a session ends. hmem changes that.
> hmem is actively used in production. APIs are stable since v2.0. Feedback and bug reports welcome.
Born as a side project of a multi-agent AI system, hmem solves a real problem: when you work across multiple machines or sessions, your AI instances start from zero every time. They duplicate work, contradict previous decisions, and lose hard-won context.
Tools & Endpoints
Example Workflow
Well, it claims that it can't pinpoint timestamps. But that's not true. It just cant see them (due to token efficiency) :)
What Problems It Solves
- Well
- it claims that it can't pinpoint timestamps. But that's not true. It just cant see them (due to token efficiency) :)
Why Use hmem — Humanlike Memory for AI Agents?
- Hierarchical retrieval — lazy loading of detail levels saves tokens
- True tree structure — multiple siblings at the same depth (not just one chain)
- Compact output — child IDs render as .7 instead of P0029.7; dates shown only when differing from parent
- Persistent across sessions — agents remember previous work even after restart
- Editable without deletion — update_memory and append_memory modify entries in place; content is optional when toggling flags
- Markers — [♥] favorite, [P] pinned, [!] obsolete, [-] irrelevant, [*] active, [s] secret — on root entries and sub-nodes
- Pinned entries — super-favorites that show all children titles in bulk reads (not just the latest); use for reference entries you need in full every session
- Hashtags — cross-cutting tags (#hmem, #security) for filtering and discovering related entries across prefixes
- Import/Export — export_memory as Markdown or .hmem SQLite clone (excluding secrets); import_memory with L1 deduplication, sub-node merge, and automatic ID remapping on conflict
- Obsolete chain resolution — mark entries/sub-nodes obsolete with [✓ID] reference; read_memory auto-follows the chain to the current version
- Access-count promotion — most-accessed entries get expanded automatically ([★]); most-referenced sub-nodes shown as "Hot Nodes"
- Session cache — bulk reads suppress already-seen entries with Fibonacci decay; two modes: discover (newest-heavy) and essentials (importance-heavy)
Specifications
Requirements
- Detect your installed AI coding tools (Claude Code, OpenCode, Cursor, Windsurf, Cline)
- Ask whether to install system-wide (memories in ~/.hmem/) or project-local (memories in current directory)
- Offer an example memory with 67 real entries from hmem development — or start fresh
- Configure each tool's MCP settings automatically
- Create the memory directory and hmem.config.json
Hosting
Hosting Options
- Package
API
Integrate this server into your application. Choose a connection method below.
Install
npm install -g hmem-mcpPerformance
Usage
Quick Reference
- Name
- hmem — Humanlike Memory for AI Agents
- Function
- Persistent 5-level hierarchical memory for AI agents. SQLite-backed, lazy-loaded.
- Transport
- Package
- Language
- JavaScript/TypeScript
- Install
- npm install -g hmem-mcp
- Source
- External (Registry)
- License
- Open Source
Ready to integrate this MCP server?
Book a demo to see how this server fits your workflow, or explore the full catalog.