@mnemoai/client
v0.1.2
Published
Mnemo Cloud client — store and recall AI agent memories via API
Maintainers
Readme
@mnemoai/client
Official client for Mnemo Cloud — long-term memory for AI agents.
Install
npm install @mnemoai/clientQuick Start
import { createCloudMnemo } from "@mnemoai/client";
const mnemo = createCloudMnemo({ apiKey: "mn_your_key" });
// Store a memory
const { id } = await mnemo.store({
text: "User is a software engineer who prefers TypeScript",
category: "fact",
importance: 0.9,
});
// Recall memories by semantic search
const memories = await mnemo.recall("what does the user do?", { limit: 5 });
memories.forEach(m => console.log(m.text, m.score));
// Delete a memory
await mnemo.delete(id);
// Check usage
const stats = await mnemo.stats();
console.log(stats.totalEntries, "memories stored");API
createCloudMnemo(config)
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| apiKey | string | Yes | API key from Mnemo Cloud |
| endpoint | string | No | Custom endpoint (default: https://api.m-nemo.ai) |
mnemo.store(entry)
Store a memory. Returns { id: string }.
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| text | string | required | The text to remember |
| category | string | "fact" | fact, preference, decision, entity, other |
| importance | number | 0.7 | Importance score (0.0–1.0) |
| scope | string | "global" | Scope for multi-agent isolation |
mnemo.recall(query, options?)
Recall memories by semantic search. Returns array of { text, score, category, importance, timestamp }.
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| limit | number | 5 | Max results |
| category | string | — | Filter by category |
| scopeFilter | string[] | — | Filter by scopes |
mnemo.delete(id)
Delete a memory by ID. Returns boolean.
mnemo.stats()
Returns { totalEntries, scopeCounts, categoryCounts, plan }.
Requirements
- Node.js 18+ (uses native
fetch) - Mnemo Cloud API key
