Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
openclaw agent 可在命令行中运行单次智能体轮次,而无需
入站聊天消息。可将其用于脚本工作流、测试和
程序化投递。
快速开始
标志
| 标志 | 描述 |
|---|---|
--message \<text\> | 要发送的消息(必需) |
--to \<dest\> | 从目标(电话、chat id)派生会话键 |
--agent \<id\> | 指定一个已配置的智能体(使用其 main 会话) |
--session-id \<id\> | 按 id 复用一个现有会话 |
--local | 强制使用本地嵌入式运行时(跳过 Gateway 网关) |
--deliver | 将回复发送到聊天渠道 |
--channel \<name\> | 投递渠道(whatsapp、telegram、discord、slack 等) |
--reply-to \<target\> | 投递目标覆盖 |
--reply-channel \<name\> | 投递渠道覆盖 |
--reply-account \<id\> | 投递账户 id 覆盖 |
--thinking \<level\> | 为所选模型 profile 设置 thinking 级别 |
--verbose \<on|full|off\> | 设置 verbose 级别 |
--timeout \<seconds\> | 覆盖智能体超时时间 |
--json | 输出结构化 JSON |
行为
- 默认情况下,CLI 会通过 Gateway 网关运行。添加
--local可强制在当前机器上使用嵌入式运行时。 - 如果 Gateway 网关不可达,CLI 会回退到本地嵌入式运行。
- 会话选择:
--to会派生会话键(群组/频道目标保持隔离;私聊会折叠到main)。 - Thinking 和 verbose 标志会持久化到会话存储中。
- 输出:默认是纯文本,或使用
--json获取结构化负载 + 元数据。
示例
相关内容
- 智能体 CLI 参考
- 子智能体 — 后台子智能体生成
- 会话 — 会话键的工作方式