ChatPaper.aiChatPaper

SkillZip:面向可扩展智能体技能库的契约保持图压缩

SkillZip: Contract-Preserving Graph Compression for Scalable Agent Skill Libraries

August 6, 2026
作者: Xingyu Tan, Xiaoyang Wang, Qing Liu, Xiwei Xu, Xin Yuan, Liming Zhu, Wenjie Zhang
cs.AI

摘要

大语言模型(LLMs)越来越多地充当智能体,其程序性知识以可复用的技能包形式存储,并在推理时加载。随着技能库的不断增长,一个核心挑战是在有限的上下文预算下暴露最小且充分的可执行上下文。现有系统难以复用整体技能级别以下的例程、在压缩期间保持程序性契约、保持压缩例程的可执行性和可扩展性,以及随技能演进更新压缩后的技能库。这些挑战揭示了单元错配问题:技能以包的形式被检索、以文本形式被压缩,并仅在检索之后才转换为执行图,而可靠的复用需要承载契约的程序性单元。为此,我们提出 SkillZip,一种具有执行感知能力的程序性抽象框架,在节级图上执行保持契约的压缩。SkillZip 将重复出现的契约有效模式重写为可逆的移植宏,同时保持边界签名、依赖闭包、验证器可达性和源码级展开。在推理时,它仅激活紧凑且依赖封闭的上下文,并在需要时展开宏。ReZip 进一步集成新技能,并利用执行证据修正有风险的宏。在技术类和具身智能体基准上的综合实验¹表明,SkillZip 始终优于最强基线,最高领先 12.2 个点,同时实现 3.46 倍的压缩率、99.2% 的依赖保持率和 98.7% 的验证器可达率。扩展性分析进一步证实,SkillZip 在 200 至 10 万个技能规模的技能库范围内均能实现稳健的检索。
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.