Open-Source AI Memory System Mimics Human Cognition with Semantic, Episodic, and Procedural Types
A new open-source AI memory API called Mengram introduces a human-inspired tripartite memory model—semantic, episodic, and procedural—to overcome the limitations of flat fact-storage tools like Mem0. Drawing on cognitive science and recent AI agent research, the system enables deeper personalization and context-aware LLM interactions.

Open-Source AI Memory System Mimics Human Cognition with Semantic, Episodic, and Procedural Types
A new open-source artificial intelligence memory framework, Mengram, is challenging the status quo of AI memory systems by modeling human memory architecture rather than relying on simplistic key-value storage. Developed by software engineer Alibay Zhizhanov, Mengram introduces three distinct memory types—semantic, episodic, and procedural—each mirroring cognitive science principles that underpin human learning and recall. Unlike commercial alternatives such as Mem0 and Supermemory, which store isolated facts like "user prefers Python," Mengram captures contextual depth: when, how, and why actions occur.
The system automatically extracts memory types from conversational data using embeddings and natural language processing, eliminating the need for manual tagging. Its architecture, built on Python, FastAPI, and PostgreSQL with pgvector for vector storage, integrates seamlessly with major AI development tools including LangChain, Claude Desktop, and Cursor. A standout feature is its "Cognitive Profile" endpoint, which synthesizes all stored memories into a dynamic system prompt, enabling LLMs to adapt their behavior to individual users in real time.
According to research published in ICLR 2026 on "Improving Code Localization with Repository Memory," context-rich memory systems significantly enhance the accuracy and efficiency of AI agents performing complex tasks like debugging and code navigation. The study, led by researchers from Stanford and Tsinghua University, demonstrates that agents with access to procedural and episodic memory outperform those relying solely on semantic facts by up to 42% in localized code tasks. Mengram’s design aligns closely with these findings, embedding not just what a user knows, but how they think and act over time.
While Redis has been widely adopted for managing short-term and long-term memory in AI agents—offering low-latency caching and structured data handling—the platform lacks native support for cognitive taxonomy. As noted in a recent Redis blog, most memory systems treat data as "state," not as "experience." Mengram fills this gap by structuring memory along psychological dimensions, enabling richer agent behavior. For instance, an AI assistant using Mengram wouldn’t just know that a user works with PostgreSQL; it would recall that they debugged a connection timeout issue on February 17 by adjusting cache TTL, and that their standard workflow involves checking logs before local reproduction.
The implications extend beyond personalization. In enterprise settings, Mengram could empower customer service bots to maintain consistent, context-aware dialogues across weeks of interaction, or assist developers by automatically reconstructing past troubleshooting patterns. Its Apache 2.0 license and full API documentation make it accessible to researchers and startups alike. The inclusion of Python and JavaScript SDKs further lowers adoption barriers.
While the cognitive model may appear complex, early adopters report that the system’s automation mitigates overhead. "I was skeptical at first—three memory types seemed over-engineered," said one developer on the Mengram GitHub repository. "But once I saw the system generate a prompt that perfectly replicated my coding style, I was sold."
As AI agents evolve from reactive tools to proactive collaborators, memory systems that emulate human cognition will become indispensable. Mengram represents a significant step toward that future—not by adding more data, but by organizing it meaningfully. With its public release and active community feedback loop, the project may well set a new standard for how AI remembers, learns, and grows alongside its users.


