Survey of AI Agent Memory Frameworks

Kirk Marple

January 8, 2025

We've used @graphlit and @openai o1 to write a consolidated overview of multiple platforms and toolkits designed for AI agent memory management. Each solution aims to help developers build agents that retain, recall, and leverage information over both short-term and long-term interactions. This analysis highlights the key features relevant to software developers seeking to create robust and stateful AI agents.

For transparency, these were the sites that were crawled and used with the Graphlit LLM-based publishing approach to summarize each web page, and then publish out the final report in a map-reduce fashion.

Letta: https://docs.letta.com/
Mem0: https://docs.mem0.ai/
CrewAI: https://docs.crewai.com/concepts/memory
Zep: https://help.getzep.com/
Memary: https://kingjulio8238.github.io/memarydocs/concepts/
Cognee: https://www.cognee.ai/blog/fundamentals/llm-memory-cognitive-architectures-with-ai

Any errors in this report can be attributed to the LLMs used (GPT-4o Mini, o1) and not intentional.


INTRODUCTION


Across the AI landscape, memory frameworks are evolving to accommodate both short-term and long-term contexts. Our competitive analysis surveys multiple platforms and solutions, highlighting each product’s memory strategies, data ingestion methods, retrieval and storage mechanisms, and broader ecosystem support.


MEMORY MODELS AND MANAGEMENT STRATEGIES

Several platforms emphasize both short-term and long-term memory capabilities.

Short-Term (Context Window) Memory:
– Letta: Utilizes an in-context memory design, showing messages and system prompts within a configurable token limit. Also features core memory blocks that remain visible in the prompt window, and a recall memory for recently accessed data.
– Mem0.ai: Offers personalization by storing conversation history and user preferences in memory. Provides short-term memory in chat contexts, enhanced by local or remote vector stores.
– Zep: Maintains session-based interactions, storing conversation transcripts as memory blocks. Automatically summarizes large histories for more concise context windows.
– CrewAI: Divides memory into short-term for recent interactions, using contextual awareness to keep immediate conversation elements accessible.
– Cognee: Recommends a combination of immediate context windows and fast retrieval methods to reduce hallucinations and ensure accuracy.

Long-Term (Archival) Memory:
– Letta: Features archival memory that persists beyond the active context window. Provides endpoints to insert, retrieve, and delete archived passages. This memory can be surfaced through embedding-based lookups, ensuring large data sets remain accessible.
– Mem0.ai: Supports persistent memory stores keyed to users, sessions, or projects. Offers batch operations (batch-delete, batch-update) and advanced filtering or searching. Embedding integration allows for semantic retrieval across large data sets.
– Zep: Relies on a knowledge graph or a memory store to retain facts, messages, and metadata over multiple sessions. Provides robust cloud features (like classification and advanced search) for session data.
– CrewAI: Long-term knowledge resides in a specialized entity memory layer where user or domain facts accumulate and refine over time.
– Memary (community references): Focuses on knowledge graph expansions, persistent memory modules, and user preference tracking, allowing “rewind” capabilities.
– Cognee: Proposes external storage with vector or graph databases, delivering a memory system to preserve data beyond a single inferencing session, bridging multiple tasks.


TOOLS, FRAMEWORKS, AND DEVELOPER EXPERIENCE

Each solution brings a range of developer-centric features, from REST APIs and SDKs to user interfaces.

Letta’s Agent Development Environment (ADE)
– A visual interface for building, monitoring, and debugging stateful agents.
– Provides real-time event history, memory block visualization, and in-context memory editing.
– Allows dynamic addition or removal of tools and external data sources without recreating agents.

Mem0.ai’s Platform and SDKs
– Offers both managed and open-source versions with Python, JavaScript, and cURL examples.
– Includes memory search, advanced filtering (logical AND/OR, metadata queries), and structured batching for memory creation or deletion.
– Supports integration with frameworks like LangChain, MultiOn, CrewAI, LlamaIndex, or custom solutions.

Zep’s Cloud and Community Editions
– Community Edition focuses on local deployments of memory stores and knowledge graphs.
– Zep Cloud adds advanced features such as classification, extended session management, and question synthesis with low latency.
– Provides multiple SDKs (Python, TS, Go) and integrates with popular agent frameworks (LangChain, Flowise).

CrewAI Integrations
– Emphasizes modular “crews” that collectively manage tasks and share memory.
– Incorporates Mem0.ai for user memory storage.
– Offers robust entity and contextual memory patterns, supporting multiple step decision-making.

Cognee’s Approach
– Positions memory as a critical architecture layer, highlighting how short-term and long-term memory can unify.
– Focuses on parameter tuning, chunking, and retrieval-augmented generation to reduce hallucinations.

Memary Ecosystem
– Targets simplified developer integration with minimal overhead for installing or customizing memory modules.
– Implements knowledge graphs with near real-time search of user preferences and entity references.
– Plans advanced features like rewinding past memories and cross-agent knowledge sharing.


DATA SOURCES AND EMBEDDING INTEGRATIONS

Seamless data connectivity and embedding configurations stand out as key differentiators.

Letta
– Supports multiple embeddings (OpenAI, Azure, Ollama, Anthropic, Vertex AI, vLLM, Google AI, and more).
– Enables attaching or detaching data sources from agents for more flexible memory references.
– Provides an archival memory search endpoint that uses embeddings for relevance ranking.

