Abstract:Driven by their remarkable capabilities in intent understanding, reasoning, planning, and execution, large language model (LLM)-based agents and multi-agent systems (MAS) are being widely deployed across various domains. In recent years, the capabilities of LLMs have significantly improved, and their interactions with external environments have increased. Meanwhile, attack methods targeting agent systems have continuously evolved, and LLM hallucinations remain difficult to avoid, exposing agent systems to diverse security threats in practical applications. Existing research indicates that relying solely on the inherent security mechanisms of LLMs is insufficient to guarantee system security. Consequently, the accurate identification of various anomalous behaviors is of critical importance for the sound development of the agent ecosystem. This study systematically reviews the security threats faced by current agent systems from three perspectives: the model layer, the cognitive layer, and the interaction layer. In addition, a topology-based approach is used to formally represent agents and MAS. A classification method based on a two-layer composite graph is proposed, on the basis of which anomaly detection methods for LLM-based agent security are reviewed and analyzed. Furthermore, six major security goals are proposed to enhance agent trustworthiness. Based on these goals, a multi-dimensional evaluation metric for anomaly detection is constructed, and its effectiveness and robustness are validated across mainstream models. Finally, this study discusses the main challenges of existing detection mechanisms and future development directions.