Memary is a memory-augmented agent framework that stores and retrieves contextual information from a knowledge graph to personalize responses and maintain long-term memory across interactions. It automatically captures all agent interactions and stores them as structured memories without requiring explicit instrumentation, then injects top-ranked user entities and themes into the active context window to tailor agent responses dynamically.
The framework distinguishes itself through a multi-retriever memory search that combines COLBERT reranking with recursive graph queries across databases, enabling fine-tuned agent recall. It decomposes complex user queries into sub-questions to retrieve more targeted information from memory stores, and supports switching between locally downloaded LLMs via Ollama integration for flexible on-device inference without external API dependencies. Memary also provides a conversational memory interface that allows users to query and review specific agent memories, supporting debugging and understanding of past reasoning.
Beyond core memory management, the system includes a multi-agent memory orchestrator that manages separate memory stores and knowledge graphs for multiple agents, enabling personalized context per user. It tracks entity frequency and recency to infer a user's depth of knowledge, and can inject custom data into memory by combining multiple parsers for advanced ingestion. The framework also supports registering user-defined Python functions as tools that agents can call during task execution, and provides memory benchmarking capabilities to test and compare different memory strategies.