Overview
Supermemory is a memory and context layer for AI applications. AI assistants normally forget everything between conversations; Supermemory stores that context for you. It automatically extracts facts from conversations, builds and maintains user profiles, handles knowledge updates and contradictions, forgets expired information, and returns the right context when an agent needs it.
It is aimed at developers building AI products who want memory, retrieval-augmented generation (RAG), and connectors without wiring up a vector database, embedding pipeline, or chunking strategy themselves. You add memories and search them through a single API, available as an npm package for TypeScript and a PyPI package for Python. There is also an MCP server so assistants like Claude Code, Cursor, and Windsurf can read and write memory directly.
As a memory framework, Supermemory bundles the whole context stack into one system: fact extraction, hybrid search that combines RAG documents with personalized context, multi-modal file extractors, and connectors for sources such as Google Drive, Gmail, Notion, and GitHub. You can use the hosted API or self-host it locally, including fully offline with a local model through Ollama.
What it does
- Automatic memory: extracts facts from conversations and handles temporal changes, contradictions, and automatic forgetting
- Auto-maintained user profiles that combine stable facts with recent activity, returned in a single call
- Hybrid search that pulls RAG documents and personalized memory together in one query
- Connectors for Google Drive, Gmail, Notion, OneDrive, and GitHub with real-time webhook sync
- Multi-modal extractors for PDFs, images (OCR), videos (transcription), and code (AST-aware chunking)
- Self-hostable as a single binary, with the option to run fully offline using Ollama
Getting started
You can call the hosted API from TypeScript or Python, wire it into an AI client through MCP, or run it yourself locally. The quickest path for app builders is the SDK.
Install the SDK
Install the package for your language and set your API key as an environment variable.
npm install supermemory
export SUPERMEMORY_API_KEY="YOUR_API_KEY"Add and search memories
Create the client, add a memory tagged to a user, then fetch that user's profile and relevant context with a query.
import Supermemory from "supermemory";
const client = new Supermemory();
const USER_ID = "dhravya";
// Add memory
await client.add({
content: "User conversation content here",
containerTag: USER_ID,
});
// Search memories
const profile = await client.profile({
containerTag: USER_ID,
q: "search query",
});Or connect an AI client via MCP
Install the MCP server into your assistant to give it memory tools directly. Replace claude with cursor, windsurf, vscode, or another supported client.
npx -y install-mcp@latest https://mcp.supermemory.ai/mcp --client claude --oauth=yesOr run it yourself locally
Install the local single-binary version to run memory on your own machine, with the option to go fully offline using Ollama.
curl -fsSL https://supermemory.ai/install | bashCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Give an AI agent persistent memory of a user's preferences, projects, and past conversations across sessions
- Add RAG over your own documents and personalized user context to a product through one API instead of building a vector pipeline
- Sync knowledge from Google Drive, Gmail, Notion, or GitHub into a single searchable memory layer
- Give coding assistants like Claude Code, Cursor, or Windsurf long-term memory through the MCP server
How Supermemory compares
Supermemory alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Mem0 | ★ 59.6k | A memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends. |
| Graphiti | ★ 28.1k | A library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time. |
| Supermemory | ★ 27.8k | A memory and context engine that lets your AI remember across sessions |
| Cognee | ★ 24.1k | A graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge. |
| Letta | ★ 23.6k | A framework (formerly MemGPT) for building stateful agents with long-term memory that persists across sessions and conversations. |
| Memvid | ★ 15.7k | Memvid packs an AI agent's data, embeddings, and search index into one portable file, so it can retrieve memory fast without running a vector database. |
| Memori | ★ 15.5k | An SQL-native memory engine that gives any LLM persistent, structured memory stored in standard PostgreSQL or MySQL databases instead of a vector store. |
| MemU | ★ 13.9k | A memory layer for AI agents that organizes structured storage and intent capture to reduce the tokens needed to keep context across conversations. |