Orloj — Agent Infrastructure as Code

来源: GitHub | HN 20p/12c 定位: 多 Agent 系统的完整基础设施栈

核心理念

Orloj 用 YAML 声明式定义 Agent 系统的全部资源——agents、tools、models、memory、governance、schedules、webhooks。将 Agent 视作基础设施资源来管理。

“If agents are services, Orloj gives them manifests, runtime bounds, credentials, routing, observability, and lifecycle management. If agent teams are distributed systems, Orloj gives them durable handoffs, fan-out, fan-in, retries, idempotency, dead-letter states, and worker ownership.”

8 层栈

Interface → Agent → Execution → Model → Tool → Governance → Observability → Substrate

核心资源类型

资源说明
Agentprompt + model_ref + tools + limits
AgentSystemagents 组合成 DAG 图,带边路由、条件路由
ToolHTTP/gRPC/MCP/CLI/WASM,带权限和隔离
AgentPolicy / AgentRole角色基础策略
ToolPermission / ToolApproval / TaskApproval运行时策略执行,失败关闭
ModelEndpointprovider 路由、回退模型、secret 管理
Schedule / Webhook事件驱动和工作流触发

治理层设计

AgentPolicy → AgentRole → ToolPermission → ToolApproval → TaskApproval

每个工具调用通过策略链,失败关闭(fail closed)。这是当前开源框架中最完整的治理模型。

技术栈

  • 存储: 内存(开发) / Postgres(生产)
  • 消息: 顺序模式 / NATS JetStream
  • 可观测: OpenTelemetry + Prometheus + 任务历史
  • 运行方式: 单进程 / Docker / 编排

对 Hermes 的意义

  1. AgentSystem DAG 图模式 → 可借鉴到 Hermes 多 Agent 编排(agents-orchestrator)
  2. 治理模型(Policy → Role → Permission → Approval)→ Hermes safe-agent 升级蓝图
  3. ModelEndpoint 模式 → 与 Hermes model-provider-ops 概念一致
  4. YAML 声明式 → 可简化 Hermes 的多 agent 配置

优先级

🟢 P2 — 中长期架构参考