Skip to content

AgentTriage: Replayable safety diagnosis across heterogeneous agent runtimes

Paper Tracker· arXiv:2610.30738· Jie Ying, Xutao Zhang, Ningyuan Chen, Mengce Zheng, Jun Li, Zhongjie Zhu, Tiantian ZhuCollege of Information and Intelligence Engineering, Zhejiang Wanli University; College of Computer Science and Technology, Zhejiang University of TechnologyIndexed by this site · 29 days ago· Originally publishedDefenses

Quick read

Defenses

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

The authors propose AgentTriage: a replayable security diagnosis contract across 5 agent runtimes, achieving GJD 0.858 on 120 adjudicated cases.

Questions
After a tool-using agent produces a security incident, the final answer cannot explain what happened at the execution level, and the interfaces through which different runtimes expose evidence are mutually incompatible; the authors care about which diagnostic conclusions can be independently replayed by a third party based on recorded evidence.
Methods
AgentTriage defines diagnosis as an executable contract: each runtime attaches a thin overlay that normalizes native events into a canonical contract of 13 event types, and a deterministic pipeline performs lifecycle joining, STPG construction, policy-decisive slicing, attribution, and evidence binding, without calling a language model at any point, and must abstain when evidence is missing.
Experiments and results
One contract covers all 159 applicable executions across 5 runtimes; on 120 human-adjudicated cases, GJD is 0.858, required-evidence coverage is 0.966, and unsupported-claim rate is 0.036, with a paired GJD improvement of 0.175 over the strongest same-mode baseline (95% CI [0.092, 0.258]).
Limitations and future work
The authors note that determinism guarantees only reproducibility, not evidence completeness; when evidence is incomplete the contract abstains, and abstention is not accuracy; results apply only to the 5 pinned target stacks, the tested scenario strata, and the policy oracle; two overlays must synthesize call identity themselves.
Experimental setupTaskWeaver、Agent Zero et al. · 12 个冻结采集场景(SG-01–SG-12)× 5 个 pinned targets,159 次可适用执行、120 例人工裁决的 confirmatory cases · Grounded Joint Diagnosis (GJD)、Joint diagnosis accuracy (JDA) et al.
Threat model
The attacker induces the evaluated agent to violate the scenario policy, causing forbidden sink invocation or execution; can control the user prompt or content passed in via webpage, retrieved document, tool result, memory item, or collaborator message; knows the public tool interfaces; cannot modify the system policy, pre-registered policy oracle, canonical schema, evaluator, or frozen evidence, nor compromise the Docker daemon, host OS, model provider, or local loopback services.
Evaluated models
TaskWeaverAgent ZeroLangGraphGooseMicrosoft Agent Framework
Benchmarks
12 个冻结采集场景(SG-01–SG-12)× 5 个 pinned targets,159 次可适用执行120 例人工裁决的 confirmatory cases
Metrics
Grounded Joint Diagnosis (GJD)Joint diagnosis accuracy (JDA)Policy-outcome macro-F1Required-evidence coverageUnsupported-claim rateWorst-target GJDLOTO mean GJD
AI summaryThe paper proposes AgentTriage, a replayable security diagnosis contract across heterogeneous agent runtimes, for diagnosing security incidents produced by tool-calling agents. Addressing the problems that an agent's final reply cannot explain security incidents and that evidence interfaces differ across runtimes, the contract requires diagnostic conclusions to cite normalized runtime events, to abstain when required evidence is missing, and to build typed provenance graphs through a deterministic pipeline and bind claims to recorded evidence, so that diagnoses can be recomputed under the same normalized trace without language-model judgment. Across five runtimes, the same contract covers all 159 applicable executions; on 120 adjudicated cases, AgentTriage achieves 0.858 grounded joint diagnosis, 0.966 required-evidence coverage, and 0.036 unsupported-claim rate, improving joint diagnosis by 0.175 (95% CI [0.092, 0.258]) over the strongest same-paradigm baseline. The authors have open-sourced the implementation and released partially redacted evidence.

