Sapien: A Stateful Policy Engine for Autonomous AI Agents
Corinn Tiffany, Wen Zhang, Eugene Bagdasarian, Lillian Tsai
Abstract
Contextual security defenses prevent AI agents from taking rogue actions by synthesizing a task-specific policy and enforcing it on the agent's tool calls. In multi-step tasks, however, which actions are valid often depends on what the agent has already done and learned. We present Sapien, a policy engine for enforcing stateful contextual policies. A Sapien policy specifies permitted tool-call sequences using a regular expression extended with stateful predicates, deferred policy generation, and scoped semantic checks. We show that Sapien stays within a few percent of an unconstrained agent's utility. Even if the agent is fully hijacked, Sapien's policies rule out 93-95% of attacks on AgentDojo and 62-85% on Toolathlon (twice as many as tool allowlists on long-horizon tasks).
Create a lesson
Related papers
Can Language Models Play the Wikipedia Game?
Alexander Hickey, Joanna Knight, James Bishop
RATED: Reliability-Aware AI Agent Tool Retrieval via Execution Dynamics
Weiliang Chen, Song Liao
X-AgentRed: Red-Teaming Personal Agents in Evolving Multi-Service Ecosystems
Yeonsung Jung, Zhiyuan Wang, Zifan Wang et al.
Studying Comics at Scale with Artificial Intelligence: The PAGE Framework and Three Studies of American Comics and Japanese Manga
Emilio Ferrara
UkrMeme: Multimodal Explainable Persuasion Detection in Ukrainian Memes
Nazar Andrushko, Vera Schmitt, Veronika Solopova
A Privileged Teacher That Only Scores Cannot Search: Critique-Conditioned On-Policy Self-Distillation for Reasoning
Mayug Maniparambil, Ayush Rai, Ekansh Verma et al.