HAICOSYSTEM: An Ecosystem for Sandboxing Safety Risks in Human-AI Interactions
Xuhui Zhou, Hyunwoo Kim, Faeze Brahman, Liwei Jiang, Hao Zhu, Ximing Lu, Frank Xu, Bill Yuchen Lin, Yejin Choi, Niloofar Mireshghallah, Ronan Le Bras, Maarten Sap
TL;DR
HAICOSYSTEM presents a modular sandbox to evaluate AI agent safety within holistic, multi-turn human-AI-environment interactions that include tool use across diverse domains. It introduces HAICOSYSTEM-EVAL, a comprehensive LM-based evaluation framework that assesses Targeted, System/Operational, Content, Societal, and Legal risks, plus Efficiency and Goal attainment. Large-scale experiments across 132 scenarios and 12 models reveal widespread safety risks, particularly with malicious users and complex tool interactions, underscoring the need for holistic ecosystem evaluation rather than isolated, single-turn tests. The authors also provide a code platform enabling scenario authoring, simulation, and safety evaluation to advance practical, reproducible safety research in real-world human-AI collaboration.
Abstract
AI agents are increasingly autonomous in their interactions with human users and tools, leading to increased interactional safety risks. We present HAICOSYSTEM, a framework examining AI agent safety within diverse and complex social interactions. HAICOSYSTEM features a modular sandbox environment that simulates multi-turn interactions between human users and AI agents, where the AI agents are equipped with a variety of tools (e.g., patient management platforms) to navigate diverse scenarios (e.g., a user attempting to access other patients' profiles). To examine the safety of AI agents in these interactions, we develop a comprehensive multi-dimensional evaluation framework that uses metrics covering operational, content-related, societal, and legal risks. Through running 1840 simulations based on 92 scenarios across seven domains (e.g., healthcare, finance, education), we demonstrate that HAICOSYSTEM can emulate realistic user-AI interactions and complex tool use by AI agents. Our experiments show that state-of-the-art LLMs, both proprietary and open-sourced, exhibit safety risks in over 50\% cases, with models generally showing higher risks when interacting with simulated malicious users. Our findings highlight the ongoing challenge of building agents that can safely navigate complex interactions, particularly when faced with malicious users. To foster the AI agent safety ecosystem, we release a code platform that allows practitioners to create custom scenarios, simulate interactions, and evaluate the safety and performance of their agents.