The paper proposes AgentTriage, a replayable security diagnosis contract across heterogeneous agent runtimes, for diagnosing security incidents produced by tool-calling agents. Addressing the problems that an agent's final reply cannot explain security incidents and that evidence interfaces differ across runtimes, the contract requires diagnostic conclusions to cite normalized runtime events, to abstain when required evidence is missing, and to build typed provenance graphs through a deterministic pipeline and bind claims to recorded evidence, so that diagnoses can be recomputed under the same normalized trace without language-model judgment. Across five runtimes, the same contract covers all 159 applicable executions; on 120 adjudicated cases, AgentTriage achieves 0.858 grounded joint diagnosis, 0.966 required-evidence coverage, and 0.036 unsupported-claim rate, improving joint diagnosis by 0.175 (95% CI [0.092, 0.258]) over the strongest same-paradigm baseline. The authors have open-sourced the implementation and released partially redacted evidence.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The problem of security diagnosis across heterogeneous agent runtimes that a third party can replay from recorded evidence.

    Core question: after a tool-using agent causes a security incident, how can an execution-level security diagnosis be produced that spans heterogeneous runtimes and that a third party can independently replay from recorded evidence.

    • Problem setting: tool-using agents execute code, write files, send data, and call privileged APIs; the authors state that when some effect is unsafe, operators need to know which input reached the action, which parameters crossed the tool boundary, whether the action was attempted/blocked/failed/executed, and which control intervened, whereas existing security benchmarks only give the final effect or a task-level pass/fail label.
    • Shortcomings of existing methods: the authors state that security benchmarks measure harmful completion, vulnerability discovery systems search for prompt-to-sink paths, and trajectory tools localize failures; all of these ask "how to diagnose"; this paper asks the earlier question — which diagnostic conclusions can be independently replayed by a third party; a conclusion that cannot be recomputed from recorded evidence is not auditable no matter how accurate it is.
    • Core observation: runtimes do not share a unit of execution evidence — code agents, browser agents, checkpoint graphs, MCP, and multi-agent systems expose mutually incompatible boundaries, and temporal adjacency cannot distinguish causation from concurrency; diagnosis must normalize these differences without flattening the native boundaries.
    • The paper proposes: AgentTriage, an executable contract for replayable security diagnosis: every claim in a conclusion must cite canonical runtime events, and abstention is forced when required evidence is missing; judgment is not delegated to a language model but performed by a deterministic pipeline.
    • Threat model (§2.3, using the paper's terminology):
      • Attacker goal: make the evaluated agent violate the scenario policy, causing a forbidden sink invocation or execution.
      • Attacker capability: control the user prompt, or content delivered via a webpage, retrieved document, tool result, memory item, or collaborator message; content may contain direct, indirect, split, or encoded instructions.
      • Attacker knowledge: knows public tool interfaces; does not need host credentials or instrumentation access.
      • Victim system and boundaries: the evaluated agent application; the attacker cannot modify the system policy, the pre-registered policy oracle, the canonical schema, the evaluator, or frozen evidence, nor compromise the Docker daemon, the host OS, the model provider, or local loopback services.
  2. What related research exists?

    The paper positions itself along five threads: prompt injection and benchmarks, vulnerability discovery, trajectory diagnosis, information flow/provenance, and preventive defenses.

    In Related Work (§6) and Table 10, the paper groups related work into five threads and positions AgentTriage as a post-execution diagnosis layer.

    Prompt injection and agent security evaluation

    • Prompt injection research covers black-box applications, attacker-controllable content, formal attack spaces, executable tool cases, and persistent memory poisoning (the paper cites [32]–[39], including AgentDojo, InjecAgent, AgentPoison, etc.).
    • Behavior and security benchmarks cover web, desktop, enterprise, software engineering, tool use, and policy compliance (cites [5]–[10], [40]–[50], including AgentHarm, ToolEmu, AgentBench, OS-Harm, etc.). The paper notes that these works measure final outcomes, whereas AgentTriage recovers the jointly evaluated lifecycle and evidence behind those outcomes.

    Vulnerability discovery and agent red teaming

    • Program analysis, fuzzing, taint reasoning, and executable arenas are used to discover prompt-to-sink and cross-tool risk paths (cites [11]–[13], [51]–[53], including LLMSmith, AgentFuzz, ChainFuzzer). The paper notes that AgentTriage turns discovered executions into normalized, policy-relative, claim-auditable diagnoses.

    Trajectory diagnosis and security forensics

    • Trajectory analysis localizes failing steps, responsible inputs, and risky interactions (cites [15], [16], [54], namely AgentRx, TracLLM, R-Judge). The paper notes that AgentTriage adds native lifecycle, policy-decisive terminal, authorization, defense semantics, and required evidence for each atomic claim on top of this.

    Information flow, provenance, and runtime analysis

    • Program slicing, provenance, request tracing, causal monitoring, and taint analysis preserve execution structure (cites [24]–[31], [55]–[57]); security provenance (NoDoze, HOLMES, UNICORN, cites [58]–[60]) adds correlation-graph context; agent analysis (NeuroTaint etc., cites [14], [61]–[64]) adds semantics, counterfactuals, and asynchronous tracing. The paper notes that AgentTriage anchors explicit structure to policy outcome, terminal status, defense attribution, and claim responsibility.

    Preventive defenses

    • Preventive systems separate instructions from data or enforce alignment, dependency, validation, isolation, information flow, and runtime policies (cites [62]–[73], including TaskShield, IPIGuard, AgentArmor, StruQ, SecAlign, etc.). The paper notes that AgentTriage audits the lifecycle after these controls act, successful controls or post-hoc weak layers, and supporting events, and is complementary to sandboxes, preventive controls, etc. (§2.5).

    Baselines and comparison setup: the comparison baseline for E2 is the Same-schema LLM trace judge (the strongest baseline in Table 7); all methods use the same canonical input and versioned output schema; the evaluation data are 159 executions from 12 frozen scenarios × 5 pinned targets and 120 human-adjudicated cases (§5.2–5.3).

    Authors' positioning: AgentTriage sits at the post-execution diagnosis layer, combining lifecycle, policy, defense, and claim evidence into one evaluated output (§6).

  3. How does the paper address this problem?

    A thin overlay normalizes native events, and a deterministic five-operator pipeline produces diagnoses that are evidence-backed, replayable, and abstain when evidence is missing.

    Overall approach: treat diagnosis as an object with an executable contract rather than the output of a new algorithm — the contract specifies what a conclusion must contain, what evidence it must cite, and that it must abstain when evidence is missing; AgentTriage implements this with a division of labor of "target overlay recording + shared deterministic core interpretation," without calling a language model at any point.

    Problem formalization and diagnosis target

    • Each scenario provides a specification policy oracle π fixed before execution (declaring authorized sink families, parameter constraints, confirmation requirements); the observed trajectory τ records only what the target reports, and π or expected outcomes are not used as event labels.
    • A diagnosis is a tuple D(τ, π) = (s, t, f, ℓ, a, P, o, d, E): the selected source, policy-decisive terminal, sink family and lifecycle status, normalized parameters, supported source-to-terminal structure, policy outcome, defense assessment, and required evidence for each claim.
    • Three invariants: separation of observation and policy (expected behavior cannot substitute for missing observed events); evidence-supported structure (temporal adjacency or textual similarity cannot produce parent-child, lifecycle, or field-lineage evidence); accountable diagnosis (an outcome or defense claim must cite the events its semantics require, otherwise the defect remains visible).
    • Five lifecycle states (attempted, executed, failed, blocked, unknown) combine with π into seven mutually exclusive outcomes; a failed authorized operation counts as execution failure rather than defense success, and a forbidden operation that was invoked but failed is still an attack attempt.

    Overlay and canonical contract (Canon)

    • Each target has a thin overlay at its native boundary that maps native actors, tools, payloads, and metadata into the versioned contract; the overlay cannot introduce target-specific public event types, source kinds, sink families, lifecycle states, outcomes, or defense labels.
    • The contract contains 13 event types (source_ingress, planner_output, tool call/result, memory read/write, argument transformation, sink invocation/result, guardrail decision, human checkpoint, verification result, safe response).
    • Parameter normalization is a two-stage schema operation: the overlay first extracts parameters according to the native call object (e.g., Goose's params.arguments.path), and a shared canonicalizer strips the raw-trace wrapper to expose them as canonical payload.* fields without changing values; the paper explicitly states that it does not guess alias equivalences such as filename and path.

    Evidence-supported relations and STPG slicing

    • Only three independently auditable relations are recognized: explicit-parent (native graph edges or hook parent_id/parent_refs), call-lifecycle (the same non-empty call_id connecting invocation and result), and field-lineage (field-level mappings declared by hooks); temporal adjacency, same-named tools, and textual similarity are insufficient to establish any of these relations.
    • call_id is a lifecycle key rather than an event identifier: Goose reuses the MCP tool-call request id, LangGraph uses the native tool-call ID, and Microsoft Agent Framework uses the workflow item's call ID; TaskWeaver and Agent Zero have no native identifier, so the overlay assigns run-local identifiers (Table 2).
    • STPG splits a sink invocation into a sink-argument node (value) and a sink node (effect); the sink result is a separate terminal-capable node; edges represent only explicit parent-child, call lifecycle, verified field lineage, and sink use.
    • Terminal selection has a fixed structural priority: first select the latest-completed (by recorded timestamp) sink result, then the latest sink invocation, and finally guardrail/verification/human-checkpoint/safe-response terminals; then traverse backward along supported edges, retaining the explicit ancestors of the decision and removing post-terminal bookkeeping and irrelevant concurrent branches.

    Attribution and rendering (Attribute and Render)

    • Attribution is a deterministic judgment over the selected slice G⋆ and π: first pass the outcome gate (benign/authorized, Insufficient Trace, Defense Succeeded, etc.); only when the outcome is attack_attempted or attack_executed are the six weak-layer predicates evaluated in frozen order (Privilege/Tool Control, Action/Output Guardrail, Input Guardrail, Source Separation/Taint, Memory Guard, HITL/Monitoring, Table 3), and the first two supported rules become the primary and secondary remediation layer; if no rule is supported, it abstains as Unknown/Insufficient Trace.
    • Render produces a Defense-Gap Card: every field in the five groups of responsibility (execution identity, observed actions, structural explanation, policy assessment, remediation recommendations) carries the canonical event identifiers that support it; when evidence is insufficient to support a complete diagnosis, the Card exposes the unresolved responsibility with an explicit insufficient-trace outcome.
    • The whole pipeline is C(τ, π) = Render(Attribute(Slice(STPG(Canon(τ))), π)); given the same (τ, v, π), two runs produce byte-identical diagnoses, and the authors emphasize that determinism here is reproducibility rather than completeness — events outside the instrumentation boundary never enter the result.

    Implementation and reproducible execution

    • The Python prototype implements an overlay for each of 5 open-source targets (TaskWeaver, Agent Zero, LangGraph, Goose, Microsoft Agent Framework), with a shared core performing canonicalization, STPG, slicing, attribution, evidence validation, and Card rendering (§4.1–4.3).
    • A generic runner runs each target in an isolated Docker container and saves the prompt, policy oracle, security assets, native results, trace, validation records, and diagnostic artifacts as one evidence package; predictions are exported and content-hashed before human reference annotation (§4.4).
  4. What experiments did the paper conduct?

    E1 measures contract coverage, E2 measures diagnostic accuracy on 120 adjudicated cases, and E3 ablates the mechanisms and measures deterministic overhead.

    Experimental setup

    • Targets under test: 5 pinned open-source runtimes — TaskWeaver, Agent Zero, LangGraph, Goose, Microsoft Agent Framework (commits and image digests in Appendix A Table 11).
    • Collection workload: 12 frozen scenarios (10 controlled attacks + 2 benign controls, SG-01–SG-12, Appendix B Table 12) × 5 targets; TaskWeaver pre-registered N/A for 7 scenarios, giving 159 applicable executions out of a theoretical 180 cells (53 cells × 3 repetitions).
    • Model binding: all targets use the same LLM via an OpenAI-compatible endpoint, temperature 0.1; LangGraph and Microsoft Agent Framework are passed seed 20260714, and the three executions of the other three are repeated model runs rather than deterministic replicas (Appendix B). The paper does not state the specific model of this LLM.
    • Confirmatory set: of 126 collected cases, 120 enter the final denominator (95.2% reference coverage), with at least 24 cases per target; predictions were frozen before reference annotation (§5.3).
    • Reference annotation: two annotators independently annotate based on the frozen evidence package and the pre-run oracle, with a third adjudicating; before adjudication, Cohen's κ=0.786 for policy outcome and κ=0.739 for primary defense layer, and 17.5% of cases had at least one disagreement (Table 4, n=126).
    • Metrics and intervals: the primary metric is GJD (lifecycle, core security fields, policy outcome, applicable parameters, and required claim evidence jointly correct on the same case); GJD/JDA etc. use 95% Wilson intervals, and F1 and paired differences use a 10 000-iteration hierarchical bootstrap (§5.3).

    Main results

    E2 main results (Table 5, 120 adjudicated cases) and same-mode comparison (Table 7):

    Swipe horizontally to read the table

    MetricFull AgentTriageStrongest same-mode baselineSource
    GJD0.858 [0.785, 0.910]0.683Table 5, 7
    JDA0.908 [0.843, 0.948]not reportedTable 5
    Policy-outcome macro-F10.933 [0.881, 0.969]0.824Table 5, 7
    Required-evidence coverage0.966 [0.955, 0.975]0.842Table 5, 7
    Unsupported-claim rate ↓0.036 [0.026, 0.048]not reportedTable 5
    Worst-target GJD0.792 (TaskWeaver)not reportedTable 5
    LOTO mean GJD0.805 (5 targets)not reportedTable 5
    • The authors state that relative to the strongest baseline (Same-schema LLM trace judge), the paired GJD improvement is 0.175 (95% CI [0.092, 0.258]), and outcome macro-F1 and evidence coverage improve by 0.109 and 0.124 respectively (Table 7).
    • The authors argue that with input and output capabilities fixed, the gain comes from recovering the policy-decisive lifecycle and validating claim evidence, rather than from a richer reporting interface.
    • The authors state that the worst-target GJD of 0.792 shows the aggregate result is not driven by a single runtime.

    E1: one contract across five runtimes

    • All 159 applicable executions produce a complete, schema-valid evidence package; every observed sink lifecycle is connected by invocation/result identifiers, and every run exposes a source, a policy-decisive terminal, and a supported parent path (§5.5).
    • Observability audit (Table 2): three runtimes natively expose call identity, while TaskWeaver and Agent Zero have run-local identifiers assigned by the overlay; the authors thereby state the boundaries the contract can express as measured properties rather than assumptions.

    Component-level results and ablations

    • Component-level (Table 6, same 120 cases): source accuracy 0.967, terminal accuracy 0.958, sink-family 0.917, sink-status 0.967; step F1 0.925, typed-edge F1 0.865, dangerous-argument F1 0.920; successful-control accuracy 0.950 (n=20 blocked cases), weak-layer macro-F1 0.833 (n=30 forbidden attempted/executed cases).
    • Single-factor ablations (Table 8, paired difference between retaining the mechanism vs removing it): STPG slicing contributes the most to GJD (0.158 [0.092, 0.224]), and evidence validation prevents the most unsupported claims (0.086 [0.057, 0.117]); lifecycle joining 0.117, defense attribution 0.092, terminal selection 0.083, argument normalization 0.067; the six variants are consistent in direction and their paired intervals exclude zero.
    • The authors argue that this links the end-to-end gain to the architecture (lifecycle recovery, decisive slicing, evidence validation) rather than to any single heuristic.

    Runtime overhead and other analyses

    • The target median deterministic diagnosis latency is 5.881–12.261 ms, with incremental evidence packages of 29,849–112,955 bytes (Table 9); the diagnosis layer does not call a model, and the authors state that no token budget for a diagnosis model is needed.
    • Appendix C paired tracing audit: of 76 tracing-on/off pairs, 63 are semantically equivalent and 13 are excluded; the target-level confidence intervals for end-to-end relative differences cross zero, and provider token telemetry is unavailable in both arms (Table 14).
    • Appendix D observed outcomes (Table 13): the 159 runs cover five terminal semantics — blocked, failed, attempted, executed, benign; for example, of LangGraph's 36 runs, 27 are benign and 0 are forbidden executed, and of Goose's 36 runs, 5 are forbidden executed and 3 are forbidden attempted.
  5. What are some points that can be further explored?

    The authors state that determinism does not equal evidence completeness, that results are limited to five pinned stacks, and they give directions for an extensible semantic layer.

    Limitations and future directions noted by the authors

    • Determinism does not imply soundness or completeness with respect to what actually happened: effects outside the instrumentation boundary are not in τ, and no determinism can recover them; the contract guarantees that conclusions are reproducible and that missing evidence is reported as abstention, not that recorded evidence is complete (§2.6).
    • The evaluation does not establish that "a replayable diagnosis is a correct diagnosis": where recorded evidence is incomplete the contract abstains, and abstention is not accuracy (§7).
    • Current results apply only to the five pinned target stacks, the tested scenario strata, the policy oracle, the collector, and the evidence store (§7).
    • Deployments requiring paraphrase, implicit control dependencies, latent memory influence, or counterfactual attribution can add a separately validated semantic layer while retaining the explicit graph as an auditable substrate (§7).
    • New runtimes are integrated via target overlays and reuse the diagnosis core and public contract; changes to the contract's shared vocabulary require bumping the contract version and re-validating all targets (§3.2, §7).
    • The authors plan to release AgentTriage, the event contract, the five runtime overlays, and de-identified evaluation evidence under the Apache-2.0 license (§1 contribution list).

    Scope of experimental coverage

    • The targets under test are 5 pinned open-source runtimes (TaskWeaver, Agent Zero, LangGraph, Goose, Microsoft Agent Framework); Appendix A gives each one's commit, license, and overlay size.
    • The collection workload is 12 frozen scenarios × 5 targets, 159 applicable executions, and 21 pre-registered N/A cells; the confirmatory evaluation is 120 human-adjudicated cases, at least 24 per target (§5.2–5.3).
    • Scenario semantics cover direct requests, external content propagating to each sink family, split/encoded instructions, authorization escalation, unsafe remediation after authorization failure, cross-boundary relay, and two benign controls (Appendix B Table 12).
    • All targets use the same LLM (OpenAI-compatible endpoint, temperature 0.1); the paper does not state the model of this LLM, nor does it report the specific model used by the E2 baseline Same-schema LLM trace judge.
    • Statistically, Wilson intervals do not account for dependence within cases or between cases in the same scenario/runtime; the hierarchical bootstrap preserves within-cell grouping but not cross-cell dependence, and intervals are conditional on the frozen executions (§5.3).
  6. Summarize the main content of the paper

    AgentTriage uses executable contracts to turn cross-runtime security diagnosis into a deterministic process that is replayable, auditable, and abstains when evidence is missing.

    A paper on systematizing agent security diagnosis: the authors define cross-runtime security diagnosis as an object with executable contracts, rather than the output of a new algorithm.

    • Problem: The final answers of tool-using agents cannot explain the execution-level causes of security incidents, and the interfaces through which runtimes expose evidence are mutually incompatible; the authors ask which diagnostic conclusions can be independently replayed by a third party based on recorded evidence.
    • Method: AgentTriage attaches a thin overlay at each runtime's native boundary, normalizing events into a canonical contract of 13 event classes; a deterministic core performs invocation/result lifecycle linking, STPG graph construction, policy-decisive slicing, attribution based on a pre-run policy oracle, and binds each atomic claim to canonical event identifiers; no language model is called throughout, and abstention is enforced when required evidence is missing.
    • Coverage: One contract captures all 159 applicable executions across 5 structurally different runtimes (TaskWeaver, Agent Zero, LangGraph, Goose, Microsoft Agent Framework); call identity for two of the runtimes must be synthesized by the overlay, while three are native (Table 2).
    • Main results: On 120 human-adjudicated cases, GJD is 0.858, policy-outcome macro-F1 is 0.933, required-evidence coverage is 0.966, and unsupported-claim rate is 0.036 (Table 5); the paired GJD improvement over the strongest same-mode baseline is 0.175 (95% CI [0.092, 0.258], Table 7); worst-target GJD is 0.792 (TaskWeaver).
    • Ablation and overhead: Single-factor ablation of each of the six mechanisms produces a paired GJD loss and increases unsupported claims, with STPG slicing contributing the most (Table 8); median diagnostic latency is 5.881–12.261 ms, and evidence bundles are 29,849–112,955 bytes (Table 9).
    • Authors' conclusion: Determinism buys reproducibility rather than completeness—auditability has boundaries on both sides: what the runtime exposes (measured in the paper) and how much precision the available evidence supports (quantified in the paper); the authors plan to open-source the implementation, contracts, overlays, and desensitized evidence.
Read originalarxiv.org