- Ingest a conversation (how personal memory actually arrives)
- Ingest a document (how knowledge for RAG arrives)
- Retrieve three ways — document search (RAG), memory graph traversal, and user profile
- Drop it into a chat harness that remembers across restarts
containerTag for everything. One engine, three ways out.
Get an API key
Grab a key from the developer console — API Keys → Create API Key. console.supermemory.ai is where keys and usage live. app.supermemory.ai is the consumer product on the same engine — not where you mint API keys.1. Ingest a conversation
Real apps do not push four isolated one-liners as separate “memories.” They send conversation turns — often the full session — under a stablecustomId so the pipeline can extract facts and link entities.
We’ll use one user (user_4f8a) and one chat session. The turns never say “Sarah is my VP of Product” — that connection is what the graph should resolve later.
add returns immediately with status: "queued". Processing is still async — wait until done before searching.
dreaming: "instant" — By default, dreaming is "dynamic": Supermemory may batch related documents so memories form from coherent units, which can lag after status: "done". For this quickstart (and any path where you need memories/profiles right away), pass dreaming: "instant" so the document is processed on its own as soon as it finishes indexing. That bills one extra operation per document. See Processing Modes.2. Ingest a document
Now add knowledge the agent should ground on — a short internal note the conversation never fully spelled out. This is the SuperRAG / document path.3. Wait until both are done
Poll document status. With dreaming: "instant", once status is done the document is indexed and memories for that document should be available for search and profiles (queued → extracting → … → done).
Note that the preferred way is to have dreaming: dynamic. supermemory charges one extra operation for instant dreaming. Instant is good for one off tests, setup, debugging and benchmarking.
dreaming (default "dynamic"), document RAG can work after done while memory extraction may still be batching — use "instant" when the next step is memory search or profiles.
4. Three ways to get context back
A. Document search (RAG)
Chunk-level retrieval over raw knowledge — use when you need what the docs say.searchMode to "hybrid" to get extracted memories and document chunks together:
B. Memory graph traversal
Search extracted memories with related edges. This is the entity-chain moment: gift → VP of Product → Sarah → Tokyo offsite.C. User profile
Profiles are the always-on summary (static + recent dynamic) of an entity (or acontainerTag) - what you inject every turn without re-searching the world.
There is a lot more to profiles - with Buckets, for example, you can make supermemory learn and categorize incoming information for learning specific things.
Same
containerTag → same context pool. See Memory vs RAG.
5. Put it in a harness
There is no single required harness. The pattern is the same wherever you run the model: read context (profile / search / docs), generate, write the turn back under a stablecustomId so the session stays one document.
Here are two example shapes — pick whatever matches your stack.
Example: explicit profile + search + add
Example: Vercel AI SDK
Same pattern, wrapped:withSupermemory injects context and can save the conversation for you. Details: AI SDK integration.
Kill it, restart it
Ctrl+C the process, start again with the samecontainerTag (and optional same customId for the live session). Ask:
Mental model
Where next
Add context
Conversations, files, URLs, customId updates, and status.
Search
Hybrid vs memories, filters, thresholds, rerank.
Graph memory
How relations and entity chains are produced.
User profiles
Static vs dynamic, and when to inject a profile every turn.
AI SDK
withSupermemory modes, customId, addMemory.
Container tags
Isolation for multi-tenant products.