The LLMbda Calculus: AI Agents, Conversations, and Information Flow
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
Large language models are increasingly deployed as agents: they plan, call tools, read untrusted data, and act on the results. This exposes them to prompt injection: data meant only to be read is obeyed as an instruction. The most principled defences replace content inspection with provenance: classifying data by source and keeping trusted and untrusted apart through a separation of duty (the dual-LLM pattern) and information-flow control. Yet the leading systems are hard to fully trust: flow tracking is easy to get wrong, deliberate relaxations are hard to audit, and the dual-LLM pattern is hard-wired into the architecture. We present LLMbda, an untyped call-by-value lambda calculus that makes provenance-based defence both expressible and provably sound, without committing to an architecture. It adds the operational core of agentic systems as first-class constructs: prompt-response conversations that can be forked and cleared, code generation, and dynamic information-flow control in which every value carries a label that every reduction propagates. Isolation becomes a policy a program expresses, and reclassification an explicit, auditable construct. Our central result is a termination-insensitive probabilistic noninterference theorem over the whole calculus, including code-generating agents, with an insulated variant that holds even when the attacker chooses all untrusted inputs. The verified interpreter is itself the harness that calls the model, to our knowledge the first LLM agent harness whose executable is the subject of machine-checked security theorems, so every agent inherits the guarantee. On the AgentDojo banking benchmark, an agent built within LLMbda, enforcement always on, matches the utility of CaMeL, a leading dual-LLM defence, run without its policy checks (which halve its utility), and resists all but two of 1296 attacked runs. Our harness and all proofs are in Lean.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 20 of its 58 references that are in the map. First posted on arXiv 23 Feb 2026.
Builds on
20 of 58 references.
Closest ancestors · 3
Same direction, newest first
- 2025Defeating Prompt Injections by Design24 Mar
- 2025Prompt Flow Integrity to Prevent Privilege Escalation in LLM Agents17 Mar
- 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents21 Dec
Other references · 17
- 2017Attention Is All You Needcited by 59,932
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
- 2024Defending Against Indirect Prompt Injection Attacks With Spotlightingcited by 233
- 2025Securing AI Agents with Information-Flow Controlcited by 108
- 2024System-Level Defense against Indirect Prompt Injection Attacks: An Information Flow Control Perspectivecited by 91
- 2025ACE: A Security Architecture for LLM-Integrated App Systemscited by 52
5 more
- 2015A Lambda-Calculus Foundation for Universal Probabilistic Programmingcited by 12
- 2024Opportunistically Parallel Lambda Calculuscited by 5
- 2025Quasar: A Programming Language Specialized for LLM Code Actionscited by 4
- 2015On Dynamic Flow-Sensitive Floating-Label Systemscited by 2
- 2015Generalizing Permissive-Upgrade in Dynamic Information Flow Analysiscited by 1
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2026From Agent Traces to Trust: A Survey of Evidence Tracing and Execution Provenance in LLM Agents
- 2026Ghost in the Agent: Redefining Information Flow Tracking for LLM Agents
- 2026Securing LLM Agents Need Intent-to-Execution Integrity
- 2025Trustworthy AI in the Agentic Lakehouse: from Concurrency to Governance
- 2024The Fusion of Large Language Models and Formal Methods for Trustworthy AI Agents: A Roadmap
- 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluation
- 2025Safe, Untrusted, "Proof-Carrying" AI Agents: toward the agentic lakehouse
- 2026Formal Verification of Agentic Systems over Operational Data