SkCC:面向跨框架LLM代理的可移植且安全的技能编译
SkCC: Portable and Secure Skill Compilation for Cross-Framework LLM Agents
AI总结:
针对LLM代理技能在不同框架间缺乏可移植性和安全性的问题,提出SkCC编译器,通过强类型中间表示SkIR解耦语义与格式,实现跨框架部署,并内置静态优化器强制执行安全约束,显著提升性能并降低适配复杂度。
摘要:
LLM代理越来越依赖可重用技能(例如SKILL markdown文件)来执行复杂任务,但这些工件缺乏可移植性:代理框架对提示格式高度敏感,导致同一技能的性能差异很大。然而,大多数技能以格式无关的Markdown形式一次性编写,需要昂贵的逐框架重写,并且安全性在很大程度上未得到解决,实践中存在广泛漏洞。为解决这些问题,我们提出SkCC,一个LLM代理编译器,将经典编译设计引入代理技能开发。SkCC以SkIR为核心,这是一种强类型中间表示,将技能语义与框架特定格式解耦,从而支持跨代理框架的可移植部署。在此IR之上,静态优化器强制执行安全约束,在部署前阻止漏洞。作为四阶段流水线实现,SkCC有效将跨$m$个技能和$n$个框架的适配复杂度从$O(m \times n)$降低到$O(m + n)$。在SkillsBench上的实验表明,SkCC相比原始版本带来一致且显著的性能提升,在Claude Code上通过率从21.1%提高到33.3%,在Kimi CLI上从35.1%提高到48.7%。此外,该设计实现了低于10ms的编译延迟、94.8%的主动安全触发率以及跨框架10-46%的运行时token节省。
英文摘要:
LLM agents increasingly rely on reusable skills (e.g., SKILL markdown files) to execute complex tasks, yet these artifacts lack portability: agent frameworks are highly sensitive to prompt formatting, leading to a large performance variation for the same skill. Nevertheless, most skills are authored once as format-agnostic Markdown, necessitating costly per-framework rewrites and also leaving security largely unaddressed, with widespread vulnerabilities in practice. To address this, we present SkCC, a compiler for LLM agents that introduces classical compilation design into agent skill development. SkCC centers on SkIR, a strongly-typed intermediate representation that decouples skill semantics from framework-specific formatting, thus enabling portable deployment across agent frameworks. Atop of this IR, a static Optimizer enforces security constraints, blocking vulnerabilities before deployment. Implemented as a four-phase pipeline, SkCC effectively reduces adaptation complexity from $O(m \times n)$ to $O(m + n)$ across $m$ skills and $n$ frameworks. Experiments on SkillsBench demonstrate that SkCC delivers consistent and substantial gains over original counterparts, with pass rate increases from 21.1% to 33.3% on Claude Code and from 35.1% to 48.7% on Kimi CLI. Further, the design achieves sub-10ms compilation latency, 94.8% proactive security trigger rate, and 10-46% runtime token savings across frameworks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。