Skip to content

OpenRath v2.0.0

Latest

Choose a tag to compare

@Tokisakix Tokisakix released this 31 Jul 05:25
8281946

OpenRath v2.0.0

OpenRath 2.0.0 将框架从进程内 Agent 工作流扩展为可部署的持久化多 Agent Runtime 与 Agent Server。本版本引入可恢复执行、受治理的副作用、人工中断、安全与租户边界,以及面向 PostgreSQL、Redis、S3 和 OpenTelemetry 的生产部署能力。

OpenRath v2 持久化运行时

核心特性

持久化 Runtime

  • 显式编译模型@step@router 编译为规范化执行计划与不可变 revision。
  • 可恢复 Run — Events、Checkpoints、Interrupts、取消、截止时间、重试、租约 fencing 与队列恢复形成完整生命周期。
  • 受控副作用 — Effect Ledger 保存结果和幂等键;无法安全判定的非幂等操作进入 NEEDS_REVIEW,避免盲目重放。
  • 人工决策 — durable Interrupt 可暂停 Run 等待审批或输入,并从持久化状态继续。

Agent Server 与安全边界

  • HTTP + SSE API — 提供租户/项目作用域下的 Run、Event、Artifact、Revision 与 Evaluation 资源。
  • 显式授权 — Token、Action Grant、Tenant/Project Scope、Policy、Secret Reference、Trust Label 与 Audit 各自保持独立边界。
  • 受治理适配器 — Provider、Tool/MCP、Sandbox 与 Memory 通过统一上下文和策略执行。
  • 防护默认值 — 有界请求、资源限制、安全响应头、结构化审计与敏感信息脱敏。

生产存储与运维

  • PostgreSQL 作为持久化事实来源,支持 additive migrations、租约与恢复。
  • Redis 可选用于低延迟信号传递,不替代持久化状态。
  • S3 兼容 Artifact Store 保存输入、输出与运行制品。
  • 可观测性与部署 — OpenTelemetry、健康检查、API/worker 拆分、Docker Compose 与 Kubernetes 参考配置。
  • 评测能力 — Evaluation 资源、运行结果和 Artifact 可纳入同一审计链路。

兼容性与迁移

  • Python v1 facade 在文档约定的维护窗口内继续支持。
  • v1 JSONL Sessions 可导入为不可恢复的历史 Runs。
  • Agent Server HTTP 接口当前标记为 Beta
  • 切换生产流量前,请备份 PostgreSQL 与 Artifact,执行迁移 dry-run,并完成恢复验证。
  • 支持 Python 3.10–3.13。

迁移与运维说明见 deploy/docs/migration-v2.mddeploy/docs/operations-v2.mddeploy/docs/api-governance-v2.mddeploy/docs/known-limitations-v2.md

安装

pip install --upgrade openrath

# Agent Server
pip install --upgrade "openrath[server]"

# 生产存储与可观测性
pip install --upgrade "openrath[postgres,redis,s3,otel]"

# 可选适配器
pip install --upgrade "openrath[litellm,opensandbox,openviking]"

项目与资源

完整变更: v1.3.0...v2.0.0


OpenRath v2.0.0

OpenRath 2.0.0 expands the framework from in-process agent workflows into a deployable durable multi-agent Runtime and Agent Server. It adds resumable execution, governed side effects, human interrupts, security and tenancy boundaries, and production-oriented PostgreSQL, Redis, S3, and OpenTelemetry integration.

OpenRath v2 durable runtime

Major Features

Durable Runtime

  • Explicit compilation@step and @router compile into canonical execution plans and immutable revisions.
  • Resumable Runs — Events, Checkpoints, Interrupts, cancellation, deadlines, retries, lease fencing, and queue recovery form a complete lifecycle.
  • Governed side effects — the Effect Ledger records outcomes and idempotency keys; ambiguous non-idempotent operations enter NEEDS_REVIEW instead of being replayed blindly.
  • Human decisions — durable Interrupts pause a Run for approval or input and resume from persisted state.

Agent Server and security boundaries

  • HTTP + SSE APIs — tenant/project-scoped Run, Event, Artifact, Revision, and Evaluation resources.
  • Explicit authorization — tokens, action grants, tenant/project scope, policy, secret references, trust labels, and audit remain separate boundaries.
  • Governed adapters — Provider, Tool/MCP, Sandbox, and Memory execute through shared context and policy controls.
  • Defensive defaults — bounded requests, resource limits, security headers, structured auditing, and secret redaction.

Production storage and operations

  • PostgreSQL is the durable source of truth, with additive migrations, leases, and recovery.
  • Redis optionally accelerates signaling without replacing durable state.
  • S3-compatible Artifact Store persists inputs, outputs, and run artifacts.
  • Observability and deployment — OpenTelemetry, health checks, split API/worker operation, Docker Compose, and Kubernetes references.
  • Evaluation resources — evaluation runs, results, and artifacts join the same auditable lifecycle.

Compatibility and migration

  • The Python v1 facade remains supported for the documented maintenance window.
  • v1 JSONL Sessions can be imported as non-resumable historical Runs.
  • The Agent Server HTTP surface is currently marked Beta.
  • Before switching production traffic, back up PostgreSQL and artifacts, run the migration dry-run, and verify restoration.
  • Python 3.10–3.13 is supported.

See deploy/docs/migration-v2.md, deploy/docs/operations-v2.md, deploy/docs/api-governance-v2.md, and deploy/docs/known-limitations-v2.md.

Install

pip install --upgrade openrath

# Agent Server
pip install --upgrade "openrath[server]"

# production storage and observability
pip install --upgrade "openrath[postgres,redis,s3,otel]"

# optional adapters
pip install --upgrade "openrath[litellm,opensandbox,openviking]"

Project resources

Full changelog: v1.3.0...v2.0.0