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.
| Example | Location |
|---|---|
| SDK (fastest) | examples/sdk-quickstart |
| Support-style bot | examples/support-bot-minimal |
| OpenAI Chat | examples/openai-chat |
| Vercel AI SDK | examples/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.
| Example | Location |
|---|---|
| Next.js route | examples/nextjs-middleware |
Creator / audience context
Long-lived preferences and show notes — use memory_type: "preference" when you need structured recall.
| Example | Location |
|---|---|
| Node HTTP quickstart | examples/node-quickstart |
LangChain
| Example | Location |
|---|---|
| Context adapter | examples/langchain-wrapper |
Cursor / Claude (MCP)
| Example | Location |
|---|---|
| MCP config | examples/cursor-mcp-config.json |
| MCP docs | MCP_SERVER.md |
Agent frameworks
Use MCP (recall, memory, context tools) or the SDK from your tool runner — same API key as REST.