mlsanityData to 14 Oct 2026

Defining and Detecting the Defects of the Large Language Model-based Autonomous Agents

arXiv 2412.18371 ↗First posted 24 Dec 2024cs.SEcited by 16

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

AI agents are systems capable of perceiving their environment, autonomously planning and executing tasks. Recent advancements in LLM have introduced a transformative paradigm for AI agents, enabling them to interact with external resources and tools through prompts. In such agents, the workflow integrates developer-written code, which manages framework construction and logic control, with LLM-generated natural language that enhances dynamic decision-making and interaction. However, discrepancies between developer-implemented logic and the dynamically generated content of LLMs in terms of behavior and expected outcomes can lead to defects, such as tool invocation failures and task execution errors. These issues introduce specific risks, leading to various defects in LLM-based AI Agents, such as service interruptions. Despite the importance of these issues, there is a lack of systematic work that focuses on analyzing LLM-based AI Agents to uncover defects in their code. In this paper, we present the first study focused on identifying and detecting defects in LLM Agents. We collected and analyzed 6,854 relevant posts from StackOverflow to define 8 types of agent defects. For each type, we provided detailed descriptions with an example. Then, we designed a static analysis tool, named Agentable, to detect the defects. Agentable leverages Code Property Graphs and LLMs to analyze Agent workflows by efficiently identifying specific code patterns and analyzing natural language descriptions. To evaluate Agentable, we constructed two datasets: AgentSet, consists of 84 real-world Agents, and AgentTest, which contains 78 Agents specifically designed to include various types of defects. Our results show that Agentable achieved an overall accuracy of 88.79% and a recall rate of 91.03%. Furthermore, our analysis reveals the 889 defects of the AgentSet, highlighting the prevalence of these defects.

Key facts. Cited by 16 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 31 of its 61 references that are in the map. First posted on arXiv 24 Dec 2024.

Builds on

31 of 61 references.

Closest ancestors · 7

Same direction, newest first

  1. 2024A Multi-Agent Approach to Fault Localization via Graph-Based Retrieval and Reflexion20 Sep
  2. 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep
  3. 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Future5 Aug
  4. 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
  5. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
  6. 2024LLM-Based Multi-Agent Systems for Software Engineering: Literature Review, Vision and the Road Ahead7 Apr
  7. 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation16 Aug

Other references · 24

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  2. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  3. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,439
  4. 2023StarCoder: may the source be with you!cited by 799
  5. 2024Large Language Model based Multi-Agents: A Survey of Progress and Challengescited by 769
  6. 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 634
  7. 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Basescited by 429
  8. 2024Understanding the planning of LLM agents: A surveycited by 421
  9. 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agentscited by 369
  10. 2024Personal LLM Agents: Insights and Survey about the Capability, Efficiency and Securitycited by 260
  11. 2024AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agentscited by 145
  12. 2024Exploring Large Language Model based Intelligent Agents: Definitions, Methods, and Prospectscited by 132
12 more
  1. 2024AI Agents Under Threat: A Survey of Key Security Challenges and Future Pathwayscited by 127
  2. 2024AIOS: LLM Agent Operating Systemcited by 97
  3. 2023Cognitive Mirage: A Review of Hallucinations in Large Language Modelscited by 84
  4. 2024KnowAgent: Knowledge-Augmented Planning for LLM-Based Agentscited by 61
  5. 2024Risks of AI Scientists: Prioritizing Safeguarding Over Autonomycited by 49
  6. 2024Moral Alignment for LLM Agentscited by 39
  7. 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trendscited by 26
  8. 2024An Empirical Study on Challenges for LLM Application Developerscited by 18
  9. 2024CEBench: A Benchmarking Toolkit for the Cost-Effectiveness of LLM Pipelinescited by 11
  10. 2024Hyperion: Unveiling DApp Inconsistencies using LLM and Dataflow-Guided Symbolic Executioncited by 7
  11. 2024Demystifying and Detecting Cryptographic Defects in Ethereum Smart Contractscited by 4
  12. 2024Utilizing Precise and Complete Code Context to Guide LLM in Automatic False Positive Mitigationcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 13.

16 papers.

Sort:

By area:

  1. 2025Where LLM Agents Fail and How They can Learn From Failurescited by 133
  2. 2026AgentForesight: Online Auditing for Early Failure Prediction in Multi-Agent Systemscited by 11
  3. 2026When Agents Fail: A Comprehensive Study of Bugs in LLM Agents with Automated Labelingcited by 6
  4. 2026Automated structural testing of LLM-based agents: methods, framework, and case studiescited by 3
  5. 2026LIDL: LLM Integration Defect Localization via Knowledge Graph-Enhanced Multi-Agent Analysiscited by 2
  6. 2026A Self-Healing Framework for Reliable LLM-Based Autonomous Agentscited by 2
  7. 2026AgentFlow: Building Agent Dependency Graphs for Static Analysis of Agent Programscited by 2
  8. 2026Do Agent Benchmarks Do What They Say? An Executable-Contract Audit of Tool-Using Agent Environmentscited by 2
  9. 2025Fine-Tuning LLMs to Analyze Multiple Dimensions of Code Review: A Maximum Entropy Regulated Long Chain-of-Thought Approachcited by 1
  10. 2026A Taxonomy of Runtime Faults in Model Context Protocol Serverscited by 1
  11. 2026HPFA: Hypergraph-Based Paired Failure Attribution for LLM Reasoningcited by 1
  12. 2025Specification and Detection of LLM Code Smellscited by 0
4 more
  1. 2026PYTHALAB-MERA: Validation-Grounded Memory, Retrieval, and Acceptance Control for Frozen-LLM Coding Agentscited by 0
  2. 2026LLM Code Smells: A Taxonomy and Detection Approachcited by 0
  3. 2026SkillSpec: Intent-Masked Specification Reasoning for Agent Skill Correctnesscited by 0
  4. 2026Do Tool Calls Execute as Intended? Measuring and Repairing Intent-Execution Correspondence in LLM Agentscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026SelfHeal: Empirical Fix Pattern Analysis and Bug Repair in LLM Agents
  2. 2026Beyond the Leaderboard: A Synthesis of Tool-Use, Planning, and Reasoning Failures in Large Language Model Agents
  3. 2026A Large-Scale Empirical Study of Quality Assurance Practices and Gaps in AI Agents
  4. 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System
  5. 2026LLM-Based Agents for Software and Systems Security: Approaches, Applications, and Assessment
  6. 2023AgentBench: Evaluating LLMs as Agents
  7. 2025Aegis: Taxonomy and Optimizations for Overcoming Agent-Environment Failures in LLM Agents
  8. 2024Testing and Understanding Erroneous Planning in LLM Agents through Synthesized User Inputs