发表机构
Cornell University; Microsoft Research Cambridge(康奈尔大学; 微软研究院剑桥分院)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
本研究提出以子代理方式执行技能包,相比加载指令到上下文,能更好解决长时程任务,但需权衡通信开销。
AI 中文摘要
语言模型代理如何有效利用可复用知识库来解决长时程任务?近期工作日益聚焦于代理技能:以技能包形式表示的可复用能力,即包含指令、脚本和其他资源的多文件捆绑包,帮助代理执行特定任务。代理技能通常通过将技能指令加载到代理的上下文中并依赖代理遵循这些指令来执行。然而,随着任务时程增长,这种方法变得越来越脆弱,因为随着上下文窗口中信息积累,推理质量会下降。我们研究了一种替代方法,即技能包被作为子代理来调用。子代理执行不是将技能指令加载到主上下文中,而是生成专门用于解决单个子任务的全新上下文窗口。我们表明,当技能包暴露清晰的输入-输出契约且其指令编码了履行这些契约所需的程序性知识时,子代理执行优于代理技能执行。代价是额外的通信开销,因为需要额外的令牌来协调主代理及其子代理。我们的结果表明,可复用知识的好处不仅取决于其内容,还取决于其组织和调用方式。
英文摘要
How can language model agents effectively leverage libraries of reusable knowledge to solve long-horizon tasks? Recent work has increasingly focused on agent skills: reusable capabilities represented as skill packages, i.e., multi-file bundles containing instructions, scripts, and other resources that help agents perform specific tasks. Agent skills are typically executed by loading their skill instructions into an agent's context and relying on the agent to follow them. As task horizons grow, however, this approach becomes increasingly brittle, because reasoning quality degrades as more information accumulates in the context window. We investigate an alternative approach in which skill packages are instead invoked as subagents. Rather than loading skill instructions into the main context, subagent execution spawns fresh context windows dedicated to solving individual subtasks. We show that subagent execution outperforms agent-skill execution when skill packages expose clear input-output contracts and their instructions encode the procedural knowledge needed to fulfill those contracts. The tradeoff is additional communication overhead, as extra tokens are required to coordinate between the main agent and its subagents. Our results show that the benefit of reusable knowledge depends not only on its content, but also on how it is organized and invoked.