‹ 返回 2026-06-24

OpenRath:以会话为中心的代理系统运行时状态

OpenRath: Session-Centered Runtime State for Agent Systems

▲ 68 💬 3 2026-06-24

Fukang Wen, Zhijie Wang, Ruilin Xu

摘要

现代智能体系统往往存在状态分散的问题:各种信息如记录内容、工具效果、内存事件、工作空间位置、分支来源以及重放证据都分别被记录下来,因此难以被查看或重现。OpenRath通过一种类似PyTorch的编程模型来解决这一问题,该模型适用于多智能体、多会话系统。这种模型的核心概念是“Session”——即智能体之间以及工作流程中传递的运行时值。Session具有可分支、可查看、可重放、能感知后端且可组合的特性。它记录对话内容、沙箱位置、元数据、令牌使用情况、待处理任务以及工具相关信息,同时明确记录了内存交互发生的位置。由于这些状态由程序执行过程中使用的同一值来表示,因此分叉、合并和重放等操作就变成了明确的运行时操作,而非从外部记录中重建的状态。OpenRath还定义了沙箱、工具、智能体、内存、工作流程以及选择器等概念,其中选择器能够将控制流程转化为运行时可执行的决策。本报告介绍了该编程模型、架构、已验证的里程碑以及证据处理机制。其结论仅涉及受控的运行时特性,而关于定量比较、实时提供服务的质量、可选后端的可用性以及内存质量等方面的评估则留待后续研究。核心观点是:Session为智能体系统提供了一种可用于审计的运行时值,使得系统的组合过程更加可控。

English Abstract

Modern agent systems often suffer from fragmented runtime state: transcripts, tool effects, memory events, workspace placement, branch provenance, and replay evidence are recorded separately and become difficult to inspect or reproduce. OpenRath addresses this issue with a PyTorch-like programming model for multi-agent, multi-session systems. The analogy concerns the role of a central first-class runtime abstraction, not tensor computation. Its core abstraction is Session, the runtime value passed between agents and workflows. A Session is branchable, inspectable, replayable, backend-aware, and composable. It records conversation chunks, sandbox placement, lineage metadata, token usage, pending work, and tool evidence, while defining where memory interactions enter the runtime record. Since this state is carried by the same value used in program execution, fork, merge, and replay become explicit runtime operations rather than states reconstructed from external traces. OpenRath further defines Sandbox, Tool, Agent, Memory, Workflow, and Selector, with Selector turning control flow into runtime-routed decisions. This report presents the programming model, architecture, audited milestones, and evidence protocol. Its claims are limited to controlled runtime properties, while broad quantitative comparisons, live-provider quality, optional-backend availability, and memory quality are left for follow-on evaluation. The central thesis is that Session provides agent systems with a first-class runtime value for auditable composition.