arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.19604cs.AI
收藏

形式技能:用于高效且准确LLM代理的可编程运行时技能

Formal Skill: Programmable Runtime Skills for Efficient and Accurate LLM Agents

FairyClaw

Xi Zhang, Meijun Gao, Yuntian Zhao, Xinyu Tan, Yilun Yao, Feiyu Wang, Yanshu Wang, Dingsiyi, Tong Yang

AI总结:

本文提出形式技能,一种用于LLM代理的可编程运行时技能抽象,通过JSON元数据和动作模式、可靠的Python执行器、受钩子控制的控制逻辑、形式技能路由和本地运行时状态,提高代理的效率和准确性。

摘要:

大型语言模型(LLM)代理越来越多地在真实工作空间中发挥作用,其中工具和技能决定了模型推理是否能够可靠地转化为行动。现有的技能仍然主要非正式:Markdown技能和指令包将过程编码为长自然语言文档,而函数调用、模型上下文协议(MCP)服务器和框架工具则结构化单个动作,但通常将工作流状态、政策执行和完成纪律排除在技能本身之外。我们引入了形式技能,一种运行时原生的抽象,它通过JSON元数据和动作模式、可靠的Python执行器、受钩子控制的控制逻辑、形式技能路由和本地运行时状态来表示可重用的能力。通过将可重用的过程从重复的提示文本中转移到可执行的状态机和钩子策略中,形式技能为代理提供了一个令牌高效且可执行的控制面。我们在FairyClaw中实现了该抽象,这是一个开源的事件驱动运行时,用于可执行、可观察和可组合的形式技能。在Harness-Bench上,FairyClaw获得了高度竞争的平均分数,同时使用显著更少的令牌,尤其在暴露形式技能作用的任务上表现尤为突出。

英文摘要:

Large Language Model (LLM) agents increasingly act inside real workspaces, where tools and skills determine whether model reasoning becomes reliable action. Existing skills remain largely informal: Markdown skills and instruction packs encode procedures as long natural-language documents, while function calling, Model Context Protocol (MCP) servers, and framework tools structure individual actions but usually leave workflow state, policy enforcement, and completion discipline outside the skill itself. We introduce Formal Skill, a runtime-native abstraction that represents reusable capability with JSON metadata and action schemas, reliable Python executors, hook-governed control logic, Formal Skill routing, and skill-local runtime state. By moving reusable procedure from repeated prompt text into executable state machines and hook policies, Formal Skill gives agents a token-efficient and enforceable control surface. We implement the abstraction in FairyClaw, an open-source event-driven runtime for executable, observable, and composable Formal Skills. On Harness-Bench, FairyClaw obtains highly competitive average scores while using substantially fewer tokens, with especially strong results on tasks that expose the role of Formal Skill.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