HubLensRAGMemPalace/mempalace
MemPalace

mempalace

AIRAGVector DatabaseLLMKnowledge GraphPython
View on GitHub
53
+340

// summary

MemPalace provides a local-first solution for storing and retrieving conversation history as verbatim text without the need for summarization or external API calls. The system organizes data into a structured hierarchy of wings, rooms, and drawers to enable precise, scoped semantic searches. It features a pluggable backend architecture and includes a temporal knowledge graph to manage entity relationships locally.

// technical analysis

MemPalace is a local-first AI memory system designed to store conversation history and project data as verbatim text, avoiding lossy summarization or extraction techniques. Its architecture utilizes a structured storage model where content is organized into 'wings', 'rooms', and 'drawers' to enable scoped semantic search rather than flat corpus scanning. By employing a pluggable backend interface, the project allows users to swap vector databases like ChromaDB while maintaining a privacy-focused, offline-capable retrieval layer that achieves high recall without requiring external API calls.

// key highlights

01
Achieves 96.6% R@5 retrieval recall on LongMemEval using raw semantic search without any LLM or API dependencies.
02
Implements a structured storage hierarchy that organizes data into wings, rooms, and drawers for more precise and scoped information retrieval.
03
Features a pluggable backend architecture, allowing developers to replace the default ChromaDB implementation with alternative storage solutions.
04
Includes a temporal entity-relationship knowledge graph backed by local SQLite to manage validity windows and timeline-based queries.
05
Provides 29 MCP-compatible tools to facilitate seamless integration with agents, enabling automated reads, writes, and cross-wing navigation.
06
Supports local-first operation, ensuring that sensitive conversation data remains on the user's machine without requiring cloud processing.

// use cases

01
Verbatim conversation and project file storage with semantic search
02
Local-first knowledge graph management for entity-relationship tracking
03
MCP-compatible tool integration for agent-based memory and diary management

// getting started

To begin, install the package via pip and initialize your project directory using the 'mempalace init' command. You can then populate your memory store by running 'mempalace mine' on your project files or conversation exports. Finally, use the 'mempalace search' command to query your data or 'mempalace wake-up' to load context for new sessions.