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 key
export M3MORY_API_KEY=m3m_sk_...

1. Ingest a conversation

typescript
1import { M3mory } from "@m3mory/sdk";
2
3const m3 = new M3mory({ apiKey: process.env.M3MORY_API_KEY });
4
5await 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: 2000
8});
9
10// Use context.text in your system prompt
11const systemPrompt = 'You are a helpful assistant.
12
13' + context.text;

Reference

API Reference

POST/v1/ingestIngest messages, extract memories and entities
POST/v1/contextGet relevant context for a conversation
POST/v1/searchSearch memories with filters
GET/v1/memoriesList memories with pagination
GET/v1/memories/:idGet a specific memory
DELETE/v1/memories/:idDelete a specific memory
GET/v1/statusAccount status and usage

Client paths

SDKs & Integrations

@m3mory/sdkComing 2027

TypeScript / JavaScript

m3mory-pythonComing soon

Python

@m3mory/mcp-serverAvailable by launch

MCP Protocol

@m3mory/m3moryclaw-pluginAvailable

OpenClaw Plugin