Mem0.ai
– Embedding layer with broad provider support (OpenAI, Azure, Anthropic, Google, Hugging Face, Vertex AI, Ollama, Together, Groq).
– VectorDB options include Qdrant, Chroma, Milvus, Pgvector, Redis, and Azure AI Search—for advanced memory search.
– Flexible config system to adapt to varied embedding or vector store preferences.

Zep
– Can integrate with local or remote embeddings, depending on deployed environment.
– Graph-based memory usage if using Zep’s Graphiti approach, combining semantic similarity and BM25.
– Cloud version allows advanced classification and graph queries for deeper knowledge representation.

CrewAI & Memary
– Often rely on external embeddings or knowledge graphs such as Neo4j.
– Offer user preference tracking and multi-step reasoning, distributing memory data across various stores.

Cognee
– Stresses the importance of robust chunking and retrieval methods to unify large data sets, relying on advanced vector storage and bridging external web content for up-to-date references.


MESSAGING, SESSION HANDLING, AND SEARCH

Effective memory solutions couple session-based message handling with advanced search capabilities.

Core Capabilities:
– Session creation, retrieval, and deletion for conversation or user context.
– Memory block or message-level operations, including partial updates, structured metadata, and filtering.
– Searching by text, metadata, or advanced semantics (logical operators, date ranges, embedding vectors).

Letta’s Message Operations:
– Create, update, and retrieve messages using roles (assistant, user, tool, system).
– Asynchronous message handling that returns a job ID, letting developers decouple processes.
– Additional layering for ephemeral “recall memory.”

Mem0.ai’s Comprehensive Search:
– Versioned APIs (v1 and v2) with advanced logic (AND, OR, comparisons).
– Batch operations for large-scale updates or deletions.
– MMR-based reranking plus metadata-based filtering for refined retrieval.

Zep’s Session Approach:
– Detailed memory blocks incorporate transcripts, facts, and custom metadata.
– Automated summarization helps keep context windows concise.
– Graph-based add-ons for knowledge representation and fact extraction.

Relevancy Reranking and Summarization:
– Memary references multi-hop graph searches for deep contextual retrieval.
– Cognee advocates for retrieval-augmented generation combined with knowledge graphs or vector indexing.
– Letta’s MemGPT approach applies self-editing memory loops to manage ephemeral content efficiently.


TOOL INTEGRATIONS AND RULE-BASED EXECUTION

Many solutions provide ways to incorporate external functionality or define constraints on how agents operate.

Tool Management in Letta
– Tools can be created, updated, and removed.
– Tool rules to control agent flow (e.g., forcing a certain tool to run first, or ending execution upon a specific tool call).
– Composio actions for external integrations.

Mem0.ai Integrations
– Offers structured tools for memory add/search functions in frameworks like LangChain.
– Easy connection to external sources, such as Vercel AI SDK or MultiOn, for specialized tasks like browsing.

Zep Tools and Agentic Behavior
– Extended by custom function calls, providing classification or question synthesis in sessions.
– Graph add or search functions let agents reason about large knowledge sets via edges and nodes.

CrewAI Modules
– “Crews” combine different skill sets, referencing user memory to decide which module or tool to invoke for each step.


SECURITY, PRIVACY, AND USER MANAGEMENT

As personalization grows, so does the importance of controlling data access and ensuring compliance.

Identity and Role Management:
– Mem0.ai’s approach: Organization and project-level privileges, plus roles (READER, OWNER).
– Letta offers user ID tracking for memory creation or updates, supporting local or self-hosted models.
– Zep supports user, group, and session management, with automated data purges in community editions.

Privacy Controls:
– Mem0.ai: Quick user or memory deletion to comply with “Right to Be Forgotten.”
– Zep: Configurable security measures (JWT authentication, environment variable handling).
– Cognee: Encourages strong encryption and compliance best practices for data retention.


GAPS AND OBSERVATIONS IN THE MARKET

Despite extensive capabilities, several opportunities remain for innovation:

Automated Memory Compression and Rewind:
– Many frameworks provide high-level summarization, but fine-grained memory compression or “rewinding” older states is still rare.
– Memary references upcoming “rewind memories,” hinting at a deeper time-travel style memory.

Unified Multi-Agent Orchestration:
– CrewAI addresses multi-agent synergy, but many solutions still treat single agent contexts.
– Stronger orchestrations across multiple specialized agents could fill a gap for collaboration at scale.

Adaptive Long-Term Memory Tuning:
– Fine-tuning memory retrieval parameters in real time is often manual. Gaps remain for dynamic LLM-driven management of embeddings, chunk sizes, or context prioritization.

Local vs. Cloud Execution Strategies:
– Some solutions excel in local (Ollama, Docker) or cloud (Zep Cloud, Mem0.ai’s managed service), but advanced features (classification, search) often remain cloud-only. A full-featured local deployment remains an opening.


CONCLUSION

The AI agent memory space is flourishing with a variety of platforms offering session-based context handling, advanced long-term archival, and specialized retrieval tooling. Letta provides deep control via a robust Agent Development Environment, Mem0.ai emphasizes flexible search and embedding configurations, while Zep advances classification and graph-based knowledge handling. CrewAI, Memary, and Cognee add further perspectives on multi-agent interplay, knowledge graph utilization, and cognitively inspired memory architectures.


SUMMARY

Please email any questions on this article or the Graphlit Platform to questions@graphlit.com.

For more information, you can read our Graphlit Documentation, visit our marketing site, or join our Discord community.