talira

The memory layer for AI agents

open coreApache-2.0self-hostablefreeMCP

Mem0 ("mem-zero") is a memory layer for AI assistants and agents: you pass it conversations, an LLM extracts the facts, preferences and decisions worth keeping, and later searches return the relevant memories scoped by user, agent or session, ranked by meaning, BM25 keywords and shared entities together. Adding a memory calls an LLM by default (OpenAI's gpt-5-mini unless you configure another provider, including local models through Ollama); infer=False stores raw messages and skips that step. The Apache-2.0 Python and TypeScript library and REST server run on your own vector store and models, while the hosted Mem0 Platform adds graph memory, memory decay, temporal reasoning, background consolidation (Dream) and webhooks. It ships an official memory plugin for OpenClaw, a hosted MCP server and a CLI.

Problems it solves

  • my chatbot forgets each user's preferences as soon as the conversation ends
  • give my AI assistant long-term memory of each user that carries over between sessions
  • pull the key facts out of a conversation and store them so the agent can recall them next week
  • keep agent memories separate per user, per agent and per session in a multi-tenant app
  • self-host an agent memory layer on my own vector database with a local Ollama model
  • add long-term memory to my OpenClaw assistant that I talk to on WhatsApp and Telegram
  • a hosted memory API with a free plan so I don't have to run a vector store while prototyping
  • cut prompt tokens by retrieving only the relevant memories instead of replaying the whole chat history
  • let Claude Code and Cursor share one memory store through an MCP server
  • store raw chat messages as agent memories without an LLM extraction call on every write
  • support bot that remembers each customer's past tickets and what they already tried
  • agent memory search that matches on meaning, exact keywords and named people or products together

Features

  • LLM extraction of facts, preferences and decisions from conversations (single-pass, add-only since v3)
  • infer=False stores messages as given, without the LLM extraction step
  • memories scoped by user_id, agent_id and run_id, with AND/OR/NOT metadata filters
  • retrieval that fuses semantic, BM25 keyword and entity matching
  • 18 LLM providers, 11 embedders and 25 vector stores in the open source version, including Ollama, Qdrant and pgvector
  • self-hosted REST server and dashboard with API keys and an audit log (Docker Compose)
  • hosted Platform: graph memory, memory decay, temporal reasoning and Dream background consolidation
  • Platform webhooks, memory export, batch updates and feedback on retrieved memories
  • hosted MCP server at mcp.mem0.ai for Claude Code, Cursor, Codex, Windsurf, VS Code and OpenCode
  • official OpenClaw memory plugin (@mem0/openclaw-mem0) with auto-recall and auto-capture, Platform or self-hosted
View 2 more
  • CLI (npm and PyPI) that can sign up as an agent and mint an API key
  • integrations with LangGraph, CrewAI, the OpenAI Agents SDK, the Vercel AI SDK, Hermes Agent and OpenCode

Limitations

  • Doesn't extract memories without an LLM: Mem0 requires one (OpenAI's gpt-5-mini by default) for each add, unless you store raw messages with infer=False12

Ways to run it

Mem0 Platform

Hosted by Mem0

Free (limits above); Custom: contact sales34

Only in this edition

  • graph memory
  • memory decay
  • temporal reasoning
  • Dream background consolidation
  • webhooks
  • memory export
  • web dashboard at app.mem0.ai
  • organizations and projects

Pricing

Mem0 Open Source

You run it, Apache-2.0

free45

Only in this edition

  • any of 25 vector stores, 18 LLM providers and 11 embedders

Not included

  • graph memory, memory decay, temporal reasoning and Dream, which are Platform-only
  • webhooks, memory export and batch operations

You arrange

  • an LLM provider (OpenAI's gpt-5-mini by default, or a local model through Ollama)
  • an embedding model
  • a vector store such as Qdrant or pgvector

Self-hosting docs

Capabilities

Has an APIplan not known
Has a command line toolplan not known
Has an MCP serverplan not known
Has official SDKsplan not known
Has single sign-onplan not known
Sends webhooksplan not known

Alternatives

The same job

These do what Mem0 does.

  1. Hindsight Long-term memory for AI agents that learns from experience
  2. ai-memory Long-term memory for AI coding agents, shared across agents, projects and machines
  3. Engram Persistent memory for AI coding agents
  4. Supermemory Memory and context layer for AI: memory, RAG, user profiles and connectors in one API
  5. Honcho Memory infrastructure for building stateful agents
  6. Letta Build stateful agents with memory that can learn and improve over time

Compare Mem0 with the top 3