Skip to main content

Node.js

Install the official Node.js / TypeScript SDK:
npm install memorose-client
Basic retrieval flow:
import { MemoroseClient } from "memorose-client";

const client = new MemoroseClient("http://127.0.0.1:3000", "your_api_key");
const streamId = "11111111-1111-1111-1111-111111111111";

await client.ingestEvent("user_123", streamId, {
  content: "Dylan prefers concise summaries.",
  org_id: "default",
});

const response = await client.retrieveMemory("user_123", streamId, {
  query: "What does Dylan prefer?",
  limit: 5,
  org_id: "default",
});

console.log(response.results);
Server-side reranker mode, including arbitrator, is configured when the Memorose server starts. SDK requests do not select the reranker model.