MHN AI Agent Memory

•
5
•

Equips AI agents with real-time, deterministic associative memory using Modern Hopfield Networks, eliminating the need for LLM calls or databases.

This library revolutionizes how AI agents access and manage memory by replacing traditional LLM-based database lookups with a mathematically backed associative memory system. Leveraging Modern Hopfield Networks, it provides instantaneous, deterministic, and cost-free retrieval of facts. Agents can store information as patterns in an energy landscape and query with partial cues, receiving the exact match with a confidence score. This approach sidesteps the latency, cost, and non-determinism of large language model calls, offering a robust and efficient solution for giving AI agents a true, controllable memory.

Key Features

01Pluggable encoders for flexible text-to-vector conversion
02Multi-hop retrieval for chaining related facts and reasoning
03Scalable tiered storage from 10 to 10 million facts (hot/cold)
04Built-in 'nothing matches' detection for effective query handling
050 GitHub stars
06Heuristic contradiction detection to prevent conflicting facts

Use Cases

01Providing fast, deterministic associative recall for AI agents
02Enhancing AI coding agents like Cursor and Claude Code with efficient context memory
03Developing AI systems that require cost-free and non-hallucinatory memory retrieval