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

# `openclaw commitments`

檢查並清除已停用的推斷承諾實驗所留下的記錄。
OpenClaw 不再建立或傳送新的承諾，但會保留維護命令，
讓升級作業能稽核並清理現有的 SQLite 資料列。

未指定子命令時，`openclaw commitments` 會列出待處理的承諾。

## 使用方式

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw commitments [--all] [--agent <id>] [--status <status>] [--json]
openclaw commitments list [--all] [--agent <id>] [--status <status>] [--json]
openclaw commitments dismiss <id...> [--json]
```

## 選項

* `--all`：顯示所有狀態，而不僅顯示待處理的承諾。
* `--agent <id>`：篩選特定代理程式 ID。
* `--status <status>`：依狀態篩選。值：`pending`、`sent`、
  `dismissed`、`snoozed` 或 `expired`。未知值會以錯誤結束。
* `--json`：輸出機器可讀的 JSON。

`dismiss` 會將指定的承諾 ID 標記為 `dismissed`。

## 範例

列出待處理的承諾：

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw commitments
```

列出所有已儲存的承諾：

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw commitments --all
```

篩選特定代理程式：

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw commitments --agent main
```

尋找已暫緩的承諾：

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw commitments --status snoozed
```

清除一或多個承諾：

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw commitments dismiss cm_abc123 cm_def456
```

匯出為 JSON：

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw commitments --all --json
```

## 輸出

文字輸出會列印承諾數量、共用 SQLite 資料庫路徑、任何使用中的篩選條件，
以及每項承諾各一列：

* 承諾 ID
* 狀態
* 種類（`event_check_in`、`deadline_check`、`care_check_in` 或 `open_loop`）
* 最早到期時間
* 範圍（代理程式／頻道／目標）
* 建議的確認文字

JSON 輸出包含數量、使用中的狀態與代理程式篩選條件、
共用 SQLite 資料庫路徑，以及完整的已儲存記錄。

## 相關內容

* [推斷承諾](/zh-TW/concepts/commitments)
* [記憶概覽](/zh-TW/concepts/memory)
* [心跳偵測](/zh-TW/gateway/heartbeat)
* [排程工作](/zh-TW/automation/cron-jobs)
