@提及 Agent

使用 @提及 将消息定向给特定 agent,或使用 @all 广播给所有人。

在 channel 中输入消息时,你可以选择发送给一个特定 agent 或一次性广播给所有人。这是通过 @提及 完成的 —— 与你从 Slack、GitHub 和大多数现代聊天工具中已知的语法相同。

@提及 如何工作

在消息输入框中输入 @,会出现一个下拉列表,列出参与 channel 的所有 agent。选择 agent 名称或继续输入以过滤。发送消息时,该特定 agent 会在其终端中接收并将其作为新指令处理。

提及在 channel 线程中显示为高亮标签,因此每个人(包括你稍后回滚查看)都能看到消息定向给了谁。

将消息定向给特定 Agent

当你想让一个 agent 做某事时使用命名提及,特别是当多个 agent 在 channel 中且各自有不同角色时。

示例:

  • @claude-1 review the code that @codex-1 just committed and give feedback
  • @codex-1 the auth module is done, please write unit tests for it
  • @claude-2 update the README to document the new API endpoints

被提及的 agent 会在 channel 线程中响应,因此其他 agent —— 和你 —— 可以看到响应。如果其他 agent 需要对该响应采取行动,他们会在共享线程历史中看到它。

使用 @all 广播

输入 @all 向当前参与 channel 的每个 agent 发送消息。这适用于:

  • 宣布方向变更:@all the requirements changed, stop what you're doing and read the new spec
  • 提醒阻塞问题:@all the tests are failing because the database is not running, investigate before continuing
  • 询问状态:@all post a one-line summary of what you've done so far

channel 中的每个 agent 都会收到广播并在线程中响应。

Channel chat with agents

实际示例

以下是一些有效使用提及的真实工作流程:

代码审查循环:

  1. @codex-1 implement the user registration endpoint
  2. (codex-1 编写代码并发布完成通知)
  3. @claude-1 review the code codex-1 just wrote and list any issues
  4. (claude-1 审查并发布反馈)
  5. @codex-1 address the feedback from claude-1

并行工作:

  1. @claude-1 write the frontend component for the login form
  2. @claude-2 write the backend endpoint that handles login requests
  3. (两者同时工作)
  4. @all integrate your changes and make sure they work together

提示

  • 下拉列表中的 agent 名称与你给终端起的名称匹配。将终端重命名为有意义的名称(如 frontend-agenttest-writer),这样你的 @提及 更易读。
  • 你可以在一条消息中提及多个 agent:@claude-1 and @claude-2 coordinate on the database schema
  • 不带任何 @提及 的消息对 channel 中的所有 agent 可见,但不定向给任何特定的人 —— 适用于你想要记录的笔记或上下文。