# remember

仅在满足 capture policy、scope 和 secret-redaction 边界后写入持久 memory。

- Canonical: https://docs.xmemo.dev/zh/docs/tools/remember
- Locale: zh-CN
- Content-Locale: zh-CN
- Canonical-Content-Digest: b5d03421cd10a63875746f6339e99b93d92fcef8443db7176726d5aea32edd65
- Edition-Digest: 56891f449a99a81b3099a1c4bac17a8335f78ad57ef1eff4d93e7ee4683d87e7
- Source-Revision: sha256:9a04d6faf83e5b7c52876a378ff80d66a4b9561a8bd8f786716b130083cffebb

## Tool Reference: `remember`

### Purpose

保存已批准的 agent 之后应能检索到的持久信息。这是直接的 durable-write API；事件流在调用它之前应先经过 capture policy。

### Parameters

- `content` (string, required): 持久 memory body。保持事实性、范围明确且不含 secret。
- `path` (string, required): 用于将 memory 关联到 project 或持久 namespace 的逻辑位置。
- `create_project` (boolean, optional, default: false): 仅适用于 Generic public profile：当 path 暗示某个 project 时创建所属 project。ChatGPT 或 Claude plugin profile 不接受此参数。

### Returns

成功文本包含已保存 memory 的 reference/ID、逻辑 path、writer identity、account 和 device label。Public client 应将 reference 视为 opaque identifier。

### Errors

- 401/403：MCP token 缺失或不包含 memory:write。
- Validation failure：content 或 path 为空，提供了 malformed JSON，或某个值违反 storage contract。
- Authorization failure：调用者无权写入请求的 scope、project 或 team。
- Safety rejection：类似 secret 的 content 或保留的 identity metadata 被阻止或清理。

### Examples

#### 保存明确的持久 decision



```typescript
remember({
  content: "Use OAuth for hosted ChatGPT connections.",
  path: "projects/memory-os/decisions"
})
```

### Related Tools

- [recall](/docs/tools/recall): 保存持久 fact 后获取少量相关 memory。
- [recall_context](/docs/tools/recall-context): 在后续 task 前构建有界的 context pack。
- [ledger](/docs/tools/ledger): 使用受治理的 Ledger record，而不是 generic memory。

## 确认写入已落地

不要只相信写入响应；通过带 scope 的 search 重新读取 memory。

```ts
search_memory({
  query: "OAuth for hosted ChatGPT connections",
  limit: 3
})
```

