ASEval: Automated Trajectory-Level Security Testing for Autonomous Agents

Jianan Ma, Xiaohu Du, Ruixiao Lin, Yaoxiang Bian, Jialuo Chen, Yunhao Feng, Xiaofang Yang, Shiwen Cui, Changhua Meng, Xinhao Deng, Jingyi Wang, Zhen WangarXiv 2026

TL;DR

As LLM-based autonomous agents transition from simple chatbots to systems with deep OS-level privileges, traditional prompt-level safety testing is no longer enough. This paper introduces ASEval, the first automated framework for trajectory-level security testing that evaluates full multi-turn execution traces. By using agent-specific perturbation operators, ASEval exposes critical vulnerabilities that standard safety evaluations completely miss.

What Problem Does This Paper Address?

Traditional LLM safety testing operates under a simple paradigm: input a prompt, evaluate the textual response. However, autonomous agents (like OpenClaw) do much more than generate text—they execute shell commands, modify file systems, use APIs, and maintain persistent state across sessions.

This expanded capability creates a massive security blind spot. A harmful objective might not be visible in any single prompt or response; instead, it can materialize across a sequence of actions, tool calls, and environmental changes. Existing agent security benchmarks are often hand-crafted, low-scale, or rely on simulated, stateless environments. The authors introduce ASEval to bridge this gap by automating the generation and execution of realistic, multi-turn, trajectory-level security tests in real environments.

Methods

ASEval shifts the unit of security testing from the prompt level to the execution trajectory. The automated pipeline consists of three main stages:

  1. Seed Generation: Generating realistic, benign multi-turn workflows across various real-world scenarios.
  2. Seed Curation: Filtering out defective or unrealistic workflows and ensuring the workspace can be properly initialized.
  3. Test Perturbation: Mutating benign seeds into security test cases using an injection LLM guided by specific operators.
Fig. 1: Automated test case synthesis pipeline: seed generation, curation, and payload injection.

The core innovation lies in the Agent-Specific Perturbation Operators, which exploit the unique architecture of autonomous agents across three dimensions:

  • Cross-turn Fragmentation (Temporal): Splitting a malicious payload across multiple turns so that each individual turn appears completely benign to per-turn safety filters.
  • Detection-scope Evasion (Spatial): Planting payloads directly into workspace artifacts (like a README.md or configuration file) that the agent reads via tools, bypassing direct prompt inspection.
  • Benign-context Concealment (Semantic): Weaving a dangerous step into an otherwise legitimate workflow or using ambiguous requests that cause the agent to default to harmful compliance.

Finally, instead of just reading the final text response, ASEval uses an Action-Grounded Oracle to inspect the entire execution trace—including tool calls and environment feedback—to determine if a security risk was actually triggered.

Datasets

The authors instantiated ASEval to construct A3S-Bench, a comprehensive evaluation test suite containing 2,254 executable multi-turn test cases.

A3S-Bench spans six real-world scenarios: code development, web browsing, file management, data analysis, system administration, and document review. It is split into:

  • 742 Benign Seeds (used to verify the agent's utility and task completion).
  • 786 Baseline Cases (A3S-B) (utilizing 22 standard prompt-injection techniques).
  • 726 Agent-Specific Cases (A3S-A) (utilizing the newly proposed advanced operators).
Fig. 2: Test suite overview.

Key Insights and Ideas

  • Text Responses are Deceptive: An agent can verbally refuse an action or output an innocuous message (e.g., "Diagnostics submitted") while silently executing a malicious tool call (e.g., exfiltrating data via curl in the background). This highlights why action-grounded evaluation is mandatory for agents.
  • Persistent State is a Dangerous Vector: Attacks like "artifact-mediated memory poisoning" allow an attacker to plant malicious instructions in a workspace file. The agent reads it, saves it to memory, and executes the malicious behavior turns later during a completely unrelated, benign task.
  • Multi-Turn Delivery is Highly Effective: Spreading an attack across multiple turns is significantly more effective than single-turn injections because standard guardrails evaluate inputs in isolation and fail to track intent aggregation over time.

Key Results

The framework was evaluated on 11 leading LLM backbones integrated into the OpenClaw agent scaffold, consuming over 20 billion tokens.

  • Vulnerabilities are Pervasive: Advanced agent-specific operators more than doubled the average risk-trigger rate (RTR@1) across all models, jumping from 22.9% to 47.4%.
  • Even the Safest Models Fall Short: The most secure model evaluated (GPT-5.4) saw its risk-trigger rate triple from 4.2% under baseline attacks to 15.2% under advanced operators.
  • Current Guardrails are Insufficient: Testing off-the-shelf guardrail models like Qwen3Guard and Llama-Guard-3 revealed they only caught between 3.3% and 17.8% of harmful runs, proving inadequate for agent-level operational security.
  • Oracle Reliability: The automated action-grounded oracle demonstrated exceptional alignment with human judgment, achieving a 93.2% binary F1 score.
Fig. 3: GSS distribution by trigger count (0–3 out of 3 runs) for four models. Numbers above bars: item count and percentage.

Limitations and Future Work

While the principles of ASEval are platform-agnostic, the current implementation and evaluation were targeted specifically at a single agent platform (OpenClaw). Additionally, while the risk taxonomy covers the primary threat surfaces identified in current literature, it is not entirely exhaustive. As autonomous agents gain more complex capabilities (such as multi-agent collaboration or deeper desktop control), new risk categories and interaction dynamics will emerge, requiring continuous updates to the perturbation operators.

Summary updated

BibTeX
@misc{ma2026aseval,
  author = {Jianan Ma and Xiaohu Du and Ruixiao Lin and Yaoxiang Bian and Jialuo Chen and Yunhao Feng and Xiaofang Yang and Shiwen Cui and Changhua Meng and Xinhao Deng and Jingyi Wang and Zhen Wang},
  title = {{ASEval: Automated Trajectory-Level Security Testing for Autonomous Agents}},
  year = {2026},
  eprint = {2605.22321},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.22321},
}
Figure