智能体技能形式化验证方法:面向可机械检查的能力包含证明的三层架构
Methods for Formal Verification of Agent Skills: Three Layers Toward a Mechanically Checkable Capability-Containment Proof
AI总结:
本文提出三层可组合方法(静态抽象解释、精炼类型系统、SMT有界模型检测),将智能体技能从声明或测试级别提升至形式化验证级别,实现机械可检查的能力包含证明。
摘要:
伴随论文引入了一个关于智能体技能清单的四级验证格(未验证、声明、测试、形式化),并将最高级别作为目标。本文填补了这一空白。我们给出了技能行为的精确语义,忠实于技能如何被LLM驱动的运行时(通过非确定性LLM侧可达的确定性脚本侧)消费,将验证问题表述为该语义上的能力包含属性,并提出了三种可组合方法,共同将技能从声明或测试级别提升至形式化级别:(1)通过在小效应格上的抽象解释,对脚本侧进行可靠静态能力包含分析;(2)一个用于工具调用封装的精炼类型系统,机械地拒绝任何静态推断能力不在清单声明集中的调用;(3)针对父论文的双条件正确性准则的SMT有界模型检测,其中边界选择使得任何符合运行时事务缓冲区视野的反例都作为具体轨迹呈现。我们证明了这三个层次组合起来能可靠地覆盖父论文的威胁模型,仅剩一个残余(LLM拒绝行动的自由),该残余由父论文的运行时双条件在会话边界捕获。这些方法重用现有的成熟工具(Z3、Semgrep、CodeQL、精炼类型检查器、机械化证明助手),而非要求操作者构建新工具,并且携带证明的工件扩展了现有的SKILL.md约定。所有三种方法以及捆绑生产者和重新检查器作为零依赖JavaScript模块在开源enclawed框架(https://github.com/metereconsulting/enclawed;项目页面https://www.enclawed.com/)中提供,包含53个单元测试和一个端到端CLI演示示例技能。
英文摘要:
The companion paper introduced a four-level verification lattice on agent-skill manifests (unverified, declared, tested, formal) and left the top level aspirational. This paper closes that gap. We give a precise semantics for skill behaviour faithful to how a skill is consumed by an LLM-driven runtime (a deterministic script-side reachable through a non-deterministic LLM-side), state the verification problem as a capability-containment property over that semantics, and present three composable methods that together raise a skill from declared or tested to formal: (1) sound static capability-containment analysis of the script-side via abstract interpretation over a small effect lattice; (2) a refinement type system for tool-call envelopes that mechanically rejects any call whose statically-inferred capability is not in the manifest's declared set; (3) SMT-bounded model checking against the parent paper's biconditional correctness criterion, with the bound chosen so any counter-example fitting the runtime's transaction-buffer horizon is exhibited as a concrete trace. We prove the three layers composed soundly cover the parent paper's threat model modulo a single residual (the LLM's freedom to refuse to act) that the parent paper's runtime biconditional catches at session boundary. The methods reuse existing well-engineered tools (Z3, Semgrep, CodeQL, refinement-type checkers, mechanised proof assistants) rather than asking operators to build new ones, and the proof-carrying artifact extends the existing SKILL.md convention. All three methods plus the bundle producer and re-checker ship as zero-dependency JavaScript modules in the open-source enclawed framework (https://github.com/metereconsulting/enclawed; project page https://www.enclawed.com/), with 53 unit tests and an end-to-end CLI demo on a sample skill.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。