让智能体技能库更小更快,还能保持可执行和可扩展。
SkillZip: Contract-Preserving Graph Compression for Scalable Agent Skill Libraries

- 将技能拆成可复用的图单元,压缩时保留接口和依赖关系。
- 压缩比达3.46倍,依赖保留99.2%,验证可达性98.7%。
- 适合构建可扩展、易更新的大规模智能体技能库。
大型语言模型日益作为智能体使用,其过程知识以可重用的技能包形式存储并在推理时加载。随着技能库规模扩大,核心挑战在于在有限上下文预算下暴露最小必要可执行上下文。现有系统难以在整技能以下级别复用代码,压缩时无法保持过程契约,且压缩后的代码往往不可执行或不可扩展,也无法随技能演进而更新。这暴露出单位不匹配问题:技能以包为单位检索,以文本形式压缩,仅在检索后才转换为执行图,但可靠复用需要具备契约保障的过程单元。我们提出 SkillZip,一种面向执行感知的程序抽象框架,对段级图进行契约保持压缩。SkillZip 将重复出现的合法契约模式重写为可逆的端口宏,同时保留边界签名、依赖闭包、验证器可达性和源码级可扩展性。推理时,它生成紧凑且依赖闭包的上下文,仅在需要时展开宏。ReZip 还能通过执行证据整合新技能并修正风险宏。在技术与具身智能体基准上的全面实验显示,SkillZip 比最强基线最高提升12.2分,压缩比达3.46倍,依赖保留率99.2%,验证器可达性98.7%。缩放分析进一步证实其在200至10万技能规模库中均具鲁棒检索能力。
原文摘要 · Abstract (English)
Large Language Models (LLMs) increasingly act as agents whose procedural knowledge is stored in reusable skill packages and loaded at inference time. As skill libraries grow, a central challenge is to expose the smallest sufficient executable context under a limited context budget. Existing systems struggle to reuse routines below the whole-skill level, preserve procedural contracts during compression, keep compressed routines executable and expandable, and update the compressed library as skills evolve. These challenges reveal a unit mismatch: skills are retrieved as packages, compressed as text, and converted into execution graphs only after retrieval, whereas reliable reuse requires a contract-bearing procedural unit. We propose SkillZip, an execution-aware procedural abstraction framework that performs contract-preserving compression over section-level graphs. SkillZip rewrites recurring contract-valid motifs into reversible ported macros while preserving boundary signatures, dependency closure, verifier reachability, and source-level expansion. At inference time, it hydrates a compact, dependency-closed context and expands macros only when required. ReZip further integrates new skills and revises risky macros using execution evidence. Comprehensive experiments1 on technical and embodied agent benchmarks show SkillZip consistently outperforms the strongest baseline by up to 12.2 points, while achieving a 3.46x compression ratio with 99.2% dependency preservation and 98.7% verifier reachability. Scaling analyses further confirm robust retrieval across skill libraries ranging from 200 to 100K skills.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。