闲社服务运行正常AI智能体自动化平台
t

多代理编排

技能标识:tutti

Orchestrate multiple AI coding agents (Claude Code, Codex, Aider) from a single config — launch teams, run workflows, track capacity, and manage handoffs.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

多代理编排

Tutti — 多智能体编排

通过声明式tutti.toml配置文件编排一组AI编码智能体。在独立的git工作树中启动智能体、运行验证工作流、跟踪令牌使用情况并管理上下文交接——全部通过单一CLI完成。

何时使用此技能

当用户要求您执行以下操作时使用:

  • - 启动、监控或停止一组AI编码智能体
  • 跨智能体运行或验证自动化工作流
  • 向智能体发送提示,支持自动启动和输出捕获
  • 将智能体工作合并回主分支或创建PR
  • 检查智能体状态、健康度或容量使用情况
  • 生成或应用上下文交接包
  • 协调多智能体开发工作流

前置条件

  1. 1. 已安装tt二进制文件并加入PATH(从https://github.com/nutthouse/tutti安装)
  2. 已安装tmux
  3. 可用python3
  4. 工作区根目录存在tutti.toml配置文件

启动工作流前始终运行预检检查:
bash
python3 tuttiopenclaw.py doctorcheck

操作

所有操作均通过包装脚本执行。每个操作返回一致的JSON信封:

json
{
ok: true,
action: action_name,
command: [tt, ...],
exit_code: 0,
data: {},
stdout: ,
stderr:
}

生命周期

操作命令用途
doctorcheckpython3 tuttiopenclaw.py doctorcheck预检:验证工具、配置和环境
launchteam
python3 tuttiopenclaw.py launchteam | 启动tutti.toml中定义的所有智能体 | | launchagent | python3 tuttiopenclaw.py launch_agent <名称> | 启动单个智能体 | | sendprompt | python3 tuttiopenclaw.py send_prompt <智能体> <提示...> [--auto-up] [--wait] [--output] | 向智能体发送提示,支持可选自动启动、等待空闲和输出捕获 | | teamstatus | python3 tuttiopenclaw.py team_status | 从.tutti/state/读取智能体状态 | | agentoutput | python3 tuttiopenclaw.py agent_output <名称> --lines 50 | 查看智能体的终端输出 | | stopagent | python3 tuttiopenclaw.py stop_agent <名称> | 停止单个智能体 | | stopteam | python3 tuttiopenclaw.py stop_team | 停止所有智能体 |

工作流

操作命令用途
listworkflowspython3 tuttiopenclaw.py listworkflows发现可用工作流
planworkflow
python3 tuttiopenclaw.py planworkflow <名称> [--strict] | 预演工作流 | | runworkflow | python3 tuttiopenclaw.py run_workflow <名称> [--agent ] [--strict] | 执行工作流 | | verifyteam | python3 tuttiopenclaw.py verify_team [--workflow ] [--strict] | 运行验证工作流 | | readverifystatus | python3 tuttiopenclaw.py readverify_status | 读取上次验证结果 |

Git操作

操作命令用途
landagentpython3 tuttiopenclaw.py land_agent <智能体> [--pr] [--force]将智能体的分支合并回当前分支,或创建PR

交接

操作命令用途
generatehandoffpython3 tuttiopenclaw.py generatehandoff <智能体> [--reason <r>]将智能体上下文捕获到数据包中
applyhandoff
python3 tuttiopenclaw.py applyhandoff <智能体> [--packet <路径>] | 将交接包注入智能体 | | listhandoffs | python3 tuttiopenclaw.py list_handoffs [--agent
] [--limit 20] | 列出可用交接包 |

权限

操作命令用途
permissionscheckpython3 tuttiopenclaw.py permissions_check <命令...>检查命令是否被策略允许

工作流步骤类型

tutti.toml中的工作流支持以下步骤类型:

类型用途关键字段
prompt向智能体会话发送文本agent、text、injectfiles、waitforidle、waittimeoutsecs
command
执行shell命令 | run、cwd、timeoutsecs、fail_mode |
| ensurerunning | 如果智能体未运行则启动 | agent、failmode |
| workflow | 作为嵌套步骤执行另一个工作流 | workflow、agent、strict、fail_mode |
| land | 合并智能体的分支 | agent、pr、force、fail_mode |
| review | 将智能体的差异发送给审查者 | agent、reviewer、fail_mode |

提示步骤支持inject_files——一个工作区相对路径数组,在发送提示前将这些文件复制到智能体的工作树中。这实现了智能体之间的有状态上下文传递(例如,注入另一个智能体生成的快照JSON)。

嵌套的workflow步骤支持组合:观察→调度→修复→验证→合并,形成工作流调用链。

执行模式

按照以下顺序编排工作区:

  1. 1. 预检——doctorcheck。如果非零则停止并报告。
  2. 启动——launchteam或launchagent <名称>。
  3. 监控——teamstatus和agentoutput <名称>观察进度。
  4. 调度——sendprompt <智能体> 执行操作 --auto-up --wait --output调度工作并捕获结果。
  5. 工作流——listworkflows发现,然后runworkflow <名称>。
  6. 验证——verifyteam --strict进行门控式质量检查。
  7. 合并——landagent <智能体>精选工作,或landagent <智能体> --pr创建PR。
  8. 交接——上下文重要时使用generatehandoff <智能体>,使用applyhandoff <智能体>恢复。
  9. 停止——完成后使用stopteam或stop_agent <名称>。

故障处理

  • - 非零退出:从JSON信封中展示action、command和stderr。不要盲目重试。
  • 验证警告(非严格模式):作为警告报告。包含来自readverifystatus的数据。
  • 缺少状态文件:视为临时性问题——最多重试3次,间隔短暂延迟。如果仍然缺失,工作区可能尚未启动。
  • 认证失败:如果stderr包含认证错误,停止并上报给用户。不要重试认证失败。
  • 智能体未运行:在send_prompt上使用--auto-up按需自动启动智能体,而不是失败。

配置覆盖

如果tt不在PATH中或需要特定版本:

bash
python3 tuttiopenclaw.py --tt-bin /path/to/tt doctorcheck

或通过环境变量


TUTTIBIN=/path/to/tt python3 tuttiopenclaw.py doctor_check

规则

  • - 在任何启动或工作流操作前始终运行doctorcheck。
  • 绝不重试认证失败——立即上报给用户。
  • 状态检查优先使用teamstatus(直接读取状态文件)而非agentoutput。
  • 当结果影响后续操作时,在verifyteam和runworkflow上使用--strict标志。
  • 当目标智能体可能未运行时,在sendprompt上使用--auto-up。
  • 在send_prompt上使用--output捕获智能体的响应以进行程序化验证。
  • 当需要结构化数据时,使用tt命令的--json输出(包装器会自动处理)。
  • 不要解析stdout文本输出——

标签

skill ai
v1.1.0 最新 2026-4-15 14:45
Add send_prompt, land_agent actions and workflow step type docs
返回顶部