Blog·Learning

How to Use Supermemory with Convex - April 2026

By Shardul Mane·7 min read

Blog cover banner reading "How to Use Supermemory with Convex" with blue and white interlocking puzzle pieces bearing the logos

Most AI features forget everything the moment a session ends. That's not a product limitation. It's an architectural choice you probably made by accident. Convex gives you a reactive, real-time backend that's genuinely one of the best ways to ship full-stack TypeScript apps fast, but it's stateless by design for long-term user memory. This guide is about fixing that in under five minutes by wiring Supermemory into your Convex actions, so your agents actually remember who your users are across sessions.

TLDR:

  • Supermemory adds persistent memory to Convex's reactive backend via actions in under 5 minutes
  • Sub-300ms recall keeps memory retrieval invisible within Convex's real-time sync model
  • 85.4% accuracy on LongMemEval-S means fewer hallucinations when injecting context into LLM calls
  • SOC 2 Type 2 and full Docker self-hosting match Convex's security without introducing audit gaps
  • Supermemory is a memory API that gives AI agents graph-based recall and user profiles across sessions

What It Means to Use Supermemory with Convex

Convex lets you express your entire backend in TypeScript, with libraries that guarantee real-time reflection of changes across frontend code, backend code, and database state. It's reactive, fast, and genuinely fun to build on. But there's a gap: Convex handles state within active sessions. It doesn't preserve what a user cared about three weeks ago, or what your AI agent learned from 50 prior conversations using context memory.

That's where Supermemory comes in.

Wire Supermemory into a Convex stack and you're adding a persistent, graph-based memory layer that sits alongside your reactive database and serverless functions. Your AI features can then recall past interactions, surface user preferences, and work with evolving knowledge without rebuilding context on every single request.

This is about treating memory as a first-class architectural layer, the same way you'd treat your database schema, so your agents actually know who users are over time.

How Supermemory Fits Into a Convex Stack

Convex gives you two core primitives: query and mutation functions. Queries are pure read-only operations. Mutations are transactions that read and write. Neither is designed to persist semantic memory or recall what a user said two months ago.

Actions are where Supermemory slots in. They're Convex's serverless escape hatch for external calls, sitting outside the sync engine. From an action, you call the Supermemory API to store new memories, retrieve context, and update user profiles. Then you pass that context back into your mutations or queries as needed.

The division of responsibility is clean:

  • Convex mutations own transactional writes and reactive state
  • Convex queries handle real-time reads across your frontend
  • Supermemory actions handle memory graph updates, semantic retrieval, and user profile building

Nothing gets replaced. Supermemory fills the layer Convex intentionally leaves open: long-term context, historical understanding, and personalized recall across sessions.

Memory Capabilities That Matter for Convex Builders

Convex's reactive model sets a high bar for perceived performance. The memory layer you add has to keep up.

Sub-300ms Latency for Reactive Workflows

Convex uses WebSockets to maintain persistent connections, meaning UI updates feel instantaneous. Any memory retrieval that adds noticeable lag breaks that contract. Supermemory's recall time sits under 300ms, so when a Convex action fetches user context before generating an LLM response, the round trip stays invisible to users.

Memory Graph for Multi-Session User Understanding

Reactive queries don't know what happened last Tuesday. Supermemory's memory graph tracks relationships between memories across sessions, merges contradictions, and infers intent from past behavior. For conversational AI or collaborative tools built on Convex, agents carry genuine user understanding from one session to the next without re-scanning your transactional data.

User Profiles as Default Context

Every Convex action that calls an LLM needs context. Instead of passing historical data through every function manually, Supermemory user profiles inject static preferences and recent episodic memory automatically. Fewer tokens, better responses, and no boilerplate to maintain.

Performance Benchmarks in a Convex Context

Numbers matter when you're deciding whether to add any new layer to a production stack.

On the LongMemEval-S benchmark, Supermemory hits 85.4% overall accuracy, 92.3% on single-session user recall, and 89.7% on knowledge updates. For Convex apps where actions feed LLM calls, those figures mean fewer hallucinations and more accurate context injection per request.

Precision at retrieval rank one matters even more at scale. Supermemory hits 59.7% P@1 on LoCoMo versus 34.4% for competing providers, with 83.5% Recall@10 compared to 69.3%. When each Convex action may trigger multiple memory lookups, getting the first result right directly cuts unnecessary LLM calls and lowers token spend.

Then there's latency. Convex V8 isolates spin up in under 5ms. Supermemory recall completes in under 300ms. Zep clocks in at 4 seconds. Mem0 runs 7 to 8 seconds. For a reactive Convex app, that gap is the difference between a response that feels alive and one that feels broken.

Enterprise Readiness for Teams Shipping on Convex

Teams shipping on Convex already benefit from infrastructure that encrypts and replicates durably. Any dependency added to that stack gets held to the same bar. Supermemory clears it: SOC 2 Type 2, HIPAA, GDPR, with all data encrypted in transit and at rest. No new audit gaps introduced.

Convex supports self-hosting through its open-source backend. Supermemory matches that with full Docker-based self-hosting, so both layers can live within the same deployment boundary. For teams running Convex in a VPC, that means no external API calls leaving your network for memory operations.

For teams with existing vector infrastructure, Supermemory's pluggable vector store backends let you bring Pinecone, Weaviate, or Qdrant without abandoning prior tooling. You get the memory graph on top of what you already own.

Pricing and Scale Considerations for Convex Products

Supermemory uses usage-based billing. Each plan includes a monthly credit balance, which is consumed as you ingest content, retrieve context, and run other operations. Usage beyond the included balance is charged at the published rates.

Plan Monthly price Included monthly credits
Free $0 $5
Pro $19 $20
Max $100 $130
Scale $399 $600
Enterprise Custom Custom

Ingestion is metered in SM tokens: unique content actually ingested. Repeated or unchanged content is not billed again. Ingestion rates differ between Memory and SuperRAG, and between plain text and rich content.

See the current plans and rate card for prices, included credits, and feature availability.

There's a cost angle worth noting too. Convex actions that call LLMs frequently can rack up token spend fast. Supermemory's retrieval passes only relevant context per request instead of re-injecting full conversation history each time. For teams where reducing LLM costs is a real concern, that compounds quickly at scale.

Getting Started: Supermemory + Convex

Convex developers work entirely in TypeScript, so the Supermemory TypeScript SDK is the right starting point. Install it with:

npm i supermemory

Grab your API key from console.supermemory.ai and initialize the client. From there, call Supermemory inside Convex actions, since that's where external API calls belong. Store a memory, retrieve context in a follow-up action, and pass it into your mutations or queries.

Basic setup takes about five minutes: authenticate, store a memory, retrieve it. That's the loop. Once memory-augmented context gets written to Convex via a mutation, every subscribed query updates automatically across connected clients. Supermemory handles what happened before. Convex propagates what's happening now.

For deeper work involving user profiles, memory graph traversal, or connector configuration, the API reference and cookbook cover production-ready patterns. If you're wiring up agents, this guide on building AI agents with memory is worth reading before you ship.

FAQ

Can I use Supermemory with Convex without breaking reactive performance?

Yes. Supermemory recall completes in under 300ms, so memory lookups from Convex actions stay invisible to users and won't disrupt your WebSocket-based reactive workflows.

Supermemory vs storing conversation history in Convex tables?

Supermemory builds a memory graph that tracks relationships across sessions, handles contradictions, and infers user intent over time. Convex tables give you transactional storage for active state, but they won't surface what a user said three weeks ago or merge knowledge updates automatically.

How do I actually wire Supermemory into a Convex stack?

Call the Supermemory API from inside Convex actions (not queries or mutations), since actions are designed for external calls. Store memories or retrieve context in the action, then pass that context back into your mutations or queries as needed.

What's the best way to reduce LLM token costs in Convex actions?

Supermemory retrieves only relevant context per request instead of re-injecting full conversation history every time, which cuts token spend fast when your Convex actions call LLMs frequently.

Does Supermemory support self-hosting like Convex?

Yes. Supermemory offers full Docker-based self-hosting, so both layers can run within the same deployment boundary, meaning no external API calls leaving your VPC for memory operations.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. supermemory will make your Hermes-agent crazy powerfulToday, we are launching supermemory support to your Hermes agent TLDR: you can use supermemory now in your Hermes agent, it totally free to get started - https://supermemory.ai/docs/integrations/hermes In case you missed it: Hermes Agent is a self-improving AI agent from Nous Research.
  7. 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.
  8. Infinitely running stateful coding agentsWe 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.
  9. Why everyone is complaining about OpenClaw's memory (it sucks) - and why supermemory fixes it.TLDR: Today, we are releasing a new version of our openclaw plugin - https://github.com/supermemoryai/openclaw-supermemory. This post is going to be a bit technical, so bear with me (or bookmark for later!) In this post, I will talk about what we do about OpenClaw memory, and how we fix it.
  10. We added supermemory to Claude Code. It's INSANELY powerful now...Today, we are launching the Supermemory plugin for Claude Code! TLDR: You can use supermemory in claude code now. - https://github.com/supermemoryai/claude-supermemory Claude code has genuinely changed how I work. But there's this one thing that drives me crazy...
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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 the Infinite Chat API, initially, we only supported the OpenAI format. This was fine, until a lot of our customers started asking, asking for more.
  20. 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.
  21. 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.