arXiv(opens in a new tab)cs.CRAug 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2608.22868

AgentFlow: A Flow-Centric Policy Language and Framework for Securing LLM Agent Systems

Basavesh Ammanaghatta Shivakumar, Swarn Priya, Peng Gao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

LLM agents increasingly read untrusted content, invoke external tools, access private data, and delegate work to other agents. In these systems, harm often comes not only from obviously dangerous tool calls, but from how data moves through a sequence of otherwise plausible actions. A confidential record summarized by an LLM and then sent in an outgoing email can violate policy even if each step appears locally legitimate. In this technical report, we present AGENTFLOW, a flow-centric policy language and enforcement model for specifying where data may travel through an agent system. AGENTFLOW expresses policies over labeled runtime edges: which tools may receive sensitive fields, which sinks may receive released data, and what authority may cross delegation boundaries. The language supports flow and path rules, task-scoped capabilities, controlled release, and stateful taint semantics. A runtime reference monitor enforces these policies on mediated actions. We give a formal model for AGENTFLOW and a bounded SMT-based verifier for a structured policy fragment. In our prototype evaluation, the verifier catches all seeded unsafe policy variants in our study, and seven safety properties verify in under 0.5 seconds each. On 949 AgentDojo injected test cases across four suites, AGENTFLOW reduces confirmed compromise from 33.0% to 0.0% while improving aggregate utility from 46.7% to 63.3%. On a 200-case AgentDyn DAILYLIFE stress test, it reduces confirmed compromise from 73.5% to 0.0% while preserving near-baseline utility (44.5% to 43.5%). Breadth checks across ASB, InjecAgent, BIPIA, AgentHarm, and MCPTox-style replays suggest that the configured policies block the benchmark-specified policy-visible attacker flows; in ASB's upstream direct-prompt-injection harness, attack success is 0/1,200. These results are preliminary and are scoped to the modeled policy-visible agent behaviors and the evaluated benchmarks.

1 Introduction

LLM-based agent systems now routinely plan, invoke tools, and interact with external services on a user's behalf [1, 2, 3]. This delegated authority makes agent failures qualitatively different from ordinary access-control mistakes: the dangerous behavior often emerges across a sequence of plausible steps [4].

Consider a customer-support agent with access to a user database and an email tool. Reading a customer's record is legitimate. Sending email is legitimate. Reading a customer's Social Security number and sending it to an external address is data exfiltration. Indirect prompt injection makes this pattern especially risky: an attacker-controlled web page, email, document, or tool output can instruct the agent to combine private reads with external writes that the user never intended [5, 6]. Similar failures arise when untrusted content is treated as an internal directive, when a high-privilege agent delegates sensitive context to a weaker sub-agent, or when reconnaissance is followed by targeted exfiltration [7, 6].

Policy requirement. Request-level authorization languages such as CEDAR [8] are well suited to deciding whether a principal may perform an action on a resource. Agent systems need that check, but also need to remember where data came from, how it was transformed, and which later actions it may influence. Request-level authorization does not provide this end-to-end data-flow state by itself. This paper introduces a policy layer for specifying when sensitive or untrusted content may influence later tool calls, response sinks, and delegation steps.

Recent defenses address parts of this problem. Progent [9] controls tool privileges; SEAgent [7] studies privilege escalation through delegation; AgentArmor [10] analyzes runtime traces; and Conseca [11] generates contextual task policies. Concurrent systems such as FORGE [12], FIDES [13], CaMeL [14], and SAMOS [15] explore related enforcement designs. These systems improve agent safety, but they make different design choices about where policies live and how they are checked.

The goal of this paper is not to claim that information-flow control or reference monitoring is new. Rather, AGENTFLOW asks how to make these ideas usable as an explicit policy layer for modern agent deployments, where the operator may not control the agent architecture, tools are registered dynamically, and security decisions must account for tool calls, delegated sub-agents, response sinks, and multi-step histories. This leads to a different interface from architecture-specific defenses: policies are written over labeled runtime edges and checked both during execution and, for a bounded fragment, before deployment. This report is intentionally scoped to policy-visible mediated agent behaviors: the reference monitor enforces the configured policy interface for tool calls, delegated actions, and modeled response sinks, and the bounded verifier checks safety properties for the structured policy fragment. It does not claim to solve every unsafe LLM behavior or every agentic failure mode.

AGENTFLOW overview. We present AGENTFLOW, a flow-centric policy language and framework for securing LLM agent systems. AGENTFLOW enforces data-flow and path constraints over agent executions through a runtime monitor and pre-deployment checks. The framework is organized around three ideas:

  1. Flow rules for agent actions. Several recurring agent security requirements can be stated as constraints on labeled execution edges: which tools may receive sensitive fields, which sinks may receive released data, and what authority may cross a delegation boundary. Unlike defenses tied to a specific agent architecture, AGENTFLOW exposes these checks as declarative rules over tool calls, response sinks, and delegation steps.

  2. A multi-dimensional label lattice. Every data node is annotated with sensitivity, category, and trust metadata. The dimensions serve different purposes: sensitivity controls disclosure, category distinguishes fields such as email addresses from SSNs or credentials, and trust records whether content came from an untrusted source. This lets policies distinguish, for example, public-but-untrusted web text from trusted-but-confidential customer data. Labels are propagated through agent and tool operations using formally defined transfer functions.

  3. Path rules for history-aware security. In addition to single-hop flow constraints, AGENTFLOW supports path rules that reason about multi-step behavior. Path rules can be evaluated over lineage-connected paths by default or over broader session-scoped histories when explicitly requested. This supports policies that require sanitization before external release, prevent reconnaissance-then-exfiltration patterns, or bound delegation depth, which are difficult to express with request-level tool permissions alone.

Contributions: This paper makes the following contributions:

  • We define a threat model for common agent attack surfaces: indirect prompt injection, malicious tool providers, and compromised sub-agents. We scope the model around policy-visible flows, which lets us state both the attacks AGENTFLOW targets and non-goals such as jailbreaks, hallucinations, covert channels, and unmediated tool bugs ( §3§3).

  • We design AGENTFLOW, a policy language for LLM agents with tool calls, delegation, and response sinks. AGENTFLOW expresses security requirements using flow rules for individual execution edges and path rules for multi-step histories over labeled agent executions ( §4§4).

  • We present a formal model of AGENTFLOW, including a multi-dimensional label lattice, an append-only provenance graph, execution traces, tool propagation functions, and a small-step operational semantics. We prove that the runtime preserves well-formedness and enforces the stated security goals for mediated traces ( §5§5).

  • We develop an SMT-based verifier for the bounded, structured policy fragment used for pre-deployment checking. The verifier checks safety properties, including non-leakage, privilege-escalation resistance, trust-preserving flows, delegation safety, and taint monotonicity, or produces counterexample traces.

  • We implement an AGENTFLOW prototype consisting of a policy compiler, runtime engine, and verifier. We present preliminary evaluation evidence on AgentDojo [16] (949 injected cases across four task suites), AgentDyn [17] (200 dynamic DAILYLIFE cases), and replay-based evaluations on ASB [18], InjecAgent [19], BIPIA [20], AgentHarm [21], and MCPTox [22]. Under the evaluated policies, AGENTFLOW reduces confirmed compromise to 0.0% on AgentDojo and AgentDyn, blocks the benchmark-specified policy-visible attacker flows in the replay evaluations, verifies seven safety properties in under 0.5 seconds each, and detects all 12 seeded unsafe policy variants in our study. These results are best understood as initial evidence for the modeled policy fragment and enforcement interface, not as a complete characterization of all agentic failure modes ( §8§8).

Figure 1 presents the system overview. AGENTFLOW interposes a runtime policy engine between the LLM agent and its tools. The runtime checks each tool call against declarative flow and path rules before execution. A separate SMT-based verifier checks safety properties over a bounded abstraction before deployment.

References (61)