arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.24747cs.AIcs.MA
收藏

智能体工具协议的形式语义:一种进程演算方法

Formal Semantics for Agentic Tool Protocols: A Process Calculus Approach

Swiss Federal Railways (SBB)(瑞士联邦铁路公司)

Andreas Schlapbach

AI总结:

本文通过进程演算形式化两种智能体工具协议(SGD和MCP),证明它们在映射Phi下结构互模拟,但反向映射有损,进而提出MCP+扩展实现完全等价。

摘要:

能够调用外部工具的大型语言模型智能体的出现,催生了对智能体协议进行形式验证的迫切需求。两个范式主导了这一领域:Schema-Guided Dialogue (SGD),一个用于零样本API泛化的研究框架,以及Model Context Protocol (MCP),一个用于智能体-工具集成的行业标准。虽然两者都通过模式描述实现动态服务发现,但它们的形式关系仍未探索。基于先前建立这些范式概念趋同的工作,我们提出了SGD和MCP的第一个进程演算形式化,证明它们在定义良好的映射Phi下结构互模拟。然而,我们证明反向映射Phi^{-1}是部分且有损的,揭示了MCP表达性的关键缺陷。通过双向分析,我们识别出五个原则——语义完备性、显式动作边界、失败模式文档、渐进式披露兼容性和工具间关系声明——作为完全行为等价的充分必要条件。我们将这些原则形式化为类型系统扩展MCP+,证明MCP+与SGD同构。我们的工作为经过验证的智能体系统提供了第一个形式基础,并将模式质量确立为可证明的安全属性。

英文摘要:

The emergence of large language model agents capable of invoking external tools has created urgent need for formal verification of agent protocols. Two paradigms dominate this space: Schema-Guided Dialogue (SGD), a research framework for zero-shot API generalization, and the Model Context Protocol (MCP), an industry standard for agent-tool integration. While both enable dynamic service discovery through schema descriptions, their formal relationship remains unexplored. We present the first process calculus formalization of SGD and MCP, proving they are structurally bisimilar under a well-defined mapping Phi. We demonstrate that the reverse mapping Phi-1 is partial and lossy, revealing critical gaps in MCP's expressivity. Through bidirectional analysis, we identify four principles - semantic completeness, explicit action boundaries, failure mode documentation, and inter-tool relationship declaration -- as necessary and sufficient conditions for full behavioral equivalence. We formalize these principles as type-system extensions MCP+, proving MCP+ is fully equivalent to SGD. Our work provides the first formal foundation for verified agent systems and establishes schema quality as a provable safety property. Practically, this means that the current MCP specification has expressiveness gaps compared to SGD and would benefit from the proposed extensions.

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

↑