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

# 管理记忆库

`memory` 命令组用于管理 AgentKit 记忆库，涵盖列表、详情查看、创建、更新与删除等操作。该命令同时提供 `mem` 别名。

## memory list

列出所有记忆库。

| 标志/参数 | 说明 | 默认值 |
| - | - | - |
| `-r, --region <region>` | 云区域。 | 自动检测 |
| `-p, --project <name>` | 项目名称。 | default |
| `--json` | 输出原始 JSON。 | `false` |

```bash lines theme={null}
agentkit memory list --project demo
```

## memory show

查看记忆库的详情。

| 标志/参数 | 说明 | 默认值 |
| - | - | - |
| `<id>` | 记忆库 id，例如 `m-xxxxxxxx`。必填。 | — |
| `-r, --region <region>` | 云区域。 | 自动检测 |
| `--json` | 输出原始 JSON。 | `false` |

```bash lines theme={null}
agentkit memory show m-12345678
```

## memory create

创建记忆库。

| 标志/参数 | 说明 | 默认值 |
| - | - | - |
| `--name <name>` | 记忆库名称。 | — |
| `--description <text>` | 描述。 | — |
| `-p, --project <name>` | 项目名称。 | default |
| `--provider-type <type>` | 提供方类型（`MEM0` \| `VIKINGDB_MEMORY`）。 | Volcengine 为 `MEM0`，BytePlus 为 `VIKINGDB_MEMORY` |
| `-r, --region <region>` | 云区域。 | 来自当前云厂商或环境变量 |
| `--json <jsonString>` | 合并进请求体的 JSON 对象（用于 `LongTermConfiguration`、`VpcConfig`、`Tags` 等嵌套字段）。 | — |

```bash lines theme={null}
agentkit memory create --name user-mem --provider-type MEM0

agentkit --provider byteplus memory create \
  --name user-mem \
  --provider-type VIKINGDB_MEMORY
```

`--provider-type` 的值会按大小写规范化。BytePlus 不支持创建 `MEM0` 记忆库；显式传入 `--provider-type MEM0`，或在 `--json` 中把 `ProviderType` 覆盖为 `MEM0`，都会在请求发出前失败。

## memory update

更新记忆库。

| 标志/参数 | 说明 | 默认值 |
| - | - | - |
| `<id>` | 记忆库 id，例如 `m-xxxxxxxx`。必填。 | — |
| `--description <text>` | 新的描述。 | — |
| `-r, --region <region>` | 云区域。 | 自动检测 |
| `--json <jsonString>` | 合并进请求体的 JSON 对象（用于 `LongTermConfiguration`、`VpcConfig` 等嵌套字段）。 | — |

```bash lines theme={null}
agentkit memory update m-12345678 --description "更新后的记忆"
```

## memory delete

删除记忆库。

| 标志/参数 | 说明 | 默认值 |
| - | - | - |
| `<id>` | 记忆库 id，例如 `m-xxxxxxxx`。必填。 | — |
| `-r, --region <region>` | 云区域。 | 自动检测 |
| `-y, --yes` | 跳过确认提示。 | `false` |

```bash lines theme={null}
agentkit memory delete m-12345678 --yes
```
