Skip to content
广告 · 本站推荐广告

openclaw agents

查看和管理所有已配置的 Agent 实例。

命令签名

bash
openclaw agents [子命令] [选项]

子命令

子命令说明
list列出所有已配置的 Agent(默认)

选项

选项类型说明
--status <status>string按状态过滤:runningstoppederror
--format <format>string输出格式:table(默认)、jsonyaml
--jsonboolean等同于 --format json

说明

openclaw agents 显示系统中所有已注册的 Agent,包括其运行状态、上线时间和关联渠道。在多 Agent 环境中,此命令是了解全局视图的入口。

输出格式

默认表格输出:

NAME               STATUS    UPTIME     CHANNELS
default            running   2h30m      whatsapp, telegram
customer-support   running   1h15m      webchat
data-analyst       stopped   —          —

JSON 输出(--json):

json
{
  "agents": [
    {
      "name": "default",
      "status": "running",
      "uptime": "2h30m",
      "channels": ["whatsapp", "telegram"]
    }
  ]
}

示例

bash
# 列出所有 Agent
openclaw agents

# 仅显示运行中的 Agent
openclaw agents list --status running

# 以 JSON 格式输出
openclaw agents --json

# 过滤出错的 Agent
openclaw agents list --status error

多 Agent 管理

在配置文件中定义多个 Agent:

yaml
agents:
  default:
    model: gpt-4
    channels: [whatsapp, telegram]
  customer-support:
    model: gpt-4
    channels: [webchat]

使用 openclaw agent start --name <name> 启动指定 Agent。

另请参阅

基于MIT协议开源 | 内容翻译自 官方文档,同步更新