mlsanityData to 7 Oct 2026

Many Hands Make Light Work: An LLM-based Multi-Agent System for Detecting Malicious PyPI Packages

arXiv 2601.12148 ↗First posted 17 Jan 2026cs.SEcited by 1

On the map: LLM agents and tool use → Agent threats, guardrails and governance

Abstract (arXiv)

Malicious code in open-source repositories such as PyPI poses a growing threat to software supply chains. Traditional rule-based tools often overlook the semantic patterns in source code that are crucial for identifying adversarial components. Large language models (LLMs) show promise for software analysis, yet their use in interpretable and modular security pipelines remains limited. This paper presents LAMPS, a multi-agent system that employs collaborative LLMs to detect malicious PyPI packages. The system consists of four role-specific agents for package retrieval, file extraction, classification, and verdict aggregation, coordinated through the CrewAI framework. A prototype combines a fine-tuned CodeBERT model for classification with LLaMA-3 agents for contextual reasoning. LAMPS has been evaluated on two complementary datasets: D1, a balanced collection of 6,000 setup.py files, and D2, a realistic multi-file dataset with 1,296 files and natural class imbalance. On D1, LAMPS achieves 97.7% accuracy, surpassing MPHunter--one of the state-of-the-art approaches. On D2, it reaches 99.5% accuracy and 99.5% balanced accuracy, outperforming RAG-based approaches and fine-tuned single-agent baselines. McNemar's test confirmed these improvements as highly significant. The results demonstrate the feasibility of distributed LLM reasoning for malicious code detection and highlight the benefits of modular multi-agent designs in software supply chain security.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 22 of its 43 references that are in the map. First posted on arXiv 17 Jan 2026.

Builds on

22 of 43 references.

References · 22

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023AgentVerse: Facilitating Multi-Agent Collaboration and Exploring Emergent Behaviorscited by 580
  3. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  4. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  5. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  6. 2023AutoAgents: A Framework for Automatic Agent Generationcited by 211
  7. 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
  8. 2024LLM-Based Multi-Agent Systems for Software Engineering: Literature Review, Vision and the Road Aheadcited by 155
  9. 2017Malware Detection by Eating a Whole EXEcited by 114
  10. 2023Can ChatGPT Defend its Belief in Truth? Evaluating LLM Reasoning via Debatecited by 92
  11. 2022Natural Attack for Pre-trained Models of Codecited by 72
  12. 2020Backstabber's Knife Collection: A Review of Open Source Software Supply Chain Attackscited by 57
10 more
  1. 2024A Survey on LLM-based Multi-Agent System: Recent Advances and New Frontiers in Applicationcited by 54
  2. 2023Investigating ChatGPT's Potential to Assist in Requirements Elicitation Processescited by 25
  3. 2023An Empirical Study of Malicious Code In PyPI Ecosystemcited by 18
  4. 2024Automated test generation to evaluate tool-augmented LLMs as conversational AI agentscited by 17
  5. 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generationcited by 16
  6. 2023Killing Two Birds with One Stone: Malicious Package Detection in NPM and PyPI using a Single Model of Malicious Behavior Sequencecited by 9
  7. 2021A Large-Scale Security-Oriented Static Analysis of Python Packages in PyPIcited by 4
  8. 2025Teamwork makes the dream work: LLMs-Based Agents for GitHub README.MD Summarizationcited by 4
  9. 2024A Machine Learning-Based Approach For Detecting Malicious PyPI Packagescited by 3
  10. 2025Detecting Malicious Source Code in PyPI Packages with LLMs: Does RAG Come in Handy?cited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026CHASE: LLM Agents for Dissecting Malicious PyPI Packages
  2. 2026PYPILINE: Malicious PyPI Package Detection via Suspicious API Knowledge and Agent Workflow
  3. 2025From LLMs to Agents: A Comparative Evaluation of LLMs and LLM-based Agents in Security Patch Detection
  4. 2025LLMs as Firmware Experts: A Runtime-Grown Tree-of-Agents Framework
  5. 2026Bridging Expert Reasoning and LLM Detection: A Knowledge-Driven Framework for Malicious Packages ↗
  6. 2026LLM-Enhanced Hierarchical Heterogeneous Graph Representation Learning for Malicious Python Package Detection
  7. 2025Shadows in the Code: Exploring the Risks and Defenses of LLM-based Multi-Agent Software Development Systems
  8. 2026ProfMalPlus: Agent-Coordinated Detection of Malicious NPM Packages via Static-Dynamic Analysis Synergy ↗