arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.16200cs.AI

人工智能代理系统的确定性重放

Deterministic Replay for AI Agent Systems

Rasheed Mudasiru

AI总结:

研究人工智能代理系统不确定性问题,提出agrepl框架,通过MITM代理拦截外部交互并序列化,在隔离环境重放,形式化执行模型,经实验验证重放保真度高且延迟大幅降低,以Go实现并开源。

AI中文摘要:

将大语言模型(LLMs)与外部工具和应用程序编程接口(APIs)相结合的人工智能代理系统本质上是不确定的:LLM采样方差、外部API状态、内容分发网络(CDN)基础设施头和执行环境噪声共同阻止任何先前的代理运行被忠实地重新执行。现有的可观测性平台捕获执行日志,但无法单独重现一次运行。我们提出了agrepl,这是一个面向开发者的用于代理执行确定性重放的命令行界面(CLI)框架。agrepl通过中间人(MITM)代理在传输层拦截所有外部交互,将它们序列化为结构化执行跟踪,并在一个严格隔离且无出站网络访问的环境中重放。我们形式化了代理执行模型,定义了请求键匹配函数K(s),并证明了确定性不变性。我们引入了一种噪声感知差异算法,将HTTP头差异分为信号和噪声层。对五个工作负载(n = 250个重放实例)的实证评估表明重放保真度F = 1.0,每步延迟中位数减少了98.3%。agrepl用Go语言实现,作为单个静态二进制文件发布,并在MIT许可下发布。关键词:人工智能代理、确定性重放、LLM调试、可重复性、MITM代理、执行跟踪、记录/重放系统。

英文摘要:

AI agent systems that couple large language models (LLMs) with external tools and APIs are inherently non-deterministic: LLM sampling variance, external API state, CDN infrastructure headers, and execution-environment noise collectively prevent any prior agent run from being faithfully re-executed. Existing observability platforms capture execution logs but cannot reproduce a run in isolation. We present agrepl, a developer-first CLI framework for deterministic replay of agent executions. agrepl intercepts all external interactions at the transport layer via a man-in-the-middle (MITM) proxy, serialises them as structured execution traces, and replays them in a strictly isolated environment with zero outbound network access. We formalise the agent execution model, define the request-key matching function K(s), and prove the determinism invariant. We introduce a noise-aware diff algorithm classifying HTTP header divergence into signal and noise tiers. Empirical evaluation across five workloads (n = 250 replay instances) demonstrates replay fidelity F = 1.0 and a median per-step latency reduction of 98.3%. agrepl is implemented in Go, ships as a single static binary, and is released under the MIT licence. Keywords: AI agents, deterministic replay, LLM debugging, reproducibility, MITM proxy, execution tracing, record/replay systems.

补充信息

↑