mlsanityData to 7 Oct 2026

AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisation

arXiv 2312.13010 ↗First posted 20 Dec 2023cs.CLcited by 31

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

Abstract (arXiv)

The advancement of natural language processing (NLP) has been significantly boosted by the development of transformer-based large language models (LLMs). These models have revolutionized NLP tasks, particularly in code generation, aiding developers in creating software with enhanced efficiency. Despite their advancements, challenges in balancing code snippet generation with effective test case generation and execution persist. To address these issues, this paper introduces Multi-Agent Assistant Code Generation (AgentCoder), a novel solution comprising a multi-agent framework with specialized agents: the programmer agent, the test designer agent, and the test executor agent. During the coding procedure, the programmer agent will focus on the code generation and refinement based on the test executor agent's feedback. The test designer agent will generate test cases for the generated code, and the test executor agent will run the code with the test cases and write the feedback to the programmer. This collaborative system ensures robust code generation, surpassing the limitations of single-agent models and traditional methodologies. Our extensive experiments on 9 code generation models and 12 enhancement approaches showcase AgentCoder's superior performance over existing code generation models and prompt engineering techniques across various benchmarks. For example, AgentCoder (GPT-4) achieves 96.3% and 91.8% pass@1 in HumanEval and MBPP datasets with an overall token overhead of 56.9K and 66.3K, while state-of-the-art obtains only 90.2% and 78.9% pass@1 with an overall token overhead of 138.2K and 206.5K.

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

Builds on

36 of 41 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023Self-collaboration Code Generation via ChatGPT15 Apr

Other references · 35

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  7. 2021Program Synthesis with Large Language Modelscited by 3,509
  8. 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
  9. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
  10. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
  11. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  12. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
23 more
  1. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  2. 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  4. 2023Teaching Large Language Models to Self-Debugcited by 963
  5. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  6. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  7. 2023Reasoning with Language Model is Planning with World Modelcited by 846
  8. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  9. 2023AgentVerse: Facilitating Multi-Agent Collaboration and Exploring Emergent Behaviorscited by 580
  10. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  11. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  12. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  13. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  14. 2023Large Language Models as Tool Makerscited by 293
  15. 2023Structured Chain-of-Thought Prompting for Code Generationcited by 136
  16. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  17. 2023Self-planning Code Generation with Large Language Modelscited by 121
  18. 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
  19. 2023Mindstorms in Natural Language-Based Societies of Mindcited by 105
  20. 2023ProAgent: Building Proactive Cooperative Agents with Large Language Modelscited by 97
  21. 2022CERT: Continual Pre-Training on Sketches for Library-Oriented Code Generationcited by 87
  22. 2023CodeScore: Evaluating Code Generation by Learning Code Executioncited by 66
  23. 2023CodeChain: Towards Modular Code Generation Through Chain of Self-revisions with Representative Sub-modulescited by 58

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 7; 2025: 17; 2026: 7.

31 papers.

Sort:

By area:

  1. 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 125
  2. 2025Chain-of-Agents: End-to-End Agent Foundation Models via Multi-Agent Distillation and Agentic RLcited by 75
  3. 2025Do as We Do, Not as You Think: the Conformity of Large Language Modelscited by 48
  4. 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
  5. 2026Code as Agent Harnesscited by 40
  6. 2024MAGE: A Multi-Agent Engine for Automated RTL Code Generationcited by 31
  7. 2025ReasonMed: A 370K Multi-Agent Generated Dataset for Advancing Medical Reasoningcited by 26
  8. 2025LLM-based Agentic Reasoning Frameworks: A Survey from Methods to Scenarioscited by 25
  9. 2025Revisit Self-Debugging with Self-Generated Tests for Code Generationcited by 21
  10. 2025LoCoBench-Agent: An Interactive Benchmark for LLM Agents in Long-Context Software Engineeringcited by 16
  11. 2024A Human-Like Reasoning Framework for Multi-Phases Planning Task with Large Language Modelscited by 12
  12. 2025SOP-Agent: Empower General Purpose AI Agent with Domain-Specific SOPscited by 11
19 more
  1. 2025SyncMind: Measuring Agent Out-of-Sync Recovery in Collaborative Software Engineeringcited by 8
  2. 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Languagecited by 7
  3. 2025Pragmatic Reasoning improves LLM Code Generationcited by 6
  4. 2024Think Thrice Before You Act: Progressive Thought Refinement in Large Language Modelscited by 5
  5. 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
  6. 2025MAPLE: Multi-Agent Adaptive Planning with Long-Term Memory for Table Reasoningcited by 4
  7. 2024Can Github issues be solved with Tree Of Thoughts?cited by 3
  8. 2024MaCTG: Multi-Agent Collaborative Thought Graph for Automatic Programmingcited by 3
  9. 2024Seed-CTS: Unleashing the Power of Tree Search for Superior Performance in Competitive Coding Taskscited by 3
  10. 2024Thinking Before Running! Efficient Code Generation with Thorough Exploration and Optimal Refinementcited by 3
  11. 2025AgentCDM: Enhancing Multi-Agent Collaborative Decision-Making via ACH-Inspired Structured Reasoningcited by 2
  12. 2026TDD-Agent: Test-Driven Reasoning for Code Generationcited by 2
  13. 2025Lessons Learned: A Multi-Agent Framework for Code LLMs to Learn and Improvecited by 0
  14. 2025Reasoning Distillation and Structural Alignment for Improved Code Generationcited by 0
  15. 2025SOCIA-Nabla: Textual Gradient Meets Multi-Agent Orchestration for Automated Simulator Generationcited by 0
  16. 2026DIANOIA: Diagnostic Decomposition and Joint Optimization for Multi-Agent Reasoningcited by 0
  17. 2026Selective Left-Shift: Turning Test-Time Compute and Difficulty-based Curation into Training Data for Low-Resource Code Generationcited by 0
  18. 2026Homogenization in Multi-Agent Systemscited by 0
  19. 2026TestGRAD: Evolving Test Suites via Failure Pattern Momentum for SWE-Agent Ensemblecited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generation
  2. 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving
  3. 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation
  4. 2026LLM-Based Multi-Agent Systems for Code Generation: A Multi-Vocal Literature Review
  5. 2025A Survey on Code Generation with LLM-based Agents
  6. 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges
  7. 2024Self-Organized Agents: A LLM Multi-Agent Framework toward Ultra Large-Scale Code Generation and Optimization
  8. 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation