用可执行程序替代静态接口,让智能体更高效调用网页服务
Beyond Static Endpoints: Tool Programs as an Interface for Flexible Agentic Web Services

- 将工具调用封装为带效果类型的可执行程序,支持复杂流程
- 端到端延迟降低53.4%,客户端流量减少96.1%
- 适合高延迟、复杂流程的智能体应用,如自动化任务
在智能体网络时代,基于大模型的智能体越来越多地调用网页服务作为工具,但大多数接口仍是无法表达长周期工作流的静态端点,缺乏对循环、条件判断、连接和重试等结构的支持。本文提出 ToolPro,将智能体的工具意图表示为可执行的工具程序,紧凑编码多步服务交互,并明确标注操作类型。ToolPro结合约束引导的程序生成、感知效果的精确重放机制(确保状态修改操作仅执行一次),以及基于性能画像的策略决策,判断何时使用程序执行优于逐步调用。我们在支持 MCP 风格的服务上实现 ToolPro,采用 WebAssembly沙箱隔离,评估了多种真实应用场景的工作流。实验表明,ToolPro 在高网络延迟和复杂工作流下表现更优,端到端延迟最高降低 53.4%,客户端流量最高减少 96.1%。
原文摘要 · Abstract (English)
In the agentic web era, LLM-based agents increasingly invoke web services as tools, yet most interfaces remain \emph{static endpoints} that poorly express long-horizon workflows with loops, conditionals, joins, and retries. We present ToolPro, which represents an agent's tool intent as an \emph{executable tool program} that compactly encodes multi-step service interactions with explicit effect types. ToolPro combines constraint-guided program construction, effect-aware replay for exactly-once state-modifying calls, and a profile-driven policy that decides when program execution outperforms stepwise calling. We instantiate ToolPro over MCP-style services with WebAssembly sandboxing and evaluate it on diverse workflows of real-world applications. ToolPro reduces end-to-end latency by up to 53.4\% and client-side traffic by up to 96.1\%, with larger gains under higher network latency and workflow complexity.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。