Generated banner for supermemory
Generated logo for supermemory

supermemory

Memory serverOfficial supermemory project

Created by supermemory

Published in supermemoryai/supermemory. Publisher page

31,593 GitHub stars

What it is

Memory and context engine + app that is extremely fast, scalable, and can be run fully locally. The Memory API for the AI era.
— the description by supermemory

AutoGineer overview, from the brain’s own files

Supermemory is a memory and context layer designed to give AI agents persistent knowledge across conversations. It functions as a memory graph that automatically extracts facts, tracks temporal updates, resolves contradictions, and manages user profiles. The system supports hybrid search, combining RAG-based document retrieval with personalized memory recall. It includes connectors for external data sources like Google Drive, Notion, and GitHub, and provides multi-modal extraction for files including PDFs, images, and code. Supermemory can be deployed as a hosted service or run locally as a self-contained server.

How it works

Memory model: Hybrid

AutoGineer overview, from the brain’s own files

Supermemory operates by extracting facts and preferences from user interactions and storing them in a structured memory graph. It maintains user profiles by combining stable facts with recent activity. When queried, the system performs a hybrid search that retrieves both relevant document chunks and personalized memory context. It supports automatic synchronization with external services and processes various file types into searchable data. The system is accessible via an API or through plugins and MCP servers for various AI assistants.

Folders
FolderRoleFiles
.githubagent-config11
packagessource-code311
skillsagent-instructions8
appsfolder598

The agent writes

Requirements

Runtimes: Node.js >=20, Bun

Databases: PostgreSQL

API keys (by name): OPENAI_API_KEY

Works with: Claude Code, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Amp, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 2 scripts. Review README.md before opening the folder in Claude Code. No step below turns a hook on for you.

    • README.md: curl -fsSL https://supermemory.ai/install | bash
    • README.md: curl -fsSL https://supermemory.ai/install | bash
  2. Add supermemory to .mcp.json:

    {
      "mcpServers": {
        "supermemory": {
          "type": "http",
          "url": "https://mcp.supermemory.ai/mcp"
        }
      }
    }
    
  3. Or add it with the Claude Code CLI:

    claude mcp add --transport http supermemory https://mcp.supermemory.ai/mcp
  4. Your data is sent to mcp.supermemory.ai.

  5. Created by supermemory. Published in supermemoryai/supermemory. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Integrate persistent memory into AI coding agents like Cursor or Claude Code.
  • Build AI applications that require user-specific context and long-term memory.
  • Sync external knowledge bases from tools like Notion or GitHub into an agent's context.
  • Run a private, local-first memory server for offline AI workflows.
“What programming style does the user prefer?”
The system returns the user's stored preference, such as 'prefers functional patterns', retrieved from their profile.
“How do I deploy?”
The system performs a hybrid search, returning both relevant deployment documentation and the user's specific deployment preferences.

Documentation by supermemory

<p align="center"> <picture> <source srcset="apps/web/public/logo-fullmark.svg" media="(prefers-color-scheme: dark)"> <source srcset="apps/web/public/logo-light-fullmark.svg" media="(prefers-color-scheme: light)"> <img src="apps/web/public/logo-fullmark.svg" alt="Supermemory" width="400" /> </picture> </p>

<p align="center"> <strong>State-of-the-art memory and context engine for AI.</strong> </p>

<p align="center"> <a href="https://supermemory.ai/docs">Docs</a> · <a href="https://supermemory.ai/docs/quickstart">Quickstart</a> · <a href="https://supermemory.ai/docs/self-hosting/overview">Self-host</a> · <a href="https://console.supermemory.ai">Dashboard</a> · <a href="https://supermemory.link/discord">Discord</a> </p>

