openclaw多agent测试

一 安装机器人

安装飞书机器人,参考官方文档:https://www.volcengine.com/docs/6396/2189942?lang=zh#DU0OsR2G

这里测试三个机器人,main,coder,cook, (主机器人,写代码的机器人,美食的机器人)

二 openclaw添加agent

终端输入openclaw agents add, 然后选择模型,选择channel,这里选择上面新建的飞书机器人,填入appId,appSecret。

终端操作完成后观察配置文件:~/.openclaw/openclaw.json,有一些需入手动操作。

2.1 agents list

主要看agents里面的list,智能体都在这里

其中subagents里面是可以交互的智能体,需要手动输入

复制代码
    "list": [
      {
        "id": "main",
        "subagents": {
          "allowAgents": ["main","coder", "cook"]
        }
      },
      {
        "id": "coder",
        "name": "coder",
        "workspace": "/Users/yubin/Documents/openclaw_proj/main_coder",
        "agentDir": "/Users/yubin/.openclaw/agents/coder/agent",
        "model": "minimax-portal/MiniMax-M2.7",
        "subagents": {
          "allowAgents": ["main","coder", "cook"]
        }
      },
      {
        "id": "cook",
        "name": "cook",
        "workspace": "/Users/yubin/Documents/openclaw_proj/main_cook",
        "agentDir": "/Users/yubin/.openclaw/agents/cook/agent",
        "model": "minimax-portal/MiniMax-M2.7",
        "subagents": {
          "allowAgents": ["main","coder", "cook"]
        }
      }
    ]

2.2 飞书配置

有一个默认的飞书配置,对于其它的智能体则需要写入到accounts里面(我这里主agent机器人没响应,就加了一个空的r_main然后主机器人就能回复了,不清楚原因。)

填入自己的appId,appSecret

复制代码
  "channels": {
    "feishu": {
      "enabled": true,
      "appId": "---",
      "appSecret": "---",
      "domain": "feishu",
      "groupPolicy": "open",
      "connectionMode": "websocket",
      "webhookPath": "/feishu/events",
      "dmPolicy": "pairing",
      "reactionNotifications": "own",
      "typingIndicator": true,
      "resolveSenderNames": true,
      "accounts": {
        "r_main" : {
        },
        "r_coder": {
          "appId": "---",
          "appSecret":"---"
        },
        "r_cook": {
          "appId": "---",
          "appSecret":"---"
        }
      }
    }
  }

2.3 bindings设置

主要就是agentId和accountId要对应

复制代码
  "bindings": [
    {
      "type": "route",
      "agentId": "main",
      "match": {
        "channel": "feishu",
        "accountId": "default"
      }
    },
    {
      "type": "route",
      "agentId": "coder",
      "match": {
        "channel": "feishu",
        "accountId": "r_coder"
      }
    },
    {
      "type": "route",
      "agentId": "cook",
      "match": {
        "channel": "feishu",
        "accountId": "r_cook"
      }
    }
  ]

2.4 机器人示例

如下图,左展示了三个机器人,右展示一个机器人的对话

三 测试智能体

例子1 说歇后语

手机端测试,主机器人使唤另外两个机器人说歇后语

例子2 部署美食网页

例子2网页效果示例

在网页中,切换到相应的智能体,可以查看主agent对子agent下发任务的消息

相关推荐
zhangfeng113331 分钟前
openclaw skills 小龙虾技能 通讯仿真 matlab skill Simulink Agentic Toolkit,通过kimi找到,mcp通讯
开发语言·matlab·openclaw·通讯仿真
无心水7 小时前
【Hermes:安全、权限与生产环境】38、Hermes Agent 安全四层纵深:最小权限原则从理论到落地的完全指南
人工智能·安全·mcp协议·openclaw·养龙虾·hermes·honcho
无心水13 小时前
【Hermes:安全、权限与生产环境】39、智能体也会犯错?Hermes 纠错、回滚与遗忘机制全指南 —— 让 AI 的错误像 Git 一样可逆可控
人工智能·git·安全·mcp协议·openclaw·hermes·honcho
AI自动化工坊14 小时前
Hermes Agent 日处理 224B tokens:自改进循环与 Kanban 任务板架构深度解析
架构·ai agent·openclaw·hermes agent
qq_gpp16 小时前
OpenClaw 的【skill】从入门到精通
skill·openclaw
AC赳赳老秦2 天前
全链路自动化巡检:用 OpenClaw 实现服务器 - 应用 - 数据库全链路巡检,自动生成报告与整改建议
服务器·数据库·人工智能·深度学习·自动化·deepseek·openclaw
yuezhilangniao2 天前
中国区- OpenClaw + 飞书 + DeepSeek (千问备用) 部署全流程 (含踩坑实录)-中国区命令行篇
飞书·openclaw
a752066283 天前
OpenClaw 连接阿里云百炼完整图文实操教程
人工智能·阿里云·云计算·ai办公·openclaw·小龙虾·小龙虾一键部署
一个处女座的程序猿3 天前
MultiAgent之OpenClaw:QuantClaw的简介、安装和使用方法、案例应用之详细攻略
llm·openclaw·quantclaw
LeeeX!3 天前
OpenClaw CLI 完整实操笔记
笔记·openclaw