ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Mou, Yutao, Xue, Zhangchi, Li, Lijun, Liu, Peiyang, Zhang, Shikun, Ye, Wei, Shao, Jing
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918290403622912
author Mou, Yutao
Xue, Zhangchi
Li, Lijun
Liu, Peiyang
Zhang, Shikun
Ye, Wei
Shao, Jing
author_facet Mou, Yutao
Xue, Zhangchi
Li, Lijun
Liu, Peiyang
Zhang, Shikun
Ye, Wei
Shao, Jing
contents While LLM-based agents can interact with environments via invoking external tools, their expanded capabilities also amplify security risks. Monitoring step-level tool invocation behaviors in real time and proactively intervening before unsafe execution is critical for agent deployment, yet remains under-explored. In this work, we first construct TS-Bench, a novel benchmark for step-level tool invocation safety detection in LLM agents. We then develop a guardrail model, TS-Guard, using multi-task reinforcement learning. The model proactively detects unsafe tool invocation actions before execution by reasoning over the interaction history. It assesses request harmfulness and action-attack correlations, producing interpretable and generalizable safety judgments and feedback. Furthermore, we introduce TS-Flow, a guardrail-feedback-driven reasoning framework for LLM agents, which reduces harmful tool invocations of ReAct-style agents by 65 percent on average and improves benign task completion by approximately 10 percent under prompt injection attacks.
format Preprint
id arxiv_https___arxiv_org_abs_2601_10156
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback
Mou, Yutao
Xue, Zhangchi
Li, Lijun
Liu, Peiyang
Zhang, Shikun
Ye, Wei
Shao, Jing
Computation and Language
While LLM-based agents can interact with environments via invoking external tools, their expanded capabilities also amplify security risks. Monitoring step-level tool invocation behaviors in real time and proactively intervening before unsafe execution is critical for agent deployment, yet remains under-explored. In this work, we first construct TS-Bench, a novel benchmark for step-level tool invocation safety detection in LLM agents. We then develop a guardrail model, TS-Guard, using multi-task reinforcement learning. The model proactively detects unsafe tool invocation actions before execution by reasoning over the interaction history. It assesses request harmfulness and action-attack correlations, producing interpretable and generalizable safety judgments and feedback. Furthermore, we introduce TS-Flow, a guardrail-feedback-driven reasoning framework for LLM agents, which reduces harmful tool invocations of ReAct-style agents by 65 percent on average and improves benign task completion by approximately 10 percent under prompt injection attacks.
title ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback
topic Computation and Language
url https://arxiv.org/abs/2601.10156