<p align="center"> <a href="https://www.npmjs.com/package/supermemory"><img src="https://img.shields.io/npm/v/supermemory?style=flat-square&color=blue" alt="npm" /></a> <a href="https://pypi.org/project/supermemory/"><img src="https://img.shields.io/pypi/v/supermemory?style=flat-square&color=blue" alt="pypi" /></a> <a href="https://supermemory.ai/docs"><img src="https://img.shields.io/badge/docs-supermemory.ai-blue?style=flat-square" alt="docs" /></a> </p>

<p align="center"> <strong>English</strong> · <a href="README.zh-CN.md">简体中文</a> </p>

<p align="center"> <strong>#1 on every major AI memory benchmark — <a href="https://github.com/xiaowu0162/LongMemEval">LongMemEval</a>, <a href="https://github.com/snap-research/locomo">LoCoMo</a>, and <a href="https://github.com/Salesforce/ConvoMem">ConvoMem</a>.</strong><br/> <strong>95% Recall@15 with a 99.4% context reduction · ~50ms user profiles.</strong><br/> <a href="https://supermemory.ai/research">Read the research →</a> </p>


Supermemory is the memory and context layer for AI. #1 on LongMemEval, LoCoMo, and ConvoMem — the three major benchmarks for AI memory.

We are a research lab building the engine, plugins and tools around it.

Your AI forgets everything between conversations. Supermemory fixes that.

It automatically learns from conversations, extracts facts, builds user profiles, handles knowledge updates and contradictions, forgets expired information, and delivers the right context at the right time. Full RAG, connectors, file processing — the entire context stack, one system.

🧠 MemoryExtracts facts from conversations. Handles temporal changes, contradictions, and automatic forgetting.
👤 User ProfilesAuto-maintained user context — stable facts + recent activity. One call, ~50ms.
🔍 Hybrid SearchRAG + Memory in a single query. Knowledge base docs and personalized context together.
🔌 ConnectorsGoogle Drive · Gmail · Notion · OneDrive · GitHub — auto-sync with real-time webhooks.
📄 Multi-modal ExtractorsPDFs, images (OCR), videos (transcription), code (AST-aware chunking). Upload and it works.

All of this is in our single memory structure and ontology.

<img width="1414" height="937" alt="image" src="https://github.com/user-attachments/assets/8863b6d9-c043-4c75-b200-4f1759e7edaf" />


Use Supermemory

<table> <tr> <td width="50%" valign="top">

<h3>🧑‍💻 I use AI tools</h3>

Give Claude Code, Muse Code, Cursor, Codex and OpenCode persistent memory across every conversation with a plugin or the MCP server.

Your AI remembers your preferences, projects, past discussions — and gets smarter over time.

→ Jump to User setup

</td> <td width="50%" valign="top">

<h3>🔧 I'm building AI products</h3>

Add memory, RAG, user profiles, and connectors to your agents and apps with a single API.

No vector DB config. No embedding pipelines. No chunking strategies.

→ Jump to developer quickstart

</td> </tr> <tr> <td colspan="2" valign="top">

<h3>🖥️ I want to run it myself</h3>

State-of-the-art memory, on your machine. One binary. Zero config. Bring any model — or run fully offline with Ollama.

curl -fsSL https://supermemory.ai/install | bash

→ Jump to Supermemory local

</td> </tr> </table>


Give your AI memory

Plugins and the MCP server give any compatible AI assistant persistent memory. One install, and your AI remembers you.

Supermemory Plugins

Supermemory comes built with plugins for Claude Code, Muse Code, Cursor, Codex, OpenCode, OpenClaw, and Hermes.

<img width="844" height="484" alt="image" src="https://github.com/user-attachments/assets/ecb879a2-8652-495d-9228-f305a97ba603" />

These plugins are implementations of the supermemory API, and they are open source!

You can find them here:

MCP

Server URL:

https://mcp.supermemory.ai/mcp
{
  "mcpServers": {
    "supermemory": {
      "url": "https://mcp.supermemory.ai/mcp"
    }
  }
}

