@sofagent/orchestrator
sofagent 编排模块——多 Agent 协作、工作流调度、prompt 模板。任务拆解 + LangGraph StateGraph 四节点串行状态机(从 deepagents 迁移至 createReactAgent);事件驱动升级(四类事件源 + on: 声明式订阅 + 死信重放 + 异常三分类路由)。
安装
npm install -g @sofagent/orchestrator
安装后获得 sofagent orchestrator(编排 CLI,含 compose / compare 子命令)与 sofagent compare 命令。Node.js 18+。
API
composeWithReactAgent() / compose() — 任务描述 → 编排方案 YAML + SubAgent 配置
runDAG() — 编排执行器(当前串行状态机——完整 DAG 并行调度仍在规划,见 dag-runner.ts 头注与 ROADMAP)
parseWorkflow() — YAML → SubAgent 映射(含环检测 / 悬空校验)
- 依赖关系:
@sofagent/core + @sofagent/inject + @langchain/langgraph
文档