# OpenRath：以Session为中心的智能体运行时状态管理

- 来源：HuggingFace Daily Papers（社区热门论文）
- 发布时间：2026-06-17 08:00
- AIHOT 分数：34
- AIHOT 链接：https://aihot.virxact.com/items/cmqq4prau06l7slp5j0c9142i
- 原文链接：https://arxiv.org/abs/2606.19409

## AI 摘要

现代智能体系统因运行时状态碎片化（如会话记录、工具结果、内存事件等分散存储）难以检查与复现。OpenRath提出类似PyTorch的编程模型，核心抽象是Session——一种可在智能体与工作流间传递、支持分支、审查、回放的一级运行时值。Session统一记录对话片段、沙盒位置、血缘元数据、token用量、待办任务和工具证据，使分支、合并、回放成为显式操作。此外还定义了Sandbox、Tool、Agent、Memory、Workflow和Selector，其中Selector将控制流转为运行时路由的决策。论文呈现了编程模型、架构与证据协议，主张Session为智能体系统提供可审计组合的一级运行时值。

## 正文

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.
