> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorose.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js

> 面向当前 Memorose `/v1` 运行时的 Node.js / TypeScript SDK。

# Node.js

安装官方 Node.js / TypeScript SDK：

```bash theme={null}
npm install memorose-client
```

基础检索流程：

```ts theme={null}
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);
```

服务端 reranker 模式，包括 `arbitrator`，在 Memorose 服务启动时配置。SDK 请求不会选择 reranker 模型。
