Structured long-term memory system for LLM agents.
Project details
MindCache is a cutting-edge memory engine designed for long-term AI applications. It features a self-restructuring hierarchical memory ontology, ensuring efficient decision tracking and outperforming traditional flat retrieval systems. With a quick installation process and user-friendly interface, it streamlines memory management for production-grade LLM agents.
MindCache offers a structured long-term memory engine specifically designed for production-grade large language model (LLM) agents. Unlike conventional vector search databases or basic summary storage systems, MindCache features a self-restructuring hierarchical memory ontology that captures explicit decision tracking, thereby outperforming traditional flat retrieval systems demonstrated on the BEAM QA benchmark.
MindCache redefines long-term memory by organizing it into a structured, self-organizing architecture optimized for intelligent reasoning. This sophisticated structure is composed of the following functionalities:
To use MindCache, the integration involves initial setup through installation and simple code snippets as demonstrated below:
from mindcache import MindCache
# Initialize the MindCache client with the SQLite database backend
mc = MindCache(db_path="my_memory.db", provider="gemini", model_name="gemini-2.5-flash")
# Add a conversation turn
job_id = mc.add([
{"role": "user", "content": "I prefer Python and FastAPI for backend development."},
{"role": "assistant", "content": "Got it! I will remember your preferences."}
], user_id="alice")
# Process the queue to update the memory
mc.process_queue(user_id="alice")
# Retrieve relevant context for future prompts
context = mc.search("What is Alice's preferred database?", user_id="alice")
print(context)
MindCache has been rigorously benchmarked against the BEAM quality assessment, achieving significantly improved accuracy metrics while maintaining a reduced retrieval latency. For instance:
This efficiency ensures MindCache stands out as an optimal solution for maintaining long-term memory in AI systems, focusing on performance and user-context relevancy.
For a more detailed exploration of MindCache's architectural design, see the blog post: Building MindCache: Designing an Agentic Memory System for Long-Term AI.
Comments
0Start the conversation
Share the first comment.