← 返回 Skills 市场
ebly

Cross Agent Chat

作者 ebly · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
381
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install cross-agent-chat
功能描述
实现不同 agent 间的标准化消息发送与接收,支持查询目标 session 并通过 sessions_send 进行跨 agent 通信。
使用说明 (SKILL.md)

SKILL.md - 跨 Agent 通信技能

描述

用于在不同 agent 之间进行通信的标准化流程。当需要与其他 agent(机器人)聊天时,使用 sessions_send 工具。

使用场景

需要和其他 agent 对话时

  • 询问其他 agent 的能力或功能
  • 请求其他 agent 执行任务
  • 跨 agent 协作和沟通

工具使用

sessions_send - 发送消息到其他 session

{
  "sessionKey": "目标 session 的 key",
  "label": "目标 session 的 label",
  "message": "要发送的消息内容",
  "timeoutSeconds": 30
}

参数说明

  • sessionKeylabel:必填其一,用于标识目标 session
  • message:要发送的消息内容(必填)
  • timeoutSeconds:超时时间(可选,默认 30 秒)

工作流程

1. 发现目标 session

使用 sessions_list 查找可用的 session:

sessions_list(activeMinutes=1440, limit=20, messageLimit=2)

返回结果包含:

  • key: session 的唯一标识
  • displayName: 显示名称
  • kind: session 类型(group/other等)
  • channel: 通信渠道

2. 发送消息

使用 sessions_send 发送消息:

{
  "sessionKey": "agent:xxx:feishu:direct:ou_xxx",
  "message": "你好,请问你可以帮我做什么?"
}

3. 等待响应

对方 agent 会收到消息并回复,你可以在当前会话中继续对话。

重要规则

应该这样做

  • 和其他 agent 对话时,统一使用 sessions_send
  • 明确说明你的意图和需求
  • 使用清晰、友好的语言
  • 设置合理的超时时间

不要这样做

  • 使用 message 工具给其他 agent 发送消息(这是给用户渠道用的)
  • 直接猜测 sessionKey,先用 sessions_list 确认
  • 发送模糊或无意义的信息

示例对话

场景 1:询问另一个 agent 的能力

{
  "sessionKey": "agent:assistant:feishu:direct:ou_xxx",
  "message": "你好!我是玲子,听说你擅长数据分析,可以帮我分析一些测试数据吗?"
}

场景 2:请求执行任务

{
  "label": "代码助手",
  "message": "请帮我写一个 Python 脚本,用于自动化测试用户登录功能。要求使用 pytest 框架。"
}

场景 3:跨 agent 协作

{
  "sessionKey": "agent:developer:feishu:group:oc_xxx",
  "message": "我刚才发现了一个 P1 级别的 bug,已经整理好了复现步骤。需要你这边帮忙排查一下代码问题。"
}

注意事项

  1. 权限问题:确保你有权限访问目标 session
  2. 超时处理:如果目标 agent 没有响应,检查是否在线或超时时间设置是否合理
  3. 消息格式:发送的消息要清晰、简洁、明确
  4. 上下文保持:如果需要延续对话,记住目标 session 的标识

故障排查

问题:发送失败,提示找不到 session

原因:sessionKey 或 label 不正确 解决:使用 sessions_list 确认正确的 session 标识

问题:对方没有回应

原因

  • 目标 agent 不在线
  • 超时时间太短
  • 消息发送失败

解决

  • 延长 timeoutSeconds
  • 检查目标 session 的 updatedAt 时间戳确认是否活跃
  • 重新发送消息

问题:收到错误响应

原因:目标 agent 不理解你的请求 解决

  • 重新组织消息,更清楚地表达意图
  • 提供更多上下文信息
  • 简化请求内容

最佳实践

  1. 先打招呼:发送请求前,简单介绍自己和意图
  2. 明确需求:清楚说明你想要什么,避免歧义
  3. 友好沟通:使用礼貌、友好的语言
  4. 保持简洁:消息不要过长,突出重点
  5. 及时反馈:收到回复后,及时确认和反馈

跨 agent 协作,让效率倍增 🤝

安全使用建议
This skill is a simple how-to for using platform tools sessions_list and sessions_send to message other agents. Before installing, confirm (1) that sessions_list/sessions_send are legitimate platform APIs in your environment, (2) you have permission to contact the target sessions, and (3) you avoid sending sensitive credentials or private data to other agents. Because the skill source/homepage is unknown, if you later see code or an install spec added, re-evaluate — any added downloads, env requirements, or attempts to persist state would change the security posture.
功能分析
Type: OpenClaw Skill Name: cross-agent-chat Version: 1.0.0 The skill bundle provides standardized instructions for inter-agent communication using platform-native tools like `sessions_list` and `sessions_send`. The documentation in SKILL.md focuses entirely on legitimate multi-agent collaboration scenarios, such as querying capabilities or requesting task assistance, and contains no evidence of malicious intent, data exfiltration, or prompt-injection attacks.
能力评估
Purpose & Capability
Name/description (cross-agent messaging) match the SKILL.md: it documents using sessions_list to discover sessions and sessions_send to deliver messages. There are no unrelated env vars, binaries, or install steps requested.
Instruction Scope
Instructions are narrowly scoped to listing sessions, forming a message, sending via sessions_send, waiting for replies, and handling timeouts/permissions. The doc does not instruct the agent to read files, access unrelated env vars, or transmit data to third-party endpoints.
Install Mechanism
Instruction-only skill with no install spec and no code files — nothing is written to disk or fetched during install.
Credentials
No environment variables, credentials, or config paths are requested; the declared requirements are minimal and appropriate for an instruction-only messaging helper.
Persistence & Privilege
Skill is not always-enabled and does not request elevated persistence. disable-model-invocation is false (normal), which means the agent may invoke it autonomously but that is expected for skills and not, by itself, a red flag.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cross-agent-chat
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cross-agent-chat 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: 跨 Agent 通信的标准化流程
元数据
Slug cross-agent-chat
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Cross Agent Chat 是什么?

实现不同 agent 间的标准化消息发送与接收,支持查询目标 session 并通过 sessions_send 进行跨 agent 通信。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 381 次。

如何安装 Cross Agent Chat?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cross-agent-chat」即可一键安装,无需额外配置。

Cross Agent Chat 是免费的吗?

是的,Cross Agent Chat 完全免费(开源免费),可自由下载、安装和使用。

Cross Agent Chat 支持哪些平台?

Cross Agent Chat 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cross Agent Chat?

由 ebly(@ebly)开发并维护,当前版本 v1.0.0。

💬 留言讨论