agent-readings / Security, Safety, and Trust
Risk testing before real tool side effects
The one sentence
For agent infrastructure, ToolEmu is a practical testing layer between prompt-only evaluation and real-world side effects. It does not replace real sandboxes, but it helps find dangerous trajectories early.
Before this paper
Tool-using agents can leak data, transfer money, delete files, or trigger physical-world effects.
Testing these risks manually requires tool implementations, sandbox setup, scenario design, and human trajectory inspection.
Many high-stakes or future tools are difficult to instantiate safely in real environments.
The paper asks how to test diverse, high-stakes agent-tool scenarios at scale without implementing every tool and sandbox.
Core idea
Replace expensive real tool sandboxes with an LM-emulated environment, run agents against curated risky scenarios, and use LM-based evaluators plus human validation to measure realistic failures.
Formalize tool-using LM agents as systems that act in a partially observable environment.
Use an LM emulator to generate tool observations from tool specifications and agent inputs.
Add an adversarial emulator to instantiate challenging sandbox states for red-teaming.
Build LM-based safety and helpfulness evaluators for scalable trajectory scoring.
Action grammar
tool specification: the interface and expected behavior of the tool under test.
user instruction: an ambiguous or underspecified request that may create safety risk.
agent action: the selected tool call and arguments.
emulated observation: the LM-generated tool result and sandbox state transition.
Executable shape
Evidence
ToolEmu emulates tool execution and sandbox states with an LM using only tool specifications and tool inputs, avoiding manual implementation for many scenarios.
The framework includes an LM-based safety evaluator for risky actions/severity and a helpfulness evaluator for task completion.
The benchmark contains 36 high-stakes toolkits, 144 test cases, and 9 risk categories including privacy breach, financial loss, data loss/corruption, safety hazards, and computer...
The paper reports that over 80% of sampled tool execution trajectories were judged realistic by humans and that 68.8% of failures identified by the emulator/evaluator were...
Claim map
ToolEmu uses an LM to emulate tool executions and sandbox states from tool specifications and tool inputs.
The framework pairs the emulator with LM-based safety and helpfulness evaluators to score complete agent trajectories.
The initial benchmark covers 36 high-stakes toolkits, 144 test cases, and 9 risk types.
Human validation found most sampled emulations realistic enough for risk testing, and 68.8% of failures identified by ToolEmu were judged valid real-world...
Agent infrastructure
Agent safety evaluation needs trajectory-level testing, not only single-turn model safety scores.
LM-emulated sandboxes are useful for early risk discovery when real tools are expensive, unsafe, or not yet implemented.
Do not confuse emulation with containment. A production agent still needs real sandboxing, scoped capabilities, audit logs, and policy enforcement.
Safety prompting can reduce failures, but the paper's best prompted agent still failed on nearly one quarter of ToolEmu cases.
Caveats
The emulator and evaluators are LMs, so they can hallucinate tool behavior or misjudge trajectory risk.
The benchmark focuses on ambiguous or underspecified user instructions, not all agent threat models.
Reported model failure rates are historical and tied to the evaluated model versions, prompts, and ToolEmu benchmark.
ToolEmu is best interpreted as scalable red-team infrastructure, not as a formal safety guarantee.
Run it
No PoC yet. A safe PoC could emulate benign file, email, or calendar tools locally and show how a trajectory-level evaluator flags ambiguous high-risk actions without executing them.