做 AI 智能体高频状态探索(如树搜索、强化学习)的团队,终于有了能跑在毫秒级的沙箱 C/R 方案,不用再被几百毫秒的延迟卡脖子,建议直接看论文实现。
DeltaBox 提出了一种新的操作系统级抽象 DeltaState,用于实现 AI 智能体沙箱的毫秒级检查点与回滚。其核心洞察是:智能体运行中连续检查点高度相似,因此只需复制变化部分而非整个状态。DeltaBox 包含两个协同设计的机制:DeltaFS 通过分层文件系统实现基于变化的文件状态 C/R,DeltaCR 通过增量转储和模板进程 fork 加速进程状态回滚。实验表明,DeltaBox 的检查点和回滚延迟分别仅为 14ms 和 5ms,相比传统全量复制方法大幅降低,使得智能体在固定时间预算内能探索更多节点。该工作对需要高频状态探索的 AI 智能体(如测试时树搜索、强化学习)有重要价值。
DeltaBox: Scaling Stateful AI Agents with Millisecond-Level Sandbox Checkpoint/Rollback
LLM-powered AI agents require high-frequency state exploration (e.g., test-time tree search and reinforcement learning), relying on rapid checkpoint and rollback (C/R) of the complete sandbox state, including files and process state (e.g., memory, contexts, etc.). Existing mechanisms duplicate the entire state, causing hundreds of milliseconds to seconds of latency per C/R, which severely bottlenecks deep search and large-scale fan-outs. This paper observes that subsequent checkpoints in AI agents are highly similar. Therefore, instead of full duplication, a sandbox should only duplicate the changes between consecutive checkpoints (Key Insight). However, it is non-trivial to realize the idea, mainly due to the missing OS supports. This paper proposes a new OS-level abstraction, DeltaState, to enable the change-based transactional C/R for AI agents with two co-designed OS mechanisms. First, DeltaFS enables change-based filesystem C/R by organizing the file states into layers and dynamically freezing the writable layer and inserting a new one during checkpoint, reducing file updates to copy-on-write, and making rollback a simple layer switch. Second, DeltaCR enables change-based process state C/R using incremental dumps, and accelerates rollback by bypassing traditional pipelines to directly fork() from a frozen template process. We then present DeltaBox, a novel agent sandbox achieving millisecond level C/R through the two new mechanisms. Evaluations on SWE-bench and RL micro-benchmarks show DeltaBox completes checkpoint and rollback in millisecond-level latency (14ms and 5ms, respectively), empowering agents to explore substantially more nodes under fixed time budgets.