Documentation
Get started in 5 minutes.
Two endpoints: ingest and context. Everything else is optional.
Quick Start
bash
npm install @m3mory/sdk# Set your API keyexport M3MORY_API_KEY=m3m_sk_...1. Ingest a conversation
typescript
1import { M3mory } from "@m3mory/sdk";23const m3 = new M3mory({ apiKey: process.env.M3MORY_API_KEY });45await m3.ingest({6 agentId: "my-assistant",7 userId: "user_123",8 messages: [9 { role: "user", content: "I just moved to Bristol" },10 { role: "assistant", content: "Welcome to Bristol!" }11 ]12});2. Recall context
typescript
1const context = await m3.context({2 agentId: "my-assistant",3 userId: "user_123",4 messages: [5 { role: "user", content: "Where do I live?" }6 ],7 tokenBudget: 20008});910// Use context.text in your system prompt11const systemPrompt = `You are a helpful assistant.1213${context.text}`;API Reference
POST
/v1/ingestPOST
/v1/contextPOST
/v1/searchGET
/v1/memoriesGET
/v1/memories/:idDELETE
/v1/memories/:idGET
/v1/statusSDKs & Integrations
@m3mory/sdkTypeScript / JavaScript
Availablem3mory-pythonPython
Coming soon@m3mory/mcp-serverMCP Protocol
Available@m3mory/openclaw-pluginOpenClaw Plugin
Available