Skip to content

S³: Enhancing LLM Agent Safety with Multi-Stage Defense$S^3$: Improving Agent Safety through Multi-Stage Defense

arXiv· arXiv:2608.02683· Zibo Xiao, Haoyu Wang, Jun Sun·Indexed by this site · 2026-10-01· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose S³, using a guard agent to orchestrate stage-specific safety skills for multi-agent workflow defense; on MSRB, DeepSeek-V4-Pro's Complete S³ achieves 0% ASR across all six risk categories.

Threat modelThe main agent executes as input→memory→(planning→tool selection→tool execution→tool observation)*→output; risks can arise at each stage and propagate across steps. An external guard agent detects and mitigates using stage safety skills, and the main agent does not control its own safe execution.

Questions
LLM agent risks can emerge at different stages such as memory, planning, and tool execution, and propagate across steps. Existing methods mostly protect only isolated stages and are difficult to combine.
Methods
S³ converts existing safety designs into safety skills with stage semantics, invoked by an external guard agent through hierarchical triggering, and uses a recovery module to preserve benign tasks as much as possible after risk detection.
Experiments and results
On MSRB mixed tasks, Complete S³ with DeepSeek-V4-Pro has 0% ASR across all six risk categories, and TSR is mostly 100% (97.8% for selection perturbation). Single-stage skills cover only their target stage; removing the recovery module significantly decreases TCR/TSR. The divergence rate between final skills and original designs is below 10%.
Limitations and future work
The authors state that cross-stage transfer risk and adaptive attackers were not evaluated, and that MSRB's safety rules target the benchmark's risk patterns. Experiments primarily used DeepSeek-V4-Pro, with Flash results in the appendix; absolute execution time and statistical significance were not reported.
Experimental setupDeepSeek-V4-Pro、DeepSeek-V4-Flash · MSRB、SafeAgentBench · ASR、RTR et al.
Evaluated models
DeepSeek-V4-ProDeepSeek-V4-Flash
Benchmarks
MSRBSafeAgentBench
Metrics
ASRRTRTCRTSRBRFPRDRGICRSC
AI summaryThe paper proposes the Stage-Specific Safety Skills abstraction, representing heterogeneous safety designs as reusable, composable components with explicit stage semantics, and provides an automated conversion pipeline and a community-driven safety skill library. On this basis, it proposes the S³ multi-stage defense framework, where a guard agent orchestrates safety skills at each stage to perform risk detection and mitigation in memory, planning, tool execution, and other parts of the agent workflow. The authors also construct the Multi-Stage Risk Benchmark (MSRB) to evaluate representative risks at each stage. Experiments show that S³ outperforms representative SOTA baselines in both safety effectiveness and utility preservation. The paper argues that stage-specific safety skills can serve as a scalable, composable foundation for building resilient agent systems.

