解决长时运行AI代理的决策失效问题,精准识别关键状态变更
From Version Conflicts to Decision Conflicts: Selective Revalidation for Long-Running AI Agents
- 通过记录决策条件,只重验受影响的逻辑判断
- 在21万次测试中零误判,比全扫描快280倍
- 适合需要高可靠性的自动化流程系统
长时运行的AI代理在执行动作前可能经历长时间等待,其间初始状态可能已改变。标准乐观并发控制仅能检测状态变化,却无法判断该变化是否使原决策失效。我们提出ATR机制,显式记录并重验决定动作合法性的条件。当状态变更影响决策时,ATR可保留、刷新非关键元数据、要求重规划或阻断执行;通过目标端事务或比较并设置操作绑定验证状态。在15种变异场景下进行21万次受控执行,ATR实现开发者指定结果的完全匹配,无误允或误阻。在10个持久化SQLite检查点/恢复单元中,每变更仅需验证0.6个条件,远低于FullScan的6.0;在4093次读取中,ATR耗时9.3微秒,而FullScan为2595.9微秒。这些确定性结果证明了方案的可行性,但不保证生产通用性或条件自动提取能力。
原文摘要 · Abstract (English)
Long-running AI agents may read state, reason, wait for tools or human approval, and perform an external action much later. The state that justified the action can change in the meantime. For example, after an agent proposes an 80 GBP refund under a limit of 100, a customer-name change affects only presentation metadata, a new limit of 90 still permits the refund, a limit of 50 invalidates it, and a refund issued by another worker must prevent a duplicate. Standard optimistic concurrency control and version checks can detect that previously read state has changed, but by themselves do not determine whether that change invalidates the pending action's justification. We call any detected version change a version conflict; when that change invalidates the action's justification, it is also a decision conflict. ATR records the explicit, executable conditions that justify a pending action and rechecks only the conditions affected by a change before releasing the external operation. It can retain the action, refresh non-decisive metadata, require replanning, or block execution; a target-side transaction or compare-and-set binds checked state to commit. Across 210,000 controlled executions over 15 mutation cases, ATR matched every developer-specified outcome with no false allows or blocks. In ten durable SQLite checkpoint/resume cells, it evaluated 0.6 conditions per change versus 6.0 for FullScan. At 4,093 recorded reads, ATR took 9.3 microseconds versus 2595.9 microseconds for FullScan. These deterministic results establish controlled feasibility, not production generality or automatic extraction of the required conditions.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。