Read more about our MCP here - https://supermemory.ai/docs/supermemory-mcp/mcp

What your AI gets
ToolWhat it does
memorySave or forget information. Your AI calls this automatically when you share something worth remembering.
recallSearch memories by query. Returns relevant memories + your user profile summary.
contextInjects your full profile (preferences, recent activity) into the conversation at start. In Cursor and Claude Code, just type /context.
How it works

Once installed, Supermemory runs in the background:

  1. You talk to your AI normally. Share preferences, mention projects, discuss problems.

  2. Supermemory extracts and stores the important stuff. Facts, preferences, project context — not noise.

  3. Next conversation, your AI already knows you. It recalls what you're working on, how you like things, what you discussed before.

Memory is scoped with projects (container tags) so you can separate work and personal context, or organize by client, repo, or anything else.

Supported clients

Claude Desktop · Cursor · Windsurf · VS Code · Claude Code · OpenCode · OpenClaw · Hermes

The MCP server is open source — view the source.

Manual configuration

Add this to your MCP client config:

{
  "mcpServers": {
    "supermemory": {
      "url": "https://mcp.supermemory.ai/mcp"
    }
  }
}

Build with Supermemory (API)

If you're building AI agents or apps, Supermemory gives you the entire context stack through one API — memory, RAG, user profiles, connectors, and file processing.

Install
npm install supermemory    # or: pip install supermemory
Quickstart
import Supermemory from "supermemory";

const client = new Supermemory();

// Store a conversation
await client.add({
  content: "User loves TypeScript and prefers functional patterns",
  containerTag: "user_123",
});

// Get user profile + relevant memories in one call
const { profile, searchResults } = await client.profile({
  containerTag: "user_123",
  q: "What programming style does the user prefer?",
});

// profile.static  → ["Loves TypeScript", "Prefers functional patterns"]
// profile.dynamic → ["Working on API integration"]
// searchResults   → Relevant memories ranked by similarity
from supermemory import Supermemory

client = Supermemory()

client.add(
    content="User loves TypeScript and prefers functional patterns",
    container_tag="user_123"
)

result = client.profile(container_tag="user_123", q="programming style")

print(result.profile.static)   # Long-term facts
print(result.profile.dynamic)  # Recent context

Supermemory automatically extracts memories, builds user profiles, and returns relevant context. No embedding pipelines, no vector DB config, no chunking strategies.

Framework integrations

Drop-in wrappers for every major AI framework:

// Vercel AI SDK
import { withSupermemory } from "@supermemory/tools/ai-sdk";
const model = withSupermemory(openai("gpt-4o"), { containerTag: "user_123", customId: "conv-1" });

// Mastra
import { withSupermemory } from "@supermemory/tools/mastra";
const agent = new Agent(withSupermemory(config, "user-123", { mode: "full" }));

Vercel AI SDK · LangChain · LangGraph · OpenAI Agents SDK · Mastra · Agno · Claude Memory Tool · n8n

Search modes
// Hybrid (default) — RAG + Memory in one query
const results = await client.search({
  q: "how do I deploy?",
  containerTag: "user_123",
  searchMode: "hybrid",
});
// Returns deployment docs (RAG) + user's deploy preferences (Memory)

// Memories only
const results = await client.search({
  q: "user preferences",
  containerTag: "user_123",
  searchMode: "memories",
});
User profiles

Traditional memory relies on search — you need to know what to ask for. Supermemory automatically maintains a profile for every user:

const { profile } = await client.profile({ containerTag: "user_123" });

// profile.static  → ["Senior engineer at Acme", "Prefers dark mode", "Uses Vim"]
// profile.dynamic → ["Working on auth migration", "Debugging rate limits"]

One call. ~50ms. Inject into your system prompt and your agent instantly knows who it's talking to.

Connectors

Auto-sync external data into your knowledge base:

Google Drive · Gmail · Notion · OneDrive · GitHub · Web Crawler

