Skip to content
Preprint

LEANGUARD: Lean-Verified Guardrails for Tool-Using Agents

Nov 2026 · 0 citations · 39 references
Computer Science

TL;DR

LeanGuard, a runtime that checks every proposed tool call against a policy written in Lean4 before the call reaches the environment, is presented, a runtime that checks every proposed tool call against a policy written in Lean4 before the call reaches the environment.

Abstract

Tool-using language-model agents often execute actions that their domain policies forbid. We present LeanGuard, a runtime that checks every proposed tool call against a policy written in Lean4 before the call reaches the environment. Policies combine state predicates with scoped past-time temporal operators over the execution history, evaluation is fail-closed, and the decision procedure is proved equivalent to a LeanLTL semantics. A denied call can be corrected in two ways. With feedback, the agent receives the violated rule and a hint; with proof-guided repair, Lean metaprogramming searches for a nearby call that preserves the user's intent and proves that the policy admits it, without the model. On Tau-Bench with five Qwen models (0.8B-27B), unguarded agents execute at least 33 calls that the Lean policy forbids, while LeanGuard executes none; with feedback, task success does not change significantly. On DTap, LeanGuard reduces direct prompt-injection success from 57.9% to 5.9%, and in telecom, where benign tasks need no writes, benign success is unchanged. Feedback reduces repeated blocked calls and raises task success for four of five models over a bare denial. On replayed denials, repair proves an admissible edit for 88 of 252 denials caused by argument values, in a median of 2,ms.

View source

Similar papers

Preprint Nov 2026

EvoX: Rethinking the Agent Harness as a Runtime Policy

Large language model (LLM) agents increasingly interact with tools and environments, yet plausible model decisions do not always translate into successful execution due to tool-call mismatches, interrupted workflows, and unsupported completion claims. We present EvoX, a Rust-based, multi-model agent runtime guided by T...

Haoyang Zhang, Qu-Meng Sun, Xiao Zhang et al. · 0 citations
Book Open access Oct 2026

Formal Runtime Verification for Tool-Using LLM Agents: An Offline Same-Benchmark Study on AgentDojo and STAC

Results show that formal temporal monitoring adds value exactly when the trace exposes trustworthy history, and quantify how far current benchmarks are from that point and propose a twelve-field enforcement-ready trace schema.

Nikolaos Kekatos, Stylianos Basagiannis, Marinelio Chintri et al. · 3 citations · ⚡1
#artificial intelligence Preprint Nov 2026

Soteria: Formally Verified Planning with Runtime Enforcement for Safe LLM Agents

LLM agents that execute multi-step tool calls must satisfy two objectives simultaneously: completing the user's task (utility) and conforming to domain policies and correctness constraints (safety). These objectives are in tension -- blocking an unsafe action prevents a violation but can leave the agent stranded with n...

Mike He, Ankush Desai, Sharad Malik et al. · 0 citations
Open access Nov 2026

Execution-Guided Verification for Reliable Tool-Using Large Language Model Agents

Large language model (LLM) agents increasingly operate on real systems through tool calls, yet their behavior is stochastic: the same request may be resolved correctly in one run and incorrectly in the next, and erroneous write operations are costly to undo. This paper presents execution-guided verification (EGV), a tr...

Oliver Hargreaves, Sienna Patel, Callum Price et al. · 0 citations
#artificial intelligence Review Oct 2026

FORALL-LEAN-AGENT for Auditable Reasoning in Formal Mathematics and Software Verification

Coding agents increasingly automate Lean proof development, but successful compilation alone does not establish that a candidate proves the intended statement under acceptable assumptions. We present FORALL-LEAN-AGENT, a frontend-agnostic framework for auditable reasoning in formal mathematics and software verification...

Naing Oo Lwin · 0 citations
Preprint Nov 2026

guardscope: Measuring Which Actions Runtime Controls Check in LLM Agent Systems

Large-language model (LLM) agents execute actions on external systems through tool calls, and enterprises deploy runtime controls, such as agent gateways, to check this behavior in real time. However, a control can only evaluate the actions that cross the point where it is placed, and an agent can act through more path...

Kentaroh Toyoda, Alex Leung, U. Bhuvaneswari · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.