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

# CLI 与自动化

> 不绑定单一 provider 地创建任务、分派工作并收集结构化结果。

`dure` CLI 与 workspace 使用同一个 app channel。Orchestration command 为
terminal input 增加持续的 task 与 message identity：dispatch、完成结果、
heartbeat、escalation 与 human decision gate。

使用 CLI 前，先在目标 channel 启动一次 Dure 以创建 registry。Dure 内打开的
terminal 会自动继承正确 channel。

```sh theme={"system"}
dure orch task-create \
  --title "Review reconnect diff" \
  --spec "Check behavior, tests, and rollback. Return findings only."

# 用上一个命令输出的 ID 替换 t7。
dure orch dispatch --task t7 --to review-agent --inject

dure orch check --wait \
  --types worker_done,escalation,decision_gate \
  --timeout 900
```

`task-create` 只记录工作，不启动 provider。`dispatch --inject` 还会把任务输入到
已注册的 local agent pane；不加 `--inject` 时只保存 assignment 与 message。

Dure 也提供 loopback、receipt-based spawn API。请求先写入 journal，因此 crash 后
可以按 receipt reconcile，而不是把 timeout 猜成失败。

<Warning>
  Mailbox 只在一个 Dure app channel 内本地运行，不是 hosted queue。SSH agent 尚不
  直接加入；`@all` 也不记录每个接收者的独立 acknowledgement。
</Warning>

更多模式见[多代理编排](/cn/orchestration)。
