Pro2Guard: Proactive Runtime Enforcement of LLM Agent Safety via Probabilistic Model Checking

Haoyu Wang, Christopher M. Poskitt, Jun Sun, Jiali Wei
8/1/2025
cs.AIcs.SE

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Large Language Model (LLM) agents demonstrate strong autonomy, but their stochastic behavior introduces unpredictable safety risks. Existing rule-based enforcement systems, such as AgentSpec, are reactive, intervening only when unsafe behavior is imminent or has occurred, lacking foresight for long-horizon dependencies. To overcome these limitations, we present a proactive runtime enforcement framework for LLM agents. The framework abstracts agent behaviors into symbolic states and learns a Discrete-Time Markov Chain (DTMC) from execution traces. At runtime, it predicts the probability of leading to undesired behaviors and intervenes before violations occur when the estimated risk exceeds a user-defined threshold. Designed to provide PAC-correctness guarantee, the framework achieves statistically reliable enforcement of agent safety. We evaluate the framework across two safety-critical domains: autonomous vehicles and embodied agents. It proactively enforces safety and maintains high task performance, outperforming existing methods.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2025proguard,
  title  = {Pro2Guard: Proactive Runtime Enforcement of LLM Agent Safety via Probabilistic Model Checking},
  author = {Haoyu Wang and Christopher M. Poskitt and Jun Sun and Jiali Wei},
  year   = {2025},
  eprint = {2508.00500},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.00500v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.00500.svg)](https://codeofpaper.com/paper/2508.00500)

Discussion