Blog·Learning

Self-hosted memory for AI agents: options and trade-offs

By Shardul Mane·9 min read

A blurred photo of a blue sky over dark green hills with a streak of warm light, with the supermemory logo and the headline Self-hosted or cloud memory infrastructure?

You can self-host memory for AI agents three ways: build it on your own database, run a memory framework on your own servers, or run a vendor's memory server inside your network. supermemory's is supermemory Local, a single binary you install with npx supermemory local (docs). It isn't open source, and for organizations, self-hosted deployments come with the Scale and Enterprise plans (pricing).

Whichever you pick, self-hosting doesn't make a system offline, compliant or cheaper by itself. Compare the same behavior on both sides (what gets saved, how well it's found again, corrections, deletion and recovery), then price the work it takes. Product details below were checked against our docs and changelog on October 16, 2026.

Should you use a managed memory service or self-host?

Use a managed service when it removes operating work you don't want and meets your requirements. Self-host when control is worth more than that work and your team can run the deployment.

Self-host when Use a managed service when
Data has to stay in your network, or a contract says where it lives A vendor's agreements and controls meet your requirements
You need to choose the models and embeddings You'd rather not run upgrades, backups and capacity planning
You're prototyping locally or working offline You need connectors, team access and scale from the start

What are the ways to self-host agent memory?

Option What you run What you still build Good fit
Build it yourself A database with vector search, such as Postgres with pgvector Fact extraction, updates and contradictions, per-user scoping, deletion and evaluation Small, well-understood memory needs
A memory framework you host The framework's server or library on your infrastructure. Letta and Hindsight both offer self-hosted setups (AI SDK memory guide), and Mem0 has an open-source version Whatever the framework leaves out, plus operating it Teams that want to read and change the code
A vendor's server in your network supermemory Local, or a dedicated Enterprise deployment Integration, monitoring and upgrades The same API in development and production, without building the memory engine

Storing vectors is the easy part. Running a vector database alone leaves the memory policy to you: what to keep, how a new fact replaces an old one, and what a deletion has to reach. Three ways to build LLMs with long-term memory compares the approaches, and should you build your own AI memory system walks through the build-or-buy decision.

How do you self-host supermemory?

Install and start it with one command. It downloads the server the first time, then runs it:

npx supermemory local

If you'd rather install with curl -fsSL https://supermemory.ai/install | bash, start the server afterwards with supermemory-server.

The installer picks the binary for your machine (macOS on Apple Silicon or Intel, Linux on x64 or arm64) and, when run interactively, asks for an LLM key. First boot sets up the embedded graph engine and local embeddings, prints an API key, and serves the API at http://localhost:6767 (quickstart). Point any supermemory SDK at it with the printed key:

import { Supermemory } from "supermemory"

const client = new Supermemory({
  apiKey: "sm_...", // printed on first boot
  baseUrl: "http://localhost:6767",
})

It's the same API as the hosted platform. The v5 SDKs need server v0.0.9 or later, so run supermemory-server upgrade on an older install first. The coding plugins work with it too: the Claude Code, Codex and OpenCode plugins target it when you set SUPERMEMORY_API_URL to http://localhost:6767, and Muse Code takes baseUrl in .muse/supermemory.json (docs). The Claude Code memory guide covers the Claude Code plugin.

With Docker. The prebuilt image is docker.io/supermemory/supermemory. Download the Compose file from the server v0.0.9 release, put your LLM key in a .env file, and run docker compose up -d. The Compose file binds port 6767 to 127.0.0.1 only, and you read the API key from the container instead of the logs. On Windows, the native build stays at 0.0.8, so use Docker with Linux containers (Docker docs).

Models. Memory extraction runs on the model you point it at: OpenAI, Anthropic, Gemini, Groq, or any OpenAI-compatible endpoint, including local ones such as Ollama, LM Studio, vLLM and llama.cpp.

Embeddings. By default the server embeds locally with Xenova/bge-base-en-v1.5 (768 dimensions; see how it compares with other open-source embedding models), so nothing leaves the machine to be embedded. Since July you can choose OpenAI, Gemini or any OpenAI-compatible endpoint instead, at first boot or with the SUPERMEMORY_EMBEDDING_* variables, and the server locks the choice so stored vectors stay consistent (changelog, embeddings docs). The default model is English-only. For other languages, pick a multilingual model such as Xenova/bge-m3 before a large backfill, because switching later means a fresh data directory or re-ingesting everything.

