Skip to content

Orchestrator HTTP API

Uni-Flow Orchestrator 是基于 Node 内置 http 的轻量 REST 服务,默认监听 http://127.0.0.1:8787

路由总表

方法路径说明
GET/health健康检查与已注册工作流列表
GET/workflows列出已注册工作流 ID
POST/workflows/from-yaml校验并注册 YAML 工作流
POST/workflows/:id/runs启动运行(支持 sync)
GET/workflows/:id/runs/:runId查询运行状态与结果
POST/workflows/:id/runs/:runId/resume从检查点恢复
POST/workflows/:id/runs/:runId/hitl人工审批 HITL 门
GET/memory/search语义 / 关键词记忆检索
POST/mcpJSON-RPC MCP 网关

通用约定

项目
Content-Typeapplication/json
成功响应JSON body
错误响应{ "error": string, "type"?: string }

Remote Unit 契约

Orchestrator 通过 bindings 调用远程 Unit 时,Unit 需实现:

Remote Unit HTTP Contract

  • 请求:POST,body 含 inputcontext
  • 响应:200 + AgentOutput JSON

启动 Orchestrator

bash
npm run build
npx tsx examples/start-orchestrator.ts
# 或
npx tsx examples/cross-lang/ts/start-orch-only.ts

分路由文档

SDK 封装

SDK
TypeScriptUniFlowClient
PythonUniFlowHttpClient
JavaUniFlowClient

TypeScript SDK

MIT Licensed