Real-time webhooks. Documents automatically processed, chunked, and searchable.

API at a glance
MethodPurpose
client.add()Store content — text, conversations, URLs, HTML
client.profile()User profile + optional search in one call
client.search()Hybrid search across memories and documents (searchMode)
client.search.documents()Document search with metadata filters (legacy v3 response shape)
client.documents.uploadFile()Upload PDFs, images, videos, code
client.documents.list()List and filter documents
client.settings.update()Configure memory extraction and chunking

Full API reference → supermemory.ai/docs


Supermemory local — run it yourself

State-of-the-art memory, on your machine. One binary. Zero config.

curl -fsSL https://supermemory.ai/install | bash
# or
npx supermemory local
supermemory-server

First boot sets up the embedded Supermemory graph engine, local embeddings, and your credentials, then prints an API key. The full Memory API — documents, memories, user profiles, hybrid search — runs against http://localhost:6767.

const client = new Supermemory({
  apiKey: "sm_...",
  baseURL: "http://localhost:6767", // that's the only change
});
  • Bring any model — OpenAI, Anthropic, Gemini, Groq, or any OpenAI-compatible endpoint. An interactive wizard walks you through it on first boot.

  • Embeddings — local Xenova/bge-base-en-v1.5 by default (no API key); optionally OpenAI, Gemini, or Ollama. Same provider stack as cloud.

  • Offline text memories if you want — point it at Ollama (gpt-oss:20b works great), disable telemetry with SUPERMEMORY_DISABLE_TELEMETRY=1, and use local text or file inputs after the first embedding-model download. URL ingestion uses a hosted reader service.

  • Your data, one directory — everything lives in ~/.supermemory, easy to back up or move.

  • Same API as the platform — prototype locally, ship on the hosted platform by changing baseURL.

Run with Docker

Prebuilt images support Linux amd64 and arm64. You don’t need to build or clone the server source.

For a new installation, run these commands in an empty directory and set your own LLM provider key:

release_url=https://github.com/supermemoryai/supermemory/releases
curl -fL "$release_url/download/server-v0.0.9/compose.yaml" -o compose.yaml
export OPENAI_API_KEY=your_openai_api_key_here
export SUPERMEMORY_VERSION=0.0.9
docker compose up -d --wait --wait-timeout 180

The API listens on http://localhost:6767. Data and credentials persist in the supermemory_supermemory-data volume. Get your local API key with docker compose exec supermemory cat /data/api-key; requests require it even on localhost.

Read the Docker setup and upgrade instructions for persistent provider configuration, backups and upgrades. Keep the existing volume and keys when upgrading; don’t run docker compose down -v.

Read the self-hosting docs — quickstart, configuration, embeddings, and local vs. Enterprise.


Benchmarks

Supermemory is state of the art across all major AI memory benchmarks:

BenchmarkWhat it measuresResult
LongMemEvalLong-term memory across sessions with knowledge updates#1
LoCoMoFact recall across extended conversations (single-hop, multi-hop, temporal, adversarial)#1
ConvoMemPersonalization and preference learning#1

On LongMemEval, supermemory reaches 95% Recall@15 while adding only ~720 tokens of context — a 99.4% context reduction (99.6% at @10, 99.8% at @5). Recall by category: Knowledge Updates 99%, Assistant recall 100%, User recall 97%, Multi-session 93%, Temporal Reasoning 91%, Preference 90%.

We also built the Supermemory Filesystem (SMFS), which uses 3.0× fewer tokens on Claude (24M vs 72M) and 1.75× fewer on Codex across the 110-question xAFS benchmark. See the full write-ups on our research page.

We also built MemoryBench — an open-source framework for standardized, reproducible benchmarks of memory providers. Compare Supermemory, Mem0, Zep, and others head-to-head:

bun run src/index.ts run -p supermemory -b longmemeval -j gpt-4o -r my-run
Benchmarking your own memory solution

