Common use cases

Copy the example closest to your product, then read INTEGRATION.md.

AI companion / chatbot

Store each user turn (or summarized facts). Retrieve before the model call.

ExampleLocation
SDK (fastest)examples/sdk-quickstart
Support-style botexamples/support-bot-minimal
OpenAI Chatexamples/openai-chat
Vercel AI SDKexamples/vercel-ai-sdk
await memory.remember(userMessage, { ownerId: user.id });
const ctx = await memory.contextFor(latestQuestion, { ownerId: user.id });
// inject ctx.context_text into system prompt

SaaS copilot (per-tenant user)

Namespace by workspace or product-area; scope by ownerId = end-user id.

ExampleLocation
Next.js routeexamples/nextjs-middleware

Creator / audience context

Long-lived preferences and show notes — use memory_type: "preference" when you need structured recall.

ExampleLocation
Node HTTP quickstartexamples/node-quickstart

LangChain

ExampleLocation
Context adapterexamples/langchain-wrapper

Cursor / Claude (MCP)

ExampleLocation
MCP configexamples/cursor-mcp-config.json
MCP docsMCP_SERVER.md

Agent frameworks

Use MCP (recall, memory, context tools) or the SDK from your tool runner — same API key as REST.