Why AI Agents Need Memory: Use Cases, Obsidian, and the Tools That Exist Today
· AI & ML · By Zeeshan Ahmad
An LLM has no memory of its own. Each call sees only what is in the context window. Close the session, start a new chat, or run the agent tomorrow, and it starts from zero. It does not know your preferences, the decisions you made last week, or the approach it already tried and rejected.
Memory fixes that. It lets an agent keep useful facts across sessions, reuse what it has already learned instead of rederiving it, and stay within context limits on long tasks.
#Where memory matters
- Personal assistants remember preferences, people, and recurring tasks.
- Coding agents remember project conventions, past fixes, and why the code is shaped the way it is.
- Customer support agents recall a customer's history and earlier tickets.
- Enterprise knowledge needs facts shared across teams and tools, not locked to one chat.
- Long-running autonomous agents keep progress and state across days, not minutes.
In each case the question is the same: what should the agent carry forward, and where should it live?
#Obsidian as agent memory
Obsidian is a local app that stores notes as plain Markdown files in a folder, called a vault. That makes it a practical memory store for agents. The memory stays readable and editable by you, it lives on your machine, and you can version it with git.
Agents reach the vault through MCP plugins. A few examples in the Obsidian community catalog:
- Enquire MCP adds hybrid search with reranking over the vault.
- Agentcairn treats plain Markdown files as the memory store.
- Mengram syncs notes into searchable memory for MCP clients.
- Vault Operator is a broader agent plugin with persistent memory and a remote MCP mode.
These projects are young and have small user bases, so check the code before you trust one with your notes. The main trade-off is simplicity against scale. Markdown files are easy to inspect and fix by hand, but they have no built-in fact tracking or relationship model. Once a vault grows large, search quality depends on the plugin's retrieval.
#The memory tools
Mem0 is a managed memory layer. It extracts facts from conversations, stores them as vector embeddings, and retrieves the relevant ones on the next call. It is aimed at personalization and multi-user apps, and it drops into an existing agent through an API. Apache-2.0 for self-hosting. The weak spot is change over time: embeddings store facts, not how they evolved.
Zep stores memory as a temporal knowledge graph, built on its open-source Graphiti engine. Facts carry validity times. When something changes, the old fact is marked superseded rather than overwritten, so you can ask what was true last quarter. That suits time-aware reasoning. Self-hosting is Apache-2.0; hosted plans cost money.
Letta (formerly MemGPT) is an agent runtime, not only a memory API. The agent gets editable memory blocks in its context, such as a persona or user profile, plus archival storage it searches on demand. It decides when to read and update its own memory. Good for long-running agents, with the trade-off that you adopt its runtime. Apache-2.0.
LangMem is a memory library for LangChain and LangGraph. The agent gets tools to save and search memories during a conversation, and a background manager can extract memories afterward. It stores data in LangGraph's memory store, so it is the natural choice if you already use LangGraph and do not want another service.
Cognee ingests documents, chats, and connectors such as Slack, GitHub, and Linear, then builds a knowledge graph over them with remember, recall, and improve as core operations. Feedback changes future recall. It fits shared company knowledge and domain rules better than per-user chat memory. Open source, with a hosted option and MCP integrations for Claude Code and Cursor.
agentmemory is local-first memory for coding agents such as Claude Code, Cursor, and Codex. Hooks capture tool calls and prompts as observations. These are indexed with BM25 and optional local vectors, then consolidated into memories that link back to their sources. Agents query it over MCP or a localhost REST API. Keyword search needs no API key. Apache-2.0.
#How to choose
- Personalization across users: Mem0
- Facts that change over time: Zep
- Long-running agents that manage their own state: Letta
- Already on LangGraph: LangMem
- Shared company knowledge: Cognee
- Coding agents, local-first: agentmemory
- Notes you want to read and edit yourself: Obsidian with an MCP plugin
Most published benchmarks come from the vendors themselves, so test each option on your own workload before committing. Start with the smallest memory that answers the question your agent actually asks.