Existing LLM agent frameworks lack formal semantics: there is no principled way to determine whether an agent configuration is well-formed or will terminate. We present $λ_A$, a typed lambda calculus for agent composition that extends the simply-typed lambda calculus with oracle calls, bounded fixpoints (the ReAct loop), probabilistic choice, and mutable environments. We prove type safety, termination of bounded fixpoints, and soundness of derived lint rules, with partial Coq mechanization (1,567 lines, 43 completed proofs). As a practical application, we derive a lint tool that detects structural configuration errors directly from the operational semantics. An evaluation on 835 real-world GitHub agent configurations shows that 94.1% are structurally incomplete under $λ_A$, with YAML-only lint precision at 54%, rising to 96--100% under joint YAML+Python AST analysis on 175 samples. This gap quantifies, for the first time, the degree of semantic entanglement between declarative configuration and imperative code in the agent ecosystem. We further show that five mainstream paradigms (LangGraph, CrewAI, AutoGen, OpenAI SDK, Dify) embed as typed $λ_A$ fragments, establishing $λ_A$ as a unifying calculus for LLM agent composition.


翻译:现有的LLM智能体框架缺乏形式化语义:缺少确定智能体配置是否结构良好或是否会终止的原则性方法。我们提出$λ_A$,一种用于智能体组合的类型化λ演算,它在简单类型λ演算基础上扩展了预言机调用、有界不动点(ReAct循环)、概率选择和可变环境。我们证明了类型安全性、有界不动点的终止性以及派生lint规则的正确性,并提供了部分Coq机械化实现(1567行代码,43个已完成证明)。作为实际应用,我们从操作语义中派生出一个lint工具,能够直接检测结构配置错误。对835个真实世界GitHub智能体配置的评估显示,在$λ_A$下94.1%的配置结构不完整,其中纯YAML的lint精确率为54%,而对175个样本进行YAML+Python AST联合分析时,精确率升至96-100%。这一差距首次量化了智能体生态系统中声明式配置与命令式代码之间的语义纠缠程度。我们进一步证明,五种主流范式(LangGraph、CrewAI、AutoGen、OpenAI SDK、Dify)可嵌入为类型化的$λ_A$片段,确立了$λ_A$作为LLM智能体组合的统一演算。

0
下载
关闭预览

相关内容

LLM/智能体作为数据分析师:综述
专知会员服务
38+阅读 · 2025年9月30日
【EPFL博士论文】大型语言模型时代的协作式智能体
专知会员服务
35+阅读 · 2025年5月16日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
【综述】多智能体强化学习算法理论研究
深度强化学习实验室
16+阅读 · 2020年9月9日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
PlaNet 简介:用于强化学习的深度规划网络
谷歌开发者
13+阅读 · 2019年3月16日
类脑计算的前沿论文,看我们推荐的这7篇
人工智能前沿讲习班
21+阅读 · 2019年1月7日
三次简化一张图:一招理解LSTM/GRU门控机制
机器之心
16+阅读 · 2018年12月18日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
23+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Arxiv
0+阅读 · 4月23日
VIP会员
最新内容
ICML2026 | 重新思考顺序知识编辑中的正则化
专知会员服务
0+阅读 · 今天15:44
《用于兵力发展选项优先排序的成本效益模型》
专知会员服务
4+阅读 · 今天15:43
AutoResearch AI综述:迈向AI驱动的科学发现自动化
《Palantir边缘人工智能》手册
专知会员服务
19+阅读 · 5月26日
美军“国防自主作战群”(DAWG)概念解析
专知会员服务
3+阅读 · 5月26日
“史诗怒火”行动中的无人机与反无人机作战
专知会员服务
15+阅读 · 5月25日
相关资讯
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
【综述】多智能体强化学习算法理论研究
深度强化学习实验室
16+阅读 · 2020年9月9日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
PlaNet 简介:用于强化学习的深度规划网络
谷歌开发者
13+阅读 · 2019年3月16日
类脑计算的前沿论文,看我们推荐的这7篇
人工智能前沿讲习班
21+阅读 · 2019年1月7日
三次简化一张图:一招理解LSTM/GRU门控机制
机器之心
16+阅读 · 2018年12月18日
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
23+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员