Skip to content
agentscamp
Tool

Mem0

A memory layer for AI agents and apps — persistent, personalized long-term memory across sessions.

open sourcesdk
Updated Jun 3, 2026
agentsmemorypersonalizationvector-storeopen-source

Mem0 adds a persistent memory layer to agents and LLM apps: it extracts, stores, and retrieves salient facts across sessions so an assistant remembers a user's preferences and history instead of starting cold each conversation. Open-source library plus a managed platform.

Mem0 is a memory layer for AI agents and LLM applications. Instead of cramming an entire conversation history into the context window every turn, Mem0 extracts the salient facts, stores them, and retrieves the relevant ones when needed — so an agent remembers a user's preferences, decisions, and history across sessions while keeping prompts lean.

It is aimed at developers building assistants and agents that should feel continuous rather than amnesiac. Mem0 sits between your app and your LLM, managing what's worth remembering and surfacing it at the right moment.

Highlights

  • Long-term memory — persist facts across sessions, scoped per user, agent, or session.
  • Automatic extraction — distills conversations into memories rather than storing raw transcripts.
  • Smart retrieval — fetches the memories relevant to the current turn, keeping context small.
  • Pluggable backends — works with common vector stores and LLM providers.
  • Open-source + managed — self-host the library or use the hosted platform.

In an AI-assisted workflow

from mem0 import Memory
m = Memory()
m.add("Prefers TypeScript and pnpm", user_id="alex")
# later turn:
context = m.search("what stack does the user like?", user_id="alex")

TIP

Memory is an architecture decision, not just a library call — decide what's worth remembering and for how long. See Agent Memory Architecture for short- vs. long-term memory patterns and where Mem0 fits.

Good to know

Mem0 is open source (Apache-2.0) and free to self-host; a managed platform with a free tier is also available. It sits on top of a vector store and an LLM provider — it extracts and embeds memories, then retrieves them — so you bring (and pay for) a vector database underneath it; see Best Vector Database in 2026 for choosing one. Pairs naturally with agent frameworks like LangGraph.

Related