What still leaves your network?

A localhost endpoint is one boundary, not the location of every downstream call. With supermemory Local, check each of these (docs):

  • The extraction model. A hosted LLM receives the text it processes. A local model keeps it in.
  • Embeddings. Local by default. A remote provider receives the text it embeds, and the first run downloads the local model.
  • Webpages. Ingesting a URL sends it to Firecrawl and needs FIRECRAWL_API_KEY. Use local text inputs for offline work.
  • Files. PDFs need GEMINI_API_KEY, and images use Gemini or Vertex AI.
  • Telemetry. It's on by default. Set SUPERMEMORY_DISABLE_TELEMETRY=1 to turn it off, and SUPERMEMORY_NO_UPDATE_CHECK=1 if the server mustn't check for releases.

Logs, backups and connector calls are more paths to inspect, whatever you run. Make an inventory of what each component receives, where it runs and who can access it. For an offline requirement, block or watch network egress in a test with synthetic content: configuration names alone aren't evidence that the whole workflow stays local.

Compliance doesn't follow from the hosting label

HHS guidance permits HIPAA-covered use of cloud services when the required business associate agreement and other safeguards are in place. HIPAA isn't a blanket ban on cloud processing or shared infrastructure.

The European Commission's guidance on international transfers describes the mechanisms for moving personal data outside the European Economic Area. GDPR shouldn't be reduced to a rule that all personal data must stay on an EU server.

Evaluate the actual data flows, processing terms, access controls, retention and agreements for the deployment you intend. A "HIPAA certified" or "GDPR certified" label isn't proof that every requirement is met, and self-hosting leaves the same questions for you to answer.

What does self-hosting cost?

For supermemory, Local is free within its lite license limit and is meant for individual developers (Local vs Enterprise). Self-hosted deployments for organizations come with the Scale plan, and Enterprise adds air-gapped deployments (pricing).

For your own comparison, estimate cost from query complexity, record size, concurrency and model usage. User count alone is a weak proxy. An illustrative comparison might use:

Monthly component Managed option Self-hosted option
Service or infrastructure $1,500 $800
Engineering operations 10 hours × $100 = $1,000 30 hours × $100 = $3,000
Total before other differences $2,500 $3,800

These are made-up planning inputs, not market averages or vendor prices. With them, self-hosting costs $1,300 more a month before setup, migrations, model calls and incidents. With an existing platform team and less extra operations work, the result could reverse. Self-hosted costs aren't flat either: capacity, storage, backups and operations grow with load. The hidden cost of building LLM memory in-house goes further into the engineering time.

Local vs Enterprise: what's the difference?

Both run the same memory engine and speak the same API, so code moves between them by changing the base URL and key. Data doesn't move with it (docs).

supermemory Local supermemory Enterprise
Built for Individual developers, prototypes, privacy-sensitive side projects Organizations
Models Bring your own key for any provider, including fully offline supermemory's own models, tuned for long-horizon memory
Access One auto-generated API key Members, roles and scoped API keys
Connectors None Google Drive, Notion, Gmail and OneDrive, with background sync
Scale One machine, one process Managed infrastructure, or dedicated deployments for compliance
Support Community, on GitHub Dedicated support, onboarding and SLAs

The server binary isn't open source. It's built from a separate, non-public codebase, while the SDKs and other components in the public repository are open source.

Who operates what

List upgrades, capacity planning, credential rotation, backup restores, index migrations and retrieval-quality checks, and write down for each one whether the software, a vendor or your team handles it.

  • Upgrades. Back up the whole data directory before replacing a server version, and don't point an older version at a store a newer one has migrated. The Docker docs walk through the backup.
  • Embedding changes. A different model or dimension means re-embedding. That doesn't have to mean downtime if you build a parallel store and cut reads over, but test the migration and the rollback with the actual software.
  • Concurrent writes. Test simultaneous corrections, late events and retries. Last write wins may be right for one field and wrong for another, so write the policy down.

Choose with a recovery-sized pilot

Test saving, retrieval and correction, then restart the service, restore a backup and replay pending work. Check that deleted or revoked material doesn't come back through a stale copy, and measure response time and quality under realistic concurrent load. Then compare the result with a managed setup run against the same data. supermemory's hosted platform and Local take the same calls, which makes that comparison cheap to run (docs).

Common questions

Is supermemory Local open source?

No. The self-hosted server is built from a separate, non-public codebase. The SDKs and other components in the public repository are open source.

Does self-hosting mean data never leaves your infrastructure?

No. Model calls, embedding providers, webpage fetching, telemetry, logs and backups can all send data out. Check every component and its configuration.

Can supermemory run fully offline?

Text memory processing can stay on your machine with a local model and the default local embeddings, after the embedding model's first download. Webpage ingestion needs Firecrawl, so use local text inputs, and turn off telemetry and update checks.

Does HIPAA prohibit cloud memory services?

No. HHS permits cloud use when the required agreements and other HIPAA obligations are met.

Is there a fixed traffic level where self-hosting gets cheaper?

No. Compare service charges, capacity and operating effort for your actual workload. Existing infrastructure and maintenance effort can change which option costs less.

  1. How AI memory actually works. A beginner's guideHow AI apps remember things between chats, why a bigger context window doesn't solve it, and the parts every memory system shares.
  2. We're open sourcing the company brain. Here's how we designed the multiplayer harnessCompany Brain is now open source. A walkthrough of the multiplayer harness behind its Slack experience, from proactivity and memory boundaries to approvals and recovery.
  3. Jev changes a lot in memory & context engineering. Here's exactly how.We tested Jev across reranking, chunking, observation, and harness decisions. Here is where fast decision models help memory systems, where they cost more, and where they still fall short.
  4. I reverse-engineered Instinct's memory. Here's exactly how it worksInstinct keeps its memory as git-tracked markdown files, found with grep rather than vectors. Here is the whole system as far as black-box probing can reconstruct it, and how to rebuild it on supermemory in about 60 lines.
  5. An update to supermemoryWe've discontinued the supermemory company brain and Nova. Everyone who was charged has been refunded, our MCP and plugins continue to run, and we're going all in on the memory engine.
  6. Scaling Conversations: How Adapta Grew Usage Without Losing ContextAdapta added Supermemory as a persistent memory layer so every conversation keeps its context — letting the team scale usage without losing the thread.
  7. How Chatarmin Ditched RAG and Went Memory-Only with SupermemoryChatarmin replaced a heavy RAG pipeline with Supermemory's memory layer — cutting average AI response time from 40s to 12s and token usage by 40–50%.
  8. SMFS: making agentic retrieval 55% cheaper AND more accurateWe launched SMFS.ai (Supermemory Filesystem) a few weeks ago, with a simple bet: We can redesign the filesystem specifically for agents, with special files, structures, and commands that it can use for it's tasks. Today, SMFS is used by hundreds of companies to power their agents.
  9. Introducing Dynamic Dreaming: supermemory now connects the dots, for you.Dreaming is magical. TLDR: We're launching Dynamic Dreaming in supermemory today, which automatically works if you're using supermemory in any way - API, OpenClaw, Hermes agent, etc.
  10. Dear reader, we just made supermemory insanely cheap... the Context CloudWhen I first started building supermemory, I had one goal: To build the best memory system for AI. I would talk to customers, and find out that memory was not the only thing they needed - They were all setting up 7-8 different vendors at the same time.
  11. Introducing @supermemory/tools v2.0.0Today we're releasing v2.0.0. This release unifies the API across all agents sdk integrations from AI SDK to Mastra, makes conversation identity a first-class concept, and ships with memory saving on by default.
  12. Solving the Precision-Recall Tradeoff: Search Result AggregationWhen you're building memory for AI, search is your foundational layer. The way search generally works is straightforward: the user defines a query, and then sets a limit (top-K) on how many search results they want returned. Usually, this is set to 10 or 20.
  13. OpenClaw Memory Problems: Why It Forgets and How to Fix It (2026)OpenClaw remembers by writing Markdown files in its workspace, so it forgets anything the agent didn't save. Why that breaks down, how the supermemory plugin recalls and saves on every turn instead, and how to install it, free on every plan.
  14. Stateful Coding Agents with Memory: Build Long-Running Agents (2026)We built a plugin for Claude Code and OpenCode that gives your coding agent persistent memory. It remembers your preferences, learns your codebase, and never loses context mid-conversation. The result is an agent you can run for months without starting over.
  15. Clawd / Molt bot's memory SUCKS. We gave it supermemory.I'm the founder of supermemory. Clawd/Molt bot is blowing up right now, with many, many use cases. I set it up, too, and have been using it through telegram. TLDR: just go to https://supermemory.ai/docs/integrations/clawdbot to set up supermemory for your clawd bot.
  16. Catch up with our UNFORGETTABLE Launch WeekOver the last year, one belief has guided almost everything we’ve built at Supermemory AI becomes meaningfully useful only when it remembers. Memory shouldn’t be something developers rebuild from scratch. It shouldn’t be fragile, expensive, or trapped inside a single tool.
  17. Empowering the Next Generation of Founders: Supermemory Startup ProgramIf there’s one thing we’ve learned while building Supermemory, it’s that most startups don’t fail because they didn't build features; they fail when infrastructure slows them down, or they built too slow.
  18. Building code-chunk: AST Aware Code ChunkingAt Supermemory, we're building context engineering infrastructure for AI. A huge part of that is dealing with code: ingesting repos, understanding structure, and making it searchable. The problem is that most code chunking solutions are terrible. We built code-chunk to fix this.
  19. Supermemory raises $3 million with the best memory engine for LLMsToday, I am excited to announce our first funding round to accelerate our mission of building an interoperable, scalable and reliable memory for LLMs and agents. Memory is one of the hardest challenges in AI right now.
  20. Mem0 vs Supermemory: Why Scira SwitchedScira AI moved its production memory layer from Mem0 to Supermemory. This is what failed, what improved, and how the team evaluated the two systems.
  21. Never Record Again: How Montra Uses Supermemory to Rethink Video CreationCampbell Baron, the founder of Montra, has been making videos since he was twelve. By thirteen, he was already doing brand work. Today, he’s betting on a very different future for creators: a world where recording is the exception, and most videos are generated from scratch.
  22. Unified Memory That Works Where You Work: Your Second Brain With SupermemoryHi everyone, I’m Dhravya, the founder of Supermemory. I want to start with a little story behind why this product means so much to me. You can also skip straight to what it is and how it works below.
  23. Supermemory just got faster on PlanetScaleWhat is Supermemory? Supermemory completes the missing part of the LLM puzzle: memory. Just as memory is crucial for human intelligence, it's essential for truly intelligent AI systems.
  24. Faster, smarter, reliable infinite chat: Supermemory IS context engineering.People are obsessed with prompts and prompt engineering. Sure, what you say is important, but what the model knows when you say it is the difference between a stateless text generator and an intelligent AI system. In short, context is the most crucial component.
  25. We solved AI API interoperabilityOne API to rule them all, One spec to find them, One library to bring them all and in the TypeScript, bind them. When we were building the Infinite Chat API, initially, we only supported the OpenAI format. This was fine, until a lot of our customers started asking for more.
  26. The Wow Factor of Memory - How Flow Used Supermemory To Build Smarter, Stickier ProductsOverview: Flow is a note-taking app built around a bold vision: to create a more personal, context-aware writing experience powered by AI. At the heart of this mission is memory.
  27. The UX and technicalities of awesome MCPsLast month, we launched the Supermemory MCP, mostly to test our own infrastructure and get some initial traction. It blew up. To my absolute surprise, the initial launch itself got half a million impressions (!!!). Then, we launched and got #2 on ProductHunt too.
  28. Architecting a memory engine inspired by the human brainLanguage is at the heart of intelligence, but what truly powers meaningful interaction is memory — the ability to accumulate, recall, and contextualize information over time. Large Language Models (LLMs) have mastered language, but memory remains their Achilles’ heel.
YOUR PRIVACY

Change or withdraw any time via Cookie settings in the footer. Read our cookie notice.