λA: A Typed Lambda Calculus for LLM Agent Composition
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
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 full Coq mechanization (1,519 lines, 42 theorems, 0 Admitted). 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.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 5 of its 25 references that are in the map. First posted on arXiv 13 Apr 2026.
Builds on
5 of 25 references.
Closest ancestors · 2
Same direction, newest first
- 2026Agentics 2.0: Logical Transduction Algebra for Agentic Data Workflows4 Mar
- 2025Agint: Agentic Graph Compilation for Software Engineering Agents24 Nov
Other references · 3
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Harness Engineering as Categorical Architecturecited by 2
- 2026Harness Engineering as Categorical Architecture12 May 2026
Similar, not cited
Close in wording, no citation either way
- 2026Formal Verification of Agentic Systems over Operational Data
- 2026LACUNA: Safe Agents as Recursive Program Holes
- 2026Toward Formalizing LLM-Based Agent Designs through Structural Context Modeling and Semantic Dynamics Analysis
- 2025TypePilot: Leveraging the Scala Type System for Secure LLM-generated Code
- 2026Formal Semantics for Agentic Tool Protocols: A Process Calculus Approach
- 2026Agentic Separation Logic Specification Synthesis
- 2026Turn: A Language for Agentic Computation
- 2026Verification as an Architectural Layer for LLM Agents: A V-Model Design, and a Pilot Study of Its Deterministic Core