Skip to main content
Docs
Open console

Start here

Memory and context for AI products. SDK/API to ship. MCP to build. Prove it with a SaaS copilot in 5 minutes.

Make users feel remembered — add MemoryNode around your existing AI stack: save what matters, recall the right context, inject into your prompt. Your model stack stays the same.

Follow this order:

  1. Playground — prove save → recall → context (~5 min, no API key)
  2. Create API keyApp connection after Playground proof
  3. Two-call integration — wire REST/SDK in production
  4. SDK quickstart — fastest code path
  5. SaaS copilot starter — full in-app UX with Memory used badge
  6. MCP setup — only if building inside Cursor or Claude (not your production backend)

1. Prove recall in Playground

  1. Sign in to the console. Setup creates your workspace automatically.
  2. Open Playground (no API key needed — the console uses your signed-in session).
  3. Save a preference, e.g. User prefers weekly email digests and dark mode on the dashboard.
  4. Ask a different question, e.g. How should the dashboard feel for this user?
  5. Click Build context and confirm Context ready shows prompt-ready text (or use Search recall for ranked hits).
  6. Copy context_text — that is what you inject into your LLM system prompt.

Playground uses default-user by default. That is fine for proof. Create an API key on App connection when you run code below.

Playground proves memory and context — it does not chat with an LLM on your behalf.

2. Ship with SDK/API

After Playground works, run the SDK quickstart:

export MEMORYNODE_API_KEY="mn_live_..."
export MEMORYNODE_USER_ID="user_42"
node examples/sdk-quickstart/index.mjs

TypeScript:

import { MemoryNode } from "@memorynodeai/sdk";

const memory = new MemoryNode(process.env.MEMORYNODE_API_KEY!);
const ownerId = process.env.MEMORYNODE_USER_ID ?? "user_42";

await memory.remember("User prefers weekly email digests and dark mode.", { ownerId });

const { context_text: contextText } = await memory.contextFor(
  "How should the dashboard feel for this user?",
  { ownerId, topK: 8 },
);

// Inject contextText into your existing LLM messages

3. SaaS copilot starter (optional UI)

Open the Next.js SaaS copilot starter: save a preference, ask a different question, watch Memory used on the reply. The starter uses OpenAI for the reply step — Playground does not.

4. MCP for builders (optional)

Use MCP only when prototyping in Cursor or Claude Desktop. MCP is for building, not your production SaaS backend. Same API key, same memories.

The four-step ship flow

StepWhat you doAPI / SDK
1. SaveStore what your app learnedPOST /v1/memories · memory.remember()
2. RecallRanked hits (optional if you use context)POST /v1/search · memory.recall()
3. Build contextPrompt-ready pack + citationsPOST /v1/context · memory.contextFor()
4. InjectMerge into your system/user messageYour OpenAI / Anthropic code — unchanged

Minimum proof: save + search (two API calls). Production prompts: prefer save + context.

Owner id matters

Memories are scoped by owner_id (SDK alias: userId). Pass your SaaS app's logged-in user ID on every write and read. Session 1 and session 2 must use the same value.

What to skip at first

  • Custom ranking tuning or large eval harnesses

Get save + recall (or context) working first. Ship with SDK/API before MCP.

Next reads

  1. Two-call integration
  2. Integration recipes
  3. Demos
  4. Pricing
  5. API usage

Type to search all pages. navigate · Enter open · Esc close