# 选项 · 记忆与会话

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/agents/options/memory/
Language: zh

`memory · id · memories · checkpoints`

对话是否在过程之外进行, 代理人是否保存长期笔记, 以及工作空间是否在每次留言前被拍照 。

Status: memory: false by default · memories on · checkpoints on

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `memory` | boolean | false | 使代理商成为会话: 第一次运行前的标识符, 谈话保持了 。 |
| `id` | string |  | 重新打开会话。 `memory`. |
| `memories` | boolean | true | 长期说明。 `false` 删除 `memory` 及其从提示中得出的索引 。 |
| `checkpoints` | boolean | true | 在您每次信件前抓图工作空间。 需要一个会话 。 |

> **两种不同的事物叫做记忆**
>
> 记忆: 对话的存续是真实的。 记忆是该代理人对用户的长期记录。 它们独立: 代理人可以有笔记, 无需会话, 和会没有笔记。

```javascript
api.agents.create({
  runtime: "local", machine: pc, model,
  memory: true,          // the conversation is kept
  memories: false,       // but it keeps no notes about the user
  checkpoints: true,     // and the workspace is photographed
});
```

## 什么样的会解锁 {#what-unlocks}

- 从任何设备重新打开时使用 [(c) () 获得](/zh/sdk/ref/agents/get).
- [检查站](/zh/sdk/agent/checkpoints) 和 `rewind()`.
- `recall` - 搜索先前的对话。
- 标题,谈话列表。
- 重开的状态 幸存下来

## 东西都藏藏的地方 {#where}

| 保存 | 何处 |
| --- | --- |
| 信息, 以及每个工具电话的名称、 目标、 成功、 成本和持续时间 | 账户中 |
| **工具成果内容** | 仅对设备 |
| 长期附注 | 账户中 |
| 检查点 | 在工作空间中,隐藏文件夹下 |

## 费用 {#cost}

检查点占用工作空间的空间——每个指纹保存内容一次,因此一个不变的工作空间每条信息花费几千字节,最后20条信息被保存。

## 何时关闭检查站 {#turning-off}

在一个非常大的工作场所,或者储存配额比返回更重要的地方。 无法接受的一幅画面永远无法阻挡答案 — — 被跳过,运行仍在继续。

- [会话](/zh/sdk/agent/sessions): 整个机制
- [检查点](/zh/sdk/agent/checkpoints): 回去 回来
- [内内内](/zh/sdk/agent/tools/memory): 笔记工具。

```python
api.agents.create(
    runtime="local", machine=pc, model=model,
    memory=True,             # the conversation is kept
    tools=[t for t in api.tools.all if t != "memory"],   # but it keeps no notes about the user
    checkpoints=True,        # and the workspace is photographed
)
```
