aiqbench analysis
Sapien introduces a novel stateful policy engine that dynamically constrains autonomous AI agents by evaluating the context of previous actions, rather than relying on static tool allowlists. This approach significantly reduces attack success rates in hijacked scenarios while maintaining high utility for multi-step tasks, addressing critical safety gaps in long-horizon agent operations.
Sapien: A Stateful Policy Engine for Autonomous AI Agents
arXiv:2610.00797v1 Announce Type: new 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).
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).
Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Cryptography and Security (cs.CR)
arXiv:2610.00797 [cs.AI]
(or arXiv:2610.00797v1 [cs.AI] for this version)
https://doi.org/10.48550/arXiv.2610.00797 Focus to learn more arXiv-issued DOI via DataCite (pending registration)
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Full text under the publisher's open licence · 220 words
Related coverage

Forbes Asia 100 To Watch 2026
forbes.com · Aug 24, 2026

Presentation: Prompt to Prod: Engineering an Autonomous SDLC at Scale
InfoQ · Aug 24, 2026

[AINews] Opus 5.5 is good at explainer videos
Latent Space · Sep 29, 2026

Article: Multi-Agent AI for Production Security Operations: an A2A and MCP Architecture in a 5G Core
InfoQ · Jul 23, 2026