Agent Memory
Let your agent remember users, past conversations and what it learned, across sessions, without stuffing every old message back into the prompt.
Trends
Mem0 gained the most ground in package downloads: +34% against the median npm package over a year.
Public counts each month: pull requests on GitHub, package downloads, stars, Product Hunt followers. They show direction, not market share.
The real choice
Hosted memory API, an open-source library you run, or a full stateful-agent platform. A hosted API extracts facts from conversations and returns the relevant ones with one call, with nothing to operate but your users' data in its cloud. An open-source library (often backed by a knowledge graph) runs next to your own database, free but yours to tune and host. A stateful-agent platform makes memory part of the agent itself, which saves glue code but means building your agent on that platform.
Pick by situation
Tap the ones that are you — the tools that fit light up below.- You want to add user memory to an existing agent with a few API calls and a free tier to start
Mem0
Supermemory - Memory must stay on your own infrastructure, built as a graph over your data
Cognee
Graphiti - Your agent needs dated facts that change over time, from business data as well as chats
Zep
Graphiti - You'd rather build the agent on a platform where memory is built in
Letta - You want memory as plain Markdown files you can read, edit and share across your own AI tools
Basic Memory
Compare the tools
Grouped by the side of the choice they answer, not ranked. Open a row for when to use it, the trade-off and what makers say.
Mem0service · open source · free tierA drop-in memory layer that extracts facts from conversations and retrieves them later, as a hosted API or an Apache-licensed library.
2+31 open source124.5k/wk+34% vs npm
Use it whenYou want user memory in an existing agent quickly, with a free tier, and the option to self-host later.
Trade-offHosted plans cap add and retrieval requests per month, and graph memory starts on the $249/month Pro plan.
Supermemoryservice · open source · free tierA memory API that learns from users' chats, files and URLs and injects what it knows into the model's context, also available as plugins and an MCP server.
2+4 open source105.1k/wk
Use it whenYou want memory and document ingestion behind one API, billed by credits with a small free allowance.
Trade-offCredit-based billing makes heavy ingestion harder to predict; self-hosting is only on the Scale plan and above.
OpenAI's memory lives in one chat session. Clade needed a shared brain across agents, channels, and clients - Supermemory gave us one memory layer the whole stack reads and writes to.
Zepservice · free tierA context graph per user, account or domain built from business data, documents and conversations, with dated facts and access policies.8 open source106k/wk−74% vs npm
Use it whenYour agent serves business accounts and needs facts that change over time, not just chat history.
Trade-offPaid self-serve plans start at $125/month, and it now targets enterprise data more than simple chat memory; VPC deployment is Enterprise-only.
No maker's product we track shows it for this yet · in 8 open-source projects.
Graphitilibrary · open source · free tierA Python library for temporal knowledge graphs that agents update in real time, on Neo4j, FalkorDB, Kuzu or Neptune.1+4 open source143.2k/wk
Use it whenYou want Zep's graph approach on your own database, with full control over the schema.
Trade-offA library, not a service — you run the graph database and pay for the LLM calls that extract entities and facts.
Used by Ringo · in 4 open-source projects.
Graphiti was essential for building the custom RAG architecture for Ringo. It perfectly handles dynamic data, allowing us to create highly personalized AI models tailored to each company workspace.
Cogneelibrary · open source · free tierAgent memory that combines graph, vector and relational retrieval, run locally, self-hosted or on Cognee Cloud.3 open source19.6k/wk
Use it whenMemory must stay on your infrastructure, or you want your agents to recall what's in Slack, GitHub and Linear.
Trade-offBuilding a graph from your data costs LLM tokens on every ingest, and tuning the pipeline takes more work than a hosted API.
No maker's product we track shows it for this yet · in 3 open-source projects.
Before you choose
Start with what the agent actually forgets that hurts — user preferences, past decisions, facts about an account — and store only that, not every message. Scope every memory to a user or tenant ID from the first write, and give users a way to see and delete what's remembered. Measure whether retrieved memories improve answers on a few real conversations before adding graph features or a second store.
- Writing memories without a user or tenant ID, so one customer's facts surface in another customer's session.
- Saving everything the user says as memory, so stale or wrong facts keep coming back and crowd out the ones that matter.
- Sending personal data to a hosted memory service without listing it as a subprocessor or offering users a way to delete it.
Other options
Real choices most makers here won't need to weigh.
Decided alongside
What the 8 makers' products here chose for their other decisions.