让AI代理状态快照与回滚快到毫秒级,大幅加速探索效率。
DeltaBox: Scaling Stateful AI Agents with Millisecond-Level Sandbox Checkpoint/Rollback

- 通过只记录状态变化而非全量复制,实现高效快照与回滚。
- 在SWE-bench和强化学习微基准测试中,快照和回滚分别仅需14ms和5ms。
- 适合需要高频状态探索的LLM智能体系统,如推理搜索与强化学习。
基于大语言模型的AI代理需要高频状态探索(如测试时树搜索和强化学习),依赖快速的状态快照与回滚(C/R)机制,涵盖文件和进程状态(如内存、上下文等)。现有方法需完整复制整个状态,导致每次操作延迟达数百毫秒至秒级,严重制约深度搜索与大规模分支扩展。本文观察到AI代理后续快照间具有高度相似性,因此提出不应全量复制,而应仅复制连续快照间的差异(关键洞察)。然而,该想法因操作系统支持缺失而难以实现。本文提出新型操作系统层抽象——DeltaState,通过两个协同设计的系统机制实现基于变化的事务式快照与回滚。首先,DeltaFS通过分层组织文件状态,动态冻结可写层并插入新层,在快照时将文件更新转为写时复制,回滚只需切换层。其次,DeltaCR利用增量转储实现进程状态的变更式快照,并通过跳过传统流程直接从冻结模板进程fork(),加速回滚。由此构建的DeltaBox智能体沙盒实现了毫秒级的快照与回滚。在SWE-bench和强化学习微基准测试中,快照与回滚延迟分别为14ms和5ms,显著提升了固定时间预算下的节点探索能力。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。