DocAgent: A Multi-Agent System for Automated Code Documentation Generation
By: Dayu Yang , Antoine Simoulin , Xin Qian and more
Potential Business Impact:
Helps computers write clear instructions for code.
High-quality code documentation is crucial for software development especially in the era of AI. However, generating it automatically using Large Language Models (LLMs) remains challenging, as existing approaches often produce incomplete, unhelpful, or factually incorrect outputs. We introduce DocAgent, a novel multi-agent collaborative system using topological code processing for incremental context building. Specialized agents (Reader, Searcher, Writer, Verifier, Orchestrator) then collaboratively generate documentation. We also propose a multi-faceted evaluation framework assessing Completeness, Helpfulness, and Truthfulness. Comprehensive experiments show DocAgent significantly outperforms baselines consistently. Our ablation study confirms the vital role of the topological processing order. DocAgent offers a robust approach for reliable code documentation generation in complex and proprietary repositories.
Similar Papers
ResearchCodeAgent: An LLM Multi-Agent System for Automated Codification of Research Methodologies
Software Engineering
Writes computer code from research papers.
MDocAgent: A Multi-Modal Multi-Agent Framework for Document Understanding
Machine Learning (CS)
Answers questions using text and pictures together.
LocAgent: Graph-Guided LLM Agents for Code Localization
Software Engineering
Finds exact code changes needed for fixes.