arXiv:2605.14237cs.AI2026-05

用一次记录+确定性重放,让AI任务成功率99%、节省99%算力。

Good to Go: The LOOP Skill Engine That Hits 99% Success and Slashes Token Usage by 99% via One-Shot Recording and Deterministic Replay

  • 首次运行时记录完整操作流程,生成无分支的确定性执行计划。
  • 后续执行无需调用大模型,任务成功率99%,令牌消耗降低99.98%。
  • 适合需要稳定重复执行的自动化任务,如定时数据采集、运维监控。

将AI代理用于重复性周期任务时面临核心矛盾:大语言模型(LLM)虽具备强大工具调度灵活性,但其固有的随机性导致不可预测失败,频繁调用更带来高昂的令牌开销。本文提出LOOP技能引擎,通过一次记录、确定性重放机制,在周期性任务中实现99%成功率与99%令牌消耗减少。首次执行时,代理以完整LLM推理运行任务,系统透明截获并记录完整的工具调用轨迹;随后采用贪心长度递减模板提取算法,将其转化为参数化的无分支循环技能——一种捕获任务功能意图的同时对时间依赖和结果依赖变量进行参数化处理的确定性执行方案。后续所有执行完全绕过LLM:引擎根据实时值解析模板变量并确定性重播工具序列。我们证明了两个定理:(1)重放确定性——经验证的循环技能在所有未来执行中步骤序列不变;(2)写入安全性——通过可重入锁与原子文件替换,实现对持久配置的并发访问串行化。在涵盖5分钟至24小时周期的基准任务测试中,该引擎使月度令牌消耗减少93.3%–99.98%,执行延迟降低8.7倍,并彻底消除输出非确定性。多层退化策略确保任务永不阻塞。该引擎已作为buddyMe开源代理框架的一部分发布。

原文摘要 · Abstract (English)

Deploying AI agents for repetitive periodic tasks exposes a critical tension: Large Language Models (LLMs) offer unmatched flexibility in tool orchestration, yet their inherent stochasticity causes unpredictable failures, and repeated invocations incur prohibitive token costs. We present the LOOP SKILL ENGINE, a system that achieves a combined 99% success rate and 99% token reduction for periodic agent tasks through a one-shot recording, deterministic replay paradigm. On its first run, the agent executes the task with full LLM reasoning while the system transparently intercepts and records the complete tool-call trajectory. A greedy length-descending template extraction algorithm then converts this recording into a parameterized, branch-free Loop Skill -- a deterministic execution plan that captures the task's functional intent while parameterizing time-dependent and result-dependent variables. All subsequent executions bypass the LLM entirely: the engine resolves template variables against real-time values and replays the tool sequence deterministically. We prove two theorems: (1) Replay Determinism -- the step sequence of a validated Loop Skill is invariant across all future executions; (2) Write Safety -- concurrent access to persistent configuration is serialized through reentrant locks and atomic file replacement. Across a benchmark of periodic agent tasks spanning intervals from 5 minutes to 24 hours, the Loop Skill Engine reduces monthly token consumption by 93.3%--99.98% and cuts execution latency by 8.7x while eliminating output non-determinism. A multi-layer degradation strategy guarantees that tasks never stall. We release the engine as part of the buddyMe open-source agent framework.

AI代理技能引擎确定性执行低耗高效

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。