AgentLoom 多智能体工作流编排
用 YAML 定义并运行带权限、可恢复、可审计的多智能体应用。
- Star 数
- ★ 169
- 最近更新
- 13 天前
- 主语言
- Python
- FA 评分
- 52/100 · 缺口较多
30 秒速览
- 可在哪里用
- 兼容但需适配OpenAI API
- 开始前需要
- 典型场景
- 代码审查团队:把 api_reviewer、test_reviewer 等 Worker 组合成发布评审流水线,输出单一发布结论。
- 主要局限
- 安装器只支持 macOS 与 Linux shell,并要求 Git/Bash;Windows 路径未见文档。
- 源码审查
- 52/100 · 缺口较多
这个 Agent 能做什么,适合哪些场景?
AgentLoom 把多智能体系统当作带执行契约的 Application:YAML 描述 Supervisor、类型化 Worker、模型、工具、Skills、Hooks、权限与运行时策略,再由 CLI 或 Python API 执行。Supervisor 通过 worker_agents 显式选择 Worker,每个 Worker 变成同名可调用工具;复杂 Worker 用 Draft 2020-12 的 input_schema/output_schema 形成可执行契约。每次 Run 分配不可变 run_id、manifest 和版本化生命周期事件,并写入 .agentloom 下的日志、审计与产物;逻辑 task_id 在恢复后保持不变。Goal Mode 让根 Supervisor 独占目标完成权,checkpoint 保留目标与已完成工作。可选的 durable 扩展用 DBOS 3.2.0 提供持久 Worker 队列,默认 SQLite 存储。
读取 Application 目录中的 YAML(Supervisor、worker_agents、config/system.yaml、Skills、sysprompt),加载模型目录 config/model.yaml,并通过 agentloom/loom 命令或 execute_app() 运行。运行时负责模型路由、把 Worker 生成为工具、并发控制、权限、Hooks、checkpoint 与证据采集,确定性预处理与输出写回仍是普通 Python 代码。产物写入 .agentloom/runs/<application_id>/<run_id>/(manifest.json、logs/runtime.log、audit/、artifacts/)与 .agentloom/checkpoints/<application_id>/<task_id>/(checkpoint.json、workers/、todos.json、goal.json、context_store/、file-history/)。CLI 支持 --output-format json 与 jsonl;execute_app() 返回含 output、时间戳、Goal 状态与 RunInfo 收据的 ApplicationRunResult。可选的 DBOS durable 适配器通过 app.durable(root=...) 的 worker(...).submit_many(items, revision="1") 提交持久任务,并由 loom durable serve 启动消费者。
- 代码审查团队:把 api_reviewer、test_reviewer 等 Worker 组合成发布评审流水线,输出单一发布结论。
- 平台工程团队:需要为长任务保留 run_id、审计与恢复点,用于合规或事故复盘。
- CI/CD 维护者:在流水线中调用
loom run ... --output-format jsonl,由外部系统消费生命周期事件。 - 需要并行处理大量仓库的分析者:使用
app.worker(path).map(items)做有限并行,或用 durable 队列做持久任务。 - 构建内部编码助手的团队:编写 Skill 让 coding agent 按 YAML 契约生成、校验并运行 Application。
如何安装或部署这个 Agent?
当前支持 macOS 与 Linux 的 shell,需要 Git 与 Bash;./install 会通过官方安装器安装缺失的 uv,在本仓库的 .venv 创建隔离环境,并把 agentloom 与 loom 启动器写入 .agentloom。自定义路径可用 AGENTLOOM_INSTALL_DIR=/path/to/install。
如何使用这个 Agent?
先准备模型配置(config/model.yaml 被 Git 忽略),再按 Application 目录结构编写 YAML 与 Worker 定义。运行示例 code-review 应用并可用 --output-format jsonl 供外部程序消费事件;在 Python 中调用 execute_app() 或 Application.open() 获取结构化结果。持久队列需安装 durable extra 并单独启动消费者。
这个 Agent 有哪些优点和局限?
- YAML 契约化:Worker 的 input_schema/output_schema 用 Draft 2020-12 校验,而非依赖提示词约定。
- 完整运行证据:每次 Run 有不可变 run_id、manifest、生命周期事件与审计目录,preflight 拒绝在存储分配前就发出 run.rejected。
- 恢复语义清晰:逻辑 task_id 跨 resume 保持,Goal、Todo、context-store、file-history 均有独立落盘位置。
- 权限分层:Skills 是按需加载的模型上下文包,Hooks 是需显式授权的运行时代码,MCP/文件/Shell 访问受 Agent 配置约束。
- 持久队列:durable extra 基于 DBOS 3.2.0,默认 SQLite,可做 admission、重试与恢复。
- 安装器只支持 macOS 与 Linux shell,并要求 Git/Bash;Windows 路径未见文档。
- durable 执行当前仅在 macOS launchd 下验证,Linux 与 PostgreSQL/多主机执行尚未验证,属采用风险。
- 仓库 LICENSE 未知,企业采用前需自行确认授权。
- 模型走 OpenAI 兼容端点,需自行提供 API key 与 endpoint,并非零成本方案。
- 架构文档提到旧的
src.*导入与模块命令已移除,既有项目迁移需按迁移清单改造。
这个 Agent 与同类方案有什么区别?
与相关度最高的同类 agent 并排比较关键指标。
| Agent | 源码审查 | 形态 / 费用 | Star | 最近更新 | 主语言 | 完整支持的平台 |
|---|---|---|---|---|---|---|
| AgentLoom 多智能体工作流编排 当前 | 52 · 缺口较多 | — | ★ 169 | 13 天前 | Python | OpenAI API |
| Pi Dynamic Workflows | 88 · 表现良好 | Agent 插件 / 技能免费 + 模型费 | ★ 590 | 8 天前 | TypeScript | — |
| Maestro-Flow | 52 · 缺口较多 | 命令行工具免费 + 模型费 | ★ 574 | 10 天前 | TypeScript | Codex · Claude Code · Claude API |
| Docker Agent | 46 · 缺口较多 | 命令行工具免费 + 模型费 | ★ 4.7k | 今天 | Go | OpenAI API · Claude API |
FollowAgents 如何评估这个 Agent?
查看各维度的扣分理由
文档描述了工具白名单、path_validation、shell_settings 沙箱、Worker 权限不继承 Supervisor 等最小权限机制,属较充分的设计说明(least_privilege=2)。但用户确认机制几乎无证据:Goal 完成、记忆提升需人工发起,但破坏性 Shell/文件写入缺少显式确认流程(user_confirmation=1)。数据流方面有 model.yaml 与 system.yaml 物理隔离、api_key 过滤、脱敏记录等说明(data_flow_transparency=2)。敏感数据处理有隔离与脱敏路径,但无密钥轮换/加密细节(sensitive_data_handling=2)。依赖锁定(uv.lock、--require-hashes、固定版本)较好,但依赖面极广且含 docker、sentry、langfuse 等,未提供漏洞扫描证据(dependency_security=2)。外部副作用方面有 durable 队列、launchd、Shell 执行等,但回放/副作用提交仅靠“可信宿主”声明,缺少强制确认(external_effects=1)。回滚有 checkpoint、resume、file-history、run retention(rollback=2)。来源归属方面仅提及 OpenClaw 源参考与 Pi 许可文件,未给出完整第三方归属清单(source_attribution=1)。
文档对 Run/task 身份、预检拒绝、结构化失败、JSON/JSONL 一致性描述较一致(self_consistency=2)。依赖可用性有锁定与安装 profile 说明,但 Pi 需 Node 22.19+、SQLite 3.51.1 死锁需规避,存在环境敏感点(dependency_availability=2)。失败信息有 run.rejected、WorkerBatchError、诊断错误等说明(failure_messages=2)。
面向多 Agent 编排场景,示例应用丰富(audience_and_scenarios=2)。能力边界有 runtime 注册值、schema 契约、Skill 不授权等说明(capability_boundaries=2)。触发精度方面 YAML 触发与 schedule 有描述,但缺少精确触发条件与误触发防护细节(trigger_precision=1)。环境适配仅 macOS/Linux 部分验证,Linux durable 与 PostgreSQL 未验证,Windows 仅 wexpect 依赖(environment_fit=1)。
文档信息架构清晰,有目录与交叉链接(information_architecture=2)。安装说明详尽,含 uv、profile、wheel 安装(install_notes=2)。命名稳定性存在迁移与旧接口弃用(src.* 移除、legacy batch),命名变动较多(naming_stability=1)。示例与 FAQ 有示例应用与常见错误章节(examples_and_faq=2)。已知限制有明确列出(known_limitations=2)。许可证元数据未知,仓库未见 LICENSE 文件(license=0)。版本号 1.0.1 但无 CHANGELOG(versioning_changelog=1)。维护责任仅个人邮箱与 issues,发布者未验证(maintenance_responsibility=1)。
输出可用性有结构化 Run 结果、JSON/JSONL、artifact(output_usability=2)。边际价值在于 YAML 编排、类型化 Worker、可恢复 Run,相对通用框架有差异化(marginal_value=2)。成本效益方面依赖庞大、安装复杂、需 Node 与多 profile,学习与运维成本高(cost_benefit=1)。
声明可追溯性部分有文档与 spec 链接,但多为自述,缺少逐条证据映射(claim_traceability=1)。跨源佐证有 README、docs、CI、pyproject 相互印证,但测试结果未在静态审查中验证(cross_source_corroboration=1)。事实与推断分离方面文档有【推断】标注建议,但整体声明与实现证据边界不清(fact_inference_separation=1)。
- 许可证元数据未知且仓库未见 LICENSE 文件,商用前需确认授权。
- 发布者身份未经验证,维护责任与更新路径不明确。
- 依赖面极广(docker、sentry、langfuse、litellm 等),缺少漏洞扫描证据,需自行审计。
- durable 执行仅 macOS 部分验证,Linux 与 PostgreSQL 未验证;SQLite 3.51.1 存在已知死锁需规避。
- 破坏性 Shell/文件写入缺少显式用户确认流程,外部副作用回放依赖“可信宿主”声明。
- 存在旧接口弃用与命名迁移(src.* 移除、legacy batch),升级可能破坏兼容。
最近版本
来自该项目 GitHub Releases 的最新发布记录,说明为上游原文摘录,未经本站改写或测试。
-
发布说明摘录
Highlights - Added local Codex Exec tool support: AgentLoom can register local codex exec as a normal function tool. - Added fixed_args support so workflows can lock tool inputs and prevent LLM overrides. - Added codex_exec_demo showing sequential Codex tool calls through structured tool_call mode. - Bumped AgentLoom package, system version, User-Agent, badges, and docs to 1.0.1.在 GitHub 查看 ↗ -
v1.0.0 AgentLoom v1.0.0
发布说明摘录
AgentLoom v1.0.0 AgentLoom v1.0.0 is the first stable public release of the project. Highlights - Configuration-driven multi-agent application runtime - Supervisor / Worker agent workflow model - Worker agents exported as callable tools - Built-in file, shell, search, code editing, git, todo, and skill tools - MCP client integration for external tools - Runtime safety controls, path boundaries, and shell execution policies - Checkpoint resume and long-task recovery - Rich terminal logs, run archives, Web UI, and dashboard monitoring …在 GitHub 查看 ↗
常见问题
必须先有一个 OpenAI 兼容的服务吗?
openai/<model-id> 形式的模型名、API key 与可选 base_url,因此需自备模型服务或兼容端点。durable 队列能在 Linux 上跑吗?
Run 失败后如何排查?
.agentloom/runs/<application_id>/<run_id>/ 下的 logs/runtime.log、audit/ 与 artifacts/;preflight 拒绝会在存储分配前发出 run.rejected。能否在 CI 中使用并让外部程序消费事件?
loom run ... --output-format json 或 jsonl 输出机器可读生命周期事件,Python 侧可用 execute_app() 读取同一份规范状态。