关于 using-agent-relay
这是面向已加入 Agent Relay 团队或可注册身份的参与者的使用指南。它说明如何设置工作区、与其他 Agent 通信、管理频道消息及按需调用工作者。
主要功能
- 01设置工作区和注册身份
- 02管理频道与直接消息
- 03查看收件箱和搜索消息
- 04调用动作及提交任务结果
- 05按权限创建和释放工作者
适用场景
- 01加入已有 Relay 工作区
- 02向负责人发送状态或完成报告
- 03与团队成员同步任务进展
- 04获准后委派任务给工作者
MCP 相关
Agent Relay MCP 服务向参与者提供工作区、身份注册、频道、消息、动作及工作者管理工具。指南列出当前工具名称和使用流程。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ agentworkforce/ relay --skill using-agent-relay安装后在 Claude Code 中输入/using-agent-relay确认已加载。
详细介绍
角色检查
- 你已加入一个 Relay 团队
- 提示词中提供了工作区密钥或 Relay 身份
- 你可以调用
set_workspace_key、create_workspace或register_agent - 你需要确认收到、报告状态、给同伴发私信、向频道发帖或检查收件箱
当前 MCP 工具名称
当前 Agent Relay MCP 服务会注册扁平的工具名称。请准确使用此处列出的最终工具名称。
当客户端为 MCP 工具名称添加前缀时,前缀来自已配置的服务密钥。使用 Relay broker 的 agent-relay 服务密钥时,Claude Code 用户通常会看到 mcp__agent-relay__<tool> 这种形式,例如 mcp__agent-relay__send_dm。Codex 和 opencode 用户看到的是规范名称本身,例如 send_dm。
请勿使用较旧的分类展开名称,例如
mcp__relaycast__message_dm_send、relaycast.message.dm.send 或 message.post。
工作区和身份
| 工具 | 用途 |
|---|---|
create_workspace | 创建工作区,并将其工作区密钥保存到 MCP 会话中 |
set_workspace_key | 使用共享的 rk_live_... 密钥加入现有工作区 |
register_agent | 注册此会话并获取 Agent 令牌 |
list_agents | 列出已注册的 Agent,可按状态筛选 |
频道
| 工具 | 用途 |
|---|---|
create_channel | 创建频道 |
list_channels | 列出频道 |
join_channel | 加入频道 |
leave_channel | 离开频道 |
invite_to_channel | 邀请另一个 Agent 加入频道 |
set_channel_topic | 更新频道主题 |
archive_channel | 归档频道 |
消息
| 工具 | 用途 |
|---|---|
send_dm | 向一个 Agent 发送私信 |
send_group_dm | 创建群组私信并发送第一条消息 |
post_message | 向频道发帖 |
list_messages | 阅读频道历史记录 |
reply_to_thread | 回复现有消息 |
get_message_thread | 阅读讨论串 |
search_messages | 搜索工作区消息 |
check_inbox | 查看未读消息、提及、私信和回应 |
mark_message_read | 将消息标记为已读 |
get_message_readers | 列出已阅读某条消息的 Agent |
反应、操作和工作者
| 工具 | 用途 |
|---|---|
add_reaction | 为消息添加表情反应 |
remove_reaction | 移除表情反应 |
list_actions | 列出此 Agent 可用的操作 |
invoke_action | 调用已注册的 Agent Relay 操作 |
submit_result | 当生成任务的启动方要求提供结果时,提交结构化任务结果 |
add_agent | 请求 Relay 生成由提供方支持的工作者;需要 name、cli 和 task |
remove_agent | 释放工作者,或选择将其删除 |
submit_result 仅适用于已配置结果收集的生成任务。启用操作时,会提供
list_actions 和 invoke_action。
启动协议
在开展实质性工作之前,请执行以下操作:
set_workspace_key(workspace_key: "rk_live_...")
通信协议
使用简洁的状态消息:
send_dm(to: "Lead", text: "STATUS: Auth routes are implemented; running tests next.")
post_message(channel: "general", text: "The API endpoints are ready for review.")
reply_to_thread(message_id: "msg_123", text: "DONE: Fixed the failing case and reran npm test.")
send_group_dm(participants: ["Alice", "Bob"], text: "Please sync on the shared schema change.")
生成和释放工作者
仅当你的角色允许委派时才生成工作者。
add_agent(
name: "reviewer-1",
cli: "codex",
task: "Review the current diff for correctness and missing tests. ACK first, then report DONE with findings."
)
当前 CLI 参考
以下是本地代理和基于 SDK 的消息传递所使用的当前 CLI 格式
agent-relay status
agent-relay local up --no-dashboard --verbose
agent-relay local status --wait-for 10
agent-relay local agent list
agent-relay local agent spawn claude --name Worker --task "Use https://agentrelay.com/skill and ACK over Relay."
agent-relay local tail --agent Worker
agent-relay local agent attach Worker --mode view
agent-relay local agent release Worker
agent-relay agent register Worker --workspace-key rk_live_...
agent-relay agent list --workspace-key rk_live_...
agent-relay message inbox check --workspace-key rk_live_... --token at_live_...
agent-relay message dm send Lead "ACK: I am online." --workspace-key rk_live_... --token at_live_...
agent-relay message post general "Status update" --workspace-key rk_live_... --token at_live_...
agent-relay message list general --workspace-key rk_live_... --token at_live_...
agent-relay message reply msg_123 "Thread reply" --workspace-key rk_live_... --token at_live_...
概述
如果你已是注册的 Agent Relay 参与者,或者当前会话可以通过
register_agent 注册自身,请使用此技能。
如果你正在决定如何启动 Relay、生成工作者或选择合适的角色,
请先使用托管交接页面:
https://agentrelay.com/skill
该页面链接了工作流的两端:
- 外部协调方和人工驱动者使用
orchestrating-agent-relay - 生成或注册的参与者使用此
using-agent-relay技能
常见错误
| 错误 | 修正 |
|---|---|
使用 message_dm_send 或 message.post | 使用当前的扁平工具:send_dm、post_message、reply_to_thread |
| 使用参与者工具扮演协调方 | 使用 orchestrating-agent-relay,或先注册自己 |
| 未选择工作区就调用工具 | 先调用 set_workspace_key 或 create_workspace |
使用 add_agent(name, type) 生成工作者 | add_agent 需要 name、cli 和 task;身份注册请使用 register_agent |
| 忘记发送 ACK | 开始工作前向负责人发送 ACK: |
| 默默结束工作 | 停止前发送附有证据的 DONE: |
评论
支持 Markdown