We provide an Agent skill for companies to benchmark their own context and memory solutions against supermemory.

npx skills add supermemoryai/memorybench

Simply run this and do /benchmark-context - Supermemory will automatically do the work for you!


How memory works under the hood

Your app / AI tool
        ↓
   Supermemory
        │
        ├── Memory Engine     Extracts facts, tracks updates, resolves contradictions,
        │                     auto-forgets expired info
        ├── User Profiles     Static facts + dynamic context built from engine, always fresh
        ├── Hybrid Search     RAG + Memory in one query
        ├── Connectors        Real-time sync from Google Drive, Gmail, Notion, GitHub...
        └── File Processing   PDFs, images, videos, code → searchable chunks

Memory is not RAG. RAG retrieves document chunks — stateless, same results for everyone. Memory extracts and tracks facts about users over time. It understands that "I just moved to SF" supersedes "I live in NYC." Supermemory runs both together by default, so you get knowledge base retrieval and personalized context in every query. Read more about this here - https://supermemory.ai/docs/concepts/memory-vs-rag

Automatic forgetting. Supermemory knows when memories become irrelevant. Temporary facts ("I have an exam tomorrow") expire after the date passes. Contradictions are resolved automatically. Noise never becomes permanent memory.



<p align="center"> <strong>Give your AI a memory. It's about time..</strong> </p>

packages/agent-framework-python/LICENSE

Shown as plain text.

MIT License

Copyright (c) 2025 Supermemory

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
512 files · 500 not served here

Advantages

Limitations

Security

Risk level: Medium risk

This brain runs

Agent instructions that run or fetch something (42)

  • AGENTS.md: `npx supermemory setup --prompt` prints the integration prompt for the current project.
  • AGENTS.md: Plain `npx supermemory setup` launches a separate coding agent, so use `--prompt` when you are already an agent.
  • AGENTS.md: `npx supermemory help --json` lists every CLI command in a machine-readable form.
  • AGENTS.md: npx skills add https://github.com/supermemoryai/skills --skill supermemory
  • AGENTS.md: Set `SUPERMEMORY_API_KEY` (create a key in the [console](https://console.supermemory.ai)), then install SDK version 5 or later:
  • AGENTS.md: **Write:** `POST https://api.supermemory.ai/ns/{namespace}/document` · uses the network
  • AGENTS.md: **Search:** `POST https://api.supermemory.ai/ns/{namespace}/search` · uses the network
  • AGENTS.md: **Profile:** `POST https://api.supermemory.ai/ns/{namespace}/profile` · uses the network
  • AGENTS.md: **SDK calls:** `client.add({ containerTag })`, `client.search.execute`, `client.memories.add`, `client.memories.updateMemory`, `client.profile({ q })`
  • AGENTS.md: Code on v3/v4 moves with `npx supermemory@latest migrate --prompt`, which prints the migration prompt for you to follow ([migration guide](https://supermemory.ai/docs/migration/api-v5)).
  • AGENTS.md: npx supermemory plugin --all
  • AGENTS.md: npx supermemory plugin --only claude
  • AGENTS.md: Plain `npx supermemory plugin` asks which agents to install for.
  • AGENTS.md: `--dry-run` shows what would run without installing anything.
  • AGENTS.md: run `npx supermemory plugin login` later.
  • AGENTS.md: To install a single plugin by hand, or for an agent the CLI doesn't cover (Hermes, OpenClaw, any MCP client):
  • AGENTS.md: | Agent | Install | Guide | | --- | --- | --- | | Claude Code | `/plugin marketplace add supermemoryai/claude-supermemory`, then `/plugin install supermemory` | [docs](https://supermemory.ai/docs/integrations/claude-code) | | Cursor | `/add-plugin cursor-supermemory`, or Supermemory in …[+830 chars]
  • AGENTS.md: `npx supermemory local` runs a local server, at `http://localhost:6767` by default.
  • AGENTS.md: Use `dev:local`, not `bun run dev`: `dev` runs through portless, which binds port 443 and trusts a local CA.
  • AGENTS.md: `dev:local` also needs Python and `uv` (the sdk playground runs `uv run server.py`) and network access (the docs run Mintlify).
  • AGENTS.md: Use `bunx turbo run build` rather than `bun run build`: the root `postbuild` step uploads Sentry sourcemaps.
  • AGENTS.md: The tools steps run when `packages/tools` changes and the sdk-playground steps when `apps/sdk-playground` changes (the tools build runs for either);
  • AGENTS.md: memory-graph and Biome run on every pull request.
  • AGENTS.md: `bun run format-lint` rewrites files across the whole repo with Biome, so prefer the changed-files check above.
  • AGENTS.md: Run the CI checks above for the areas you touched, plus `bun run check-types`.
  • AGENTS.md: CONTRIBUTING.md suggests `bun run format-lint` and `bun run build`;
  • AGENTS.md: use the changed-files Biome check and `bunx turbo run build` above instead.
  • CLAUDE.md: `bun run dev` - Start all applications in development mode
  • CLAUDE.md: `bun run build` - Build all applications
  • CLAUDE.md: `bun run check-types` - Run TypeScript checks across all apps
  • CLAUDE.md: `bun run format-lint` - Format and lint code using Biome
  • CLAUDE.md: `bun run dev` - Start Next.js development server
  • CLAUDE.md: `bun run build` - Build Next.js application
  • CLAUDE.md: `bun run lint` - Run Next.js linting
  • CLAUDE.md: Run `bun run format-lint` to format and lint all code
  • CLAUDE.md: Type checking with `bun run check-types`
  • skills/supermemory/SKILL.md: **Get API Key**: Sign up at [console.supermemory.ai](https://console.supermemory.ai) · uses the network
  • skills/supermemory/SKILL.md: **Install SDK**: Supermemory works with the following SDKs natively:
  • skills/supermemory/SKILL.md: **TypeScript/JavaScript**: `npm install supermemory` ([npm](https://www.npmjs.com/package/supermemory))
  • skills/supermemory/SKILL.md: **Python**: `pip install supermemory` ([PyPI](https://pypi.org/project/supermemory/))
  • skills/supermemory/SKILL.md: **TypeScript agent tools/middleware**: `npm install @supermemory/tools`
  • skills/supermemory/SKILL.md: **Python OpenAI tools/middleware**: `pip install supermemory-openai-sdk`

MCP servers (2)

  • README.md (supermemory): https://mcp.supermemory.ai/mcp · uses the network
  • README.md (supermemory): https://mcp.supermemory.ai/mcp · uses the network

Install scripts (2)

  • README.md: curl -fsSL https://supermemory.ai/install | bash · uses the network
  • README.md: curl -fsSL https://supermemory.ai/install | bash · uses the network
  • Medium risk: runs-instruction-instruction-own-service (AGENTS.md:69)
  • Medium risk: runs-instruction-instruction-own-service (AGENTS.md:70)
  • Medium risk: runs-instruction-instruction-own-service (AGENTS.md:71)
  • Medium risk: runs-install-script-remote-exec (README.md:97)
  • Medium risk: runs-install-script-remote-exec (README.md:319)
  • Medium risk: runs-instruction-instruction-network (skills/supermemory/SKILL.md:123)
  • Low risk: network-instructions (AGENTS.md:36)
  • Low risk: network-instructions (skills/supermemory/SKILL.md:126)

Attribution and licence

Created by
supermemory
Publisher
supermemory (Official supermemory project)
Source
supermemoryai/supermemory · commit 8af3b91
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by supermemory.

Install from source

500 of its files are not served here, so there is no ZIP. supermemoryai/supermemory at 8af3b91