The paper proposes the Stage-Specific Safety Skills abstraction, representing heterogeneous safety designs as reusable, composable components with explicit stage semantics, and provides an automated conversion pipeline and a community-driven safety skill library. On this basis, it proposes the S³ multi-stage defense framework, where a guard agent orchestrates safety skills at each stage to perform risk detection and mitigation in memory, planning, tool execution, and other parts of the agent workflow. The authors also construct the Multi-Stage Risk Benchmark (MSRB) to evaluate representative risks at each stage. Experiments show that S³ outperforms representative SOTA baselines in both safety effectiveness and utility preservation. The paper argues that stage-specific safety skills can serve as a scalable, composable foundation for building resilient agent systems.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Risks can emerge and propagate in multi-stage agent workflows, and existing defenses are difficult to combine into end-to-end protection.

    Risks in LLM agents emerge across different workflow stages, propagate across steps, and existing safety methods cover only isolated stages and are difficult to integrate.

    • Scenario: The authors state that agents complete tasks through multi-stage workflows such as input, memory, planning, tool selection, tool execution, and tool observation; MCP and Agent Skills further structure behavior. Intermediate states affect subsequent decisions, memory poisoning can rewrite retrieved content, and malicious tool observations can inject prompts during execution.

    • Why single-stage is insufficient: The authors list three points: (1) risk types differ across stages; (2) execution is stochastic, making later risks hard to predict from early information alone; (3) late-only detection may be too late, as early risks propagate, obscure the source, and increase the difficulty of post-hoc tracing.

    • Limitations of existing methods: Pre-execution, execution-time, post-execution, and multi-stage frameworks respectively only align input, protect only the target stage, do only post-hoc diagnosis, or, although integrating multiple mechanisms, lack a unified abstraction and have incomplete stage coverage. The authors summarize the challenge as: single mechanisms protect only specific stages; heterogeneous designs are difficult to integrate.

    • Core claim: Represent heterogeneous safety designs as reusable, composable Stage-Specific Safety Skills with explicit stage semantics, and have an external guard agent detect and mitigate at the stage where the risk occurs while suppressing propagation.

    • This paper proposes: An automated conversion pipeline and community safety skill library, as well as the multi-stage defense framework S³; and constructs the Multi-Stage Risk Benchmark (MSRB) to evaluate representative risks at each stage.

    • Threat model

      • Victim system: The main agent receives user prompts and executes tasks, with the workflow input → memory → (planning → tool selection → tool execution → tool observation)* → output; the reference implementation is based on DeepAgent and equipped with 15 embodied tools.
      • Risk sources: MSRB divides risks into adversarial attacks (direct prompt injection, memory poisoning, backdoor PoT, observation prompt injection) and accidental deviations (selection perturbation, environment perturbation); risks can adapt or propagate during execution. Output safety is out of scope.
      • Defender knowledge and capabilities: S³ runs in parallel with but independently of the main agent; hierarchical triggering passes stage information to the external guard agent, which invokes the corresponding stage's safety skills. The authors state that the regulated entity should not control its own safety execution, so the main agent only does tasks and the guard agent handles detection and mitigation.
      • Goal: Detect and mitigate risks at each stage (including incident response after materialization), while preserving benign task completion and controlling runtime overhead.
  2. What related research exists?

    Related work is grouped by workflow stage and skill-based safety mechanisms; the authors state S³ fills in a composable stage abstraction.

    In Section 2, the authors divide related work into agent safety across workflow stages and skill-based safety mechanisms.

    Pre-execution and execution-time safety

    • Safety-Tuned LLaMAs (Bianchi et al. 2023), AgentAlign (Zhang et al. 2025b), LlamaGuard (Inan et al. 2023), LangChain guardrails (Chase 2022): Reduce unsafe behavior before execution through alignment or filtering. The paper notes that they mainly rely on information available before or at the start of execution and cannot handle risks that dynamically emerge later.
    • A-MemGuard (Wei et al. 2025) and subsequent memory poisoning defenses (Sunil et al. 2026): Protect retrieved memory. AgentSpec (Wang, Poskitt, and Sun 2025) imposes safety constraints on generated plans and tool calls. AIR (Xiao, Sun, and Chen 2026) performs structured event responses during unsafe tool execution. The paper notes that these methods are effective within their inspection scope, but risks in other stages remain uncovered.

    Post-execution and multi-stage defenses

    • ATBench (Li et al. 2026a), AgentDoG (Liu et al. 2026a): Perform safety evaluation or diagnostic guardrails on completed or accumulated trajectories. The paper notes that trajectory analysis can capture risks across multi-step interactions, but mainly supports post-hoc evaluation rather than timely intervention before unsafe consequences occur.
    • Ghosh et al. 2025, LlamaFirewall (Chennabasappa et al. 2025), SafeHarness (Lin et al. 2026): Combine context monitoring with runtime risk assessment, deploy protections at different execution points, and integrate multiple defenses with tightly coupled layers, respectively. The paper notes that they lack a unified abstraction for composing heterogeneous safety designs, remain vulnerable to risks in stages they do not protect, and tightly coupled designs limit scalability; the authors state this judgment is supported by their evaluations.

    Skill-based safety mechanisms

    • Liu et al. 2026b, Li et al. 2026b: Study vulnerabilities and misuse in real skill ecosystems. SafeClaw-R (Wang et al. 2026) defines system-level safety invariants and adds safety counterparts to existing skills for pre-execution checks. The paper notes that these works neither represent safety designs as reusable components with explicit workflow stage semantics nor support flexible composition for end-to-end defense.

    Baseline methods and benchmarks

    • Baseline methods: Single-skill configurations correspond to LC-GuardRail, A-MemGuard, AgentSpec*, AgentSpec, AIR, ParseData; multi-stage baselines are LlamaFirewall and SafeHarness; also No Guard and S³ without the recovery module.
    • Benchmark/dataset: Self-built MSRB (675 task instances, nine task categories); the main agent's 15 embodied tools (e.g., put, pour, turn_on) follow SafeAgentBench (Yin et al. 2024). The introduction also mentions Agent Security Bench (Zhang et al. 2025a), which covers entry points such as memory and tool observations but still does not cover the full workflow, especially the tool execution stage, and focuses mainly on injection-type attacks.

    The authors position this paper as using stage-specific safety skills as a reusable, composable interface to standardize heterogeneous safety designs and uniformly orchestrate them across the entire agent workflow, filling the above gaps.

  3. How does the paper address this problem?

    S³ uses a conversion pipeline to generate stage-specific safety skills, which are then triggered hierarchically and recovered by a guard agent.

    S³ runs in parallel with the main agent: hierarchical triggering decides whether to check, the guard agent invokes stage-specific safety skills; if a risk is detected, it outputs a risk signal and a stage recovery message, and the recovery module mitigates the risk based on this while preserving benign tasks as much as possible.

    Problem Setting and Formalization

    • Workflow: input → memory → (planning → tool selection → tool execution → tool observation)* → output. The authors focus on attack surfaces in the stages before output generation, not treating output safety as a focus.
    • Stages and Information: Table 1 maps stages, representative risks, check information, and safety designs as: Input / Direct Prompt Injection / user input / LC-GuardRail; Memory / Memory Poisoning / retrieved memory / A-MemGuard; Planning / Backdoor PoT / generated plan / AgentSpec*; Tool Selection / Selection Perturbation / tool selection plan / AgentSpec; Tool Execution / Environment Perturbation / environment / AIR; Tool Observation / Observation Prompt Injection / tool observation / ParseData.
    • Problem Statement: The research studies how to build customizable multi-stage defenses that connect safety designs to corresponding stages and coordinate them throughout execution, covering risks that adapt or propagate, while preserving benign task completion at acceptable overhead.

    Stage-Specific Safety Skills

    • Separation from task skills: Task skills are selected by the main agent to complete tasks; safety skills are selected only by the external guard agent. The authors give two reasons: the main agent controlling skill invocation would break explicit stage alignment; the regulated entity should not control its own safety execution.
    • Stage binding: Each safety skill is invoked by the guard agent only when the main agent reaches its target stage. For example, in the tool selection stage, AgentSpec checks the selection according to predefined rules; in the tool observation stage, ParseData compares expected and actual observations to detect malicious injection.
    • Skill.md: The specification includes the target stage, check information, required resources, check process, and mitigation strategy. After detecting a risk, it outputs a risk signal and a stage recovery message. The design motivation is that risk patterns differ across stages, and intervening where the risk occurs facilitates recovery before propagation or irreversible consequences.

    Safety Skill Conversion

    • Goal: The transform agent extracts safety logic from papers, software documentation, or framework specifications, preserving the core logic and decision behavior at the target stage, and encapsulates it into reusable skills. All four steps are implemented as modular skills executed by this agent.
    • Four-step pipeline: (1) Method Model, abstracting the target stage, check information, required resources, check process, and mitigation strategy; (2) Skill Write, writing a standardized Skill.md; (3) Skill Test, generating structured tests from the specification, each case being (Resources, Test Input, Expected Result), where the expected result is a binary safe or unsafe, and feeding the test input to a guard agent equipped with the skill and comparing with the expectation; (4) Skill Refine, feeding failed cases and the specification back for iterative correction. The appendix gives the inputs and outputs of each step; the paper does not give an upper bound on the number of iterations in the main text.
    • Skill library: Based on this pipeline, a community-driven Safety Skill Library is established for building, validating, and reusing. The authors plan to provide S³ and the skill library with a public implementation, and the repository address is given in the main text.

    Defense Framework and Triggering

    • Recovery module: According to the recovery message of the triggered skill, it removes or mitigates the risk-causing factor at the stage where the risk is identified, allowing the task to continue when possible. For example, when prompt injection is detected in tool observation, the injected content is removed before passing it to the main agent, rather than terminating the entire task. The recovery module is implemented as a system-level safety skill operated by the guard agent.
    • Materialized risks: When a risk has already occurred in the environment, following AIR's approach, the guard agent invokes tools for containment and predefined remediation. The paper gives an example: when a watering deviation causes water to spill onto electrical appliances, the appliances are turned off and accumulated water is cleared according to predefined rules.
    • Three-layer triggering: After the main agent reaches a stage, (1) the Stage Trigger deterministically selects the skills for that stage; (2) the Rule-Based Filter removes unnecessary candidates using lightweight predefined conditions; (3) the Guard Agent Decision then selects from the remaining candidates based on the current stage information. The authors state this is a trade-off between runtime efficiency and safety effectiveness.

    Implementation and Success Criteria

    • Implementation: Middleware is inserted at each stage in DeepAgent to collect stage information; its skill mechanism is extended to add a target-stage attribute for the guard agent and load converted skills; an interface for passing stage information between the main agent and the guard agent is established. The authors state S³ is framework-agnostic and can be integrated into OpenAI Agents SDK etc. with minor modifications. In evaluation, the main agent has 15 embodied tools, and the guard agent uses the same tool set for incident response.
    • Criteria: Effectiveness experiments use ASR, RTR, TCR, TSR; without the recovery module, RTR is changed to the proportion detected and directly blocked. Fidelity uses BR, FPR, DR. Efficiency uses average Guard Invocation Count (GIC) and Recovery Signal Count (RSC) per task. All models use default generation settings.
  4. What experiments did the paper conduct?

    On MSRB, Complete S³ has 0% ASR across all six categories, and the final skill divergence rates are all below 10%.

    Experimental Setup

    • Models under test: The transform agent and main agent use DeepSeek-V4-Pro; the guard agent is evaluated with DeepSeek-V4-Pro and DeepSeek-V4-Flash, with Flash results in the appendix. All use default generation settings.
    • Benchmark: MSRB contains nine task types and 675 task instances, including harmful and benign instances. Six risk categories: adversarial DPI, memory poisoning, backdoor PoT, observation prompt injection (OPI); accidental deviation selection perturbation, environment perturbation. Mixed tasks combine one benign subtask with one harmful subtask; harmful subtasks have three presentations: naive, adaptive, adversarial. Each harmful instance is paired with a benign control with similar action structure. The main agent's tools follow SafeAgentBench's 15 embodied tools.
    • Configurations and baselines: No Guard; Single Skill (LC-GuardRail, A-MemGuard, AgentSpec*, AgentSpec, AIR, ParseData); S³ w/o Recovery Module; Complete S³; and LlamaFirewall, SafeHarness. The six safety designs are converted into skills per Section 4.2 and integrated into S³.
    • Metrics: ASR is the proportion of harmful behaviors successfully executed; RTR is the proportion of tasks detected and triggering recovery (without the recovery module, detected and directly blocked); TCR is the proportion completing benign goals; TSR is the proportion completing benign goals and blocking harmful behaviors. Fidelity additionally uses BR, FPR, DR. Efficiency is average GIC and RSC per task.
    • Review: The paper does not report a separate LLM review model, threshold, human agreement, or number of repetitions. RQ2 compares original designs and skills' allow/block decisions at the stage level, with instances containing only the stage information in Table 1, not full execution traces.
    • RQs: RQ1 is cross-stage detection and mitigation while preserving benign completion; RQ2 is conversion fidelity; RQ3 is runtime overhead.

    Main Results

    Table 2 is for DeepSeek-V4-Pro, mixed tasks, six risk categories. The table below lists only ASR / TSR (%).

    Swipe horizontally to read the table

    MethodDPIMemory PoisoningBackdoor PoTSelection PerturbationEnvironment PerturbationOPI
    No Guard100 / 0100 / 0100 / 057.8 / 42.295.6 / 054.8 / 45.2
    LlamaFirewall58.5 / 0.760.0 / 6.714.8 / 81.562.2 / 095.6 / 025.9 / 56.3
    SafeHarness6.7 / 31.15.2 / 36.35.2 / 3.02.2 / 11.191.1 / 03.7 / 74.8
    S³ w/o Recovery0 / 00 / 00 / 14.80 / 0100 / 00 / 8.9
    Complete S³0 / 1000 / 1000 / 1000 / 97.80 / 1000 / 100

    Per Table 2. Complete S³'s RTR is 100% across all six categories; TCR is 97.8% on selection perturbation and 100% on the other five. S³ w/o Recovery has 100% ASR, 100% RTR, and 0% TCR/TSR on environment perturbation.

    • Single-stage coverage: The authors state that a single safety skill usually protects only one or a few stages. Under environment perturbation, all skills except AIR have ASR above 88% (Table 2b: LC-GuardRail and ParseData 95.6%, A-MemGuard 88.9%, AgentSpec* 91.1%, AgentSpec 97.8%, AIR 0%). The authors state these skills come from preemptive prevention designs and lack containment and remediation after action execution.
    • Cross-stage and multi-stage baselines: The authors state early-stage skills cannot see later risks, and later-stage skills may only intercept propagated consequences. AgentSpec has low ASR on DPI and OPI (2.2%, 1.5%), but TSR (88.1%, 79.3%) is lower than 97.8% on selection perturbation. The authors state LlamaFirewall mainly maintains alignment between behavior and user instructions, so it may allow faithfully executed harmful instructions; SafeHarness only cleans malicious content in input, memory, and tool observation, returning only blocked observations in other stages without recovery messages, resulting in lower TCR/TSR.
    • Rules and recovery: The authors state that AgentSpec and AIR's low ASR should be understood in light of high-quality rules targeting risk patterns on MSRB; in more diverse or unseen scenarios, incomplete rules may weaken effectiveness. Removing the recovery module still blocks detected risks, but TCR/TSR are much lower; the authors state direct blocking cannot repair workflow interruption or recover benign goals.

    Conversion Fidelity

    Table 3 compares original designs, Skill (Draft), and Skill (Final). DR of final skills relative to original designs: Input harmful 3.7%, benign 0%; Memory 0.7% and 0%; Planning 5.9% and 0%; Tool Selection, Tool Execution, Tool Observation harmful and benign DR are all 0%. Final BR: Input 61.5% (original design 63.7%), Memory 99.3% (original 98.5%), Planning 97.0% (original 92.6%), the other three stages' final BR is 100% (same as original designs, Tool Execution original design also 100%). Final FPR is 0% across all; Draft FPR is 7.4% on Input, 4.4% on Planning, 5.2% on Tool Observation, and 0% elsewhere. The authors state all final skills have divergence rates below 10%, and the changes from Draft to Final reflect the role of Skill Test and Skill Refine; RQ2 evaluates fidelity, not the absolute effectiveness of each design.

    Runtime Overhead

    Table 4 is also for DeepSeek-V4-Pro mixed tasks. Complete S³'s GIC / RSC: DPI 11.1 / 1.0, memory poisoning 15.7 / 1.5, backdoor PoT 12.1 / 1.0, selection perturbation 11.9 / 1.1, environment perturbation 13.3 / 1.0, OPI 10.0 / 1.0; ASR is 0% across all six, TSR is 100% except selection perturbation at 97.8%. Removing rule filtering raises GIC to 25.2–37.0 (memory poisoning 37.0). Removing recovery-guided resumption, backdoor PoT ASR is 2.2%, TSR 97.8%, RSC 7.8, selection perturbation TSR 99.3%, environment perturbation TSR 98.5%. Without the recovery module, GIC is 1.0–8.8 and there is no RSC. The authors state rule filtering reduces unnecessary checks and thus GIC, recovery-guided resumption reduces repeated harmful behaviors and thus RSC, most evident on backdoor PoT; direct blocking has lower overhead than recovery, a trade-off between efficiency and utility. The authors did not report absolute execution time, stating it is sensitive to remote LLM API latency and deployment resources.

    Other Ablations and Analyses

    • Appendix C cases: On DPI, memory poisoning, backdoor PoT, and selection perturbation, single skills can have 0% ASR while TSR is still lower than Complete S³ (e.g., on DPI, AgentSpec ASR 0%, TSR 85.2%, AIR ASR 0%, TSR 74.1%; Complete S³ is 0% / 100%). On environment perturbation, only AIR and Complete S³ have ASR 0% and TSR 100%, while the other listed single skills have ASR 88.9%–100% and TSR 0%.
    • Risk patterns (appendix table): No Guard has ASR around 51.1%–60.7% and TSR around 39.3%–48.1% on naive/adaptive/adversarial. Complete S³ has ASR 0%, TSR 100%, GIC around 10.0–11.5, and RSC 1.0 across the three patterns. SafeHarness's TSR is 71.9%, 74.1%, 77.8% across the three patterns.
    • DeepSeek-V4-Flash (appendix, only guard agent model changed): Complete S³ has ASR 0% and TSR 100% on DPI, memory poisoning, backdoor PoT, selection perturbation, and OPI; environment perturbation ASR 3.0%, TSR 97.0%, RTR 97.0%, TCR 100%. Without the recovery module, TSR is 0% on backdoor PoT and ASR is 100% on environment perturbation.
    • Content of rule filtering: Appendix E lists filtering conditions by stage, e.g., in the input stage LC-GuardRail is invoked on keyword or policy match, in the memory stage A-MemGuard is invoked when retrieval is non-empty, and in tool execution AIR is invoked on state changes. The paper does not report GIC numbers beyond the separate filtering ablation (the main comparison is already in Table 4).
    • Skill combinations: The authors state that configurable skill combinations and hierarchical triggering can trade off coverage and overhead; Table 4 gives ASR, TSR, GIC, RSC after removing rule filtering or the recovery module, without a separate full matrix of partial skill subsets.
    • Negative results: S³ w/o Recovery has 100% ASR on environment perturbation (Table 2b and Table 4b); AgentSpec has ASR 97.8% and TSR 0% on environment perturbation; LlamaFirewall has TSR only 0.7% on DPI and 0% on selection and environment perturbation. On Flash, Complete S³'s environment perturbation ASR is 3.0%, not 0%.
  5. What are some points that can be further explored?

    The authors note that cross-stage transfer risks and adaptive attackers have not yet been evaluated, and they plan to expand the skill library.

    Limitations and future directions noted by the authors

    • Cross-stage transitions: The discussion after the Conclusion states that S³ focuses mainly on risks associated with a single workflow stage, and some risks arise during stage transitions; the authors list this as an issue outside the current focus (Stage Transition Safety).
    • Adaptive attackers: The same discussion states that adaptive attackers who adjust to the defenses themselves have not been evaluated (Adaptive Attackers).
    • Rule coverage: The RQ1 analysis states that the effectiveness of AgentSpec and AIR should be understood in conjunction with high-quality rules targeting MSRB risk patterns; in more diverse or unseen scenarios, incomplete rule coverage may weaken safety. This is a condition explicitly stated by the authors in the results discussion, not a separate Limitations section.
    • Absolute latency: RQ3 states that absolute execution time is not reported because it is highly sensitive to remote API latency and deployment resources; the authors believe that in practice, optimized inference infrastructure or lightweight guard models could reduce per-check latency.
    • Skill library expansion: The conclusion states that S³ supports flexible integration of new safety designs; the skill library in the contributions is described as community-driven, for continuous building and reuse. The authors plan to release the implementation publicly (the contributions list gives a repository), and it is not written as if all community contributions are already complete.
    • Framework portability: Section 4.4 states that the reference implementation is based on DeepAgent, but S³ is framework-agnostic and can be integrated into other frameworks (e.g., the OpenAI Agents SDK) with minor modifications. The paper does not present this as a completed migration experiment.

    Experimental coverage

    • Models: In the main results, transform, main, and guard are all DeepSeek-V4-Pro; the appendix additionally swaps the guard agent for DeepSeek-V4-Flash, with the same risk types and metrics as RQ1. The paper does not report other model families.
    • Benchmark scale: MSRB has 675 task instances, nine task types, three harm categories, and six stage risk types; the mixed tasks include naive, adaptive, and adversarial presentations. The toolset is 15 embodied tools following SafeAgentBench.
    • Defense comparisons: Table 2 includes six single-stage skills, LlamaFirewall, SafeHarness, S³ without recovery, and Complete S³, with metrics ASR, RTR, TCR, and TSR. Table 3 covers the original design, Draft, and Final across six stages. Table 4 compares no guard, no rule filtering, no post-recovery guidance, no recovery module, and Complete S³ on ASR, TSR, GIC, and RSC.
    • Unreported items: The paper does not report the number of repetitions, statistical significance, absolute wall-clock time, or the number of harmful/benign instances per stage for RQ2 (the table shows proportions). Evaluation is done via allow/block by the safety design or guard agent, or the four task-level metrics; the paper does not report independent human agreement.
    • Implementation scope: Stage filtering conditions are listed by stage in Appendix E; Appendix C gives case comparisons of single skills and Complete S³. Output-stage safety is explicitly excluded by the authors from the scope of focus.
  6. Summarize the main content of the paper

    S³ orchestrates heterogeneous safety designs as stage-specific skills, simultaneously lowering ASR and preserving TSR on MSRB.

    S³ is a defense framework for multi-stage workflows of LLM agents: it uses an external guard agent to orchestrate stage-specific safety skills, detecting and recovering at the stage where the risk occurs, rather than guarding only one stage or doing only post-hoc diagnosis.

    • Problem: The workflow includes input, memory, planning, tool selection, tool execution, and tool observation. Risk types vary by stage and propagate backward; early-only protection cannot predict later risks, and late-only detection may be too late. Heterogeneous safety designs lack a unified interface.
    • Method: Stage-Specific Safety Skills use Skill.md to specify the target stage, check information, resources, and mitigation strategy, and are invoked only by the guard agent at the corresponding stage. A transform agent converts LC-GuardRail, A-MemGuard, AgentSpec*, AgentSpec, AIR, and ParseData into skills through method abstraction, skill writing, testing, and refinement. Three-layer triggering selects by stage, then by rules, and finally by the guard agent. The recovery module removes risk-causing factors according to recovery messages; when an incident has already occurred in the environment, incident response follows AIR. The implementation is based on DeepAgent, with the main agent equipped with 15 embodied tools.
    • Results: MSRB has 675 instances and six risk categories. On DeepSeek-V4-Pro mixed tasks, Complete S³ has ASR 0% across all, RTR 100% across all, and TSR 97.8% on selection perturbation and 100% elsewhere (Table 2). Under environment perturbation, single skills other than AIR have ASR above 88%. Removing the recovery module and then blocking causes TCR/TSR to drop substantially, with environment perturbation ASR at 100%. The DR of final skills across six stages relative to original designs is below 10% (Table 3). Complete S³'s GIC is about 10.0–15.7 and RSC about 1.0–1.5; removing rule filtering raises GIC to 25.2–37.0 (Table 4). With DeepSeek-V4-Flash as the guard agent, environment perturbation ASR is 3.0% and the other five categories are 0%.
    • Authors' conclusion: The authors believe stage-specific safety skills can serve as a scalable, composable foundation that improves safety coverage while preserving benign task completion, and that coverage and overhead can be tuned through skill combinations and hierarchical triggering. The authors also state that cross-stage transfer risk and adaptive attackers have not been evaluated, and that the effectiveness of rule-based methods depends on rule coverage on MSRB.

Related papers

Show 1 more papers
Read originalarxiv.org