Contextual Agent Security: A Policy for Every Purpose
Lillian Tsai, Eugene Bagdasarian
TL;DR
The paper tackles the problem of securing generalist agents whose actions must be judged within diverse contexts. It introduces Conseca, a framework that generates just-in-time, context-specific security policies using trusted context and a policy generator (LLMs) and enforces them deterministically to prevent contextually inappropriate actions. Key contributions include a modular design separating policy generation from enforcement, a prototype implementation on a Linux-based agent, and empirical case studies comparing Conseca to no-policy and static-policy baselines. The work demonstrates that contextual policies can achieve utility comparable to permissive baselines while improving security by denying actions that do not align with the current context and purpose. This approach offers a scalable direction for securing multi-purpose agents as they encounter broader and more nuanced contexts in real-world deployments.
Abstract
Judging an action's safety requires knowledge of the context in which the action takes place. To human agents who act in various contexts, this may seem obvious: performing an action such as email deletion may or may not be appropriate depending on the email's content, the goal (e.g., to erase sensitive emails or to clean up trash), and the type of email address (e.g., work or personal). Unlike people, computational systems have often had only limited agency in limited contexts. Thus, manually crafted policies and user confirmation (e.g., smartphone app permissions or network access control lists), while imperfect, have sufficed to restrict harmful actions. However, with the upcoming deployment of generalist agents that support a multitude of tasks (e.g., an automated personal assistant), we argue that we must rethink security designs to adapt to the scale of contexts and capabilities of these systems. As a first step, this paper explores contextual security in the domain of agents and proposes contextual agent security (Conseca), a framework to generate just-in-time, contextual, and human-verifiable security policies.
