Skip to main content
Convex apps don’t have built-in memory for AI. Supermemory fixes that. You get a memory layer that stores conversations, builds user profiles, and gives your AI context about who it’s talking to.

What you can do

  • Store user interactions and retrieve them in future sessions
  • Build automatic user profiles from conversations
  • Search memories to give your AI relevant context
  • Keep everything in your Convex database for full visibility

Setup

Install the packages:
For the AI chat example, also install the AI SDK packages:
Set up your environment variable in Convex:
Get your Supermemory API key from console.supermemory.ai.

Basic integration

Create simple helper functions for each Supermemory operation:

Example: AI chat with memory

A chat endpoint using the Supermemory AI SDK middleware. It automatically injects context and saves memories.

Storing memories in Convex tables

Keep a local copy of memories in your Convex database for full visibility:

User profiles

How automatic profiling works

Search

Filtering and search modes

Vercel AI SDK

Memory middleware for Next.js

LangChain

Memory for LangChain apps