[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-81811-en":3,"doc-seo-81811-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},81811,137441390410,"Hazel","https://ap-avatar.wpscdn.com/avatar/2000252f4ab5702993?_k=1776741390130283984",8,"Research & Report","Agent4cs A Multi-agent System for Code Summarization in Large Hierarchical Codebases","Understanding large, complex codebases—especially those with obfuscated structures and incomplete documentation—remains a major challenge. Agent4cs proposes a multi-agent framework that generates repository summaries bottom-up by combining a summarization agent, a keyword-extraction agent that harvests critical subfolder information, and a quality-assurance agent that iteratively improves readability, coherence, and completeness. Experiments across 7 frontier models show an average 8% semantic-consistency gain versus structured prompting baselines, and real-world dataset evaluation yields up to 38% higher normalized keyword coverage.","Agent4cs: A Multi-agent System for Code Summarization in Large  \nHierarchical Codebases  \nYongjian Tang  \nSiemens AG Technical University of Munich  \nMunich, Bayern, Germany  \nEzgi Sarikayak  \nSiemens AG Technical University of Munich  \nMunich, Bayern, Germany  \nDoruk Tuncel  \nSiemens AG Munich, Bayern, Germany  \nJie M. Zhang  \nKings College London London, the United Kingdom  \nThomas Runkler  \nSiemens AG  \nTechnical University of Munich Munich, Bayern, Germany  \narXiv :2607 .0 1425v2 [ cs .AI] 4 Jul 2026  \nAbstract  \nUnderstanding large, complex codebases, especially those with obfuscated structures and incomplete documentation, remains a significant challenge. Existing code summarization solutions often rely on a single language model or coding assistant like Claude Code, and treat source code as flat text, underutilizing the rich interdependencies and hierarchical information within a repository. To address these shortcomings, we propose Agent4cs – a multi-agent framework that summarizes large codebases in a bottom-up fashion, where a summarization agent focuses on producing robust summaries; a keyword-extraction agent proactively identifies critical information from subfolders; and a quality-assurance agent iteratively refines the outputs for readability, coherence, and completeness. Evaluated on 7 frontier models, Agent4cs improves semantic consistency across all folder levels by average 8% compared to two structured prompting baselines with code segments. Furthermore, extensive evaluation on real-world datasets demonstrates up to 38% gains in normalized keyword coverage rate over the same baselines.  \nCCS Concepts  \n• Computing methodologies → Multi-agent systems; Cooperation and coordination; Natural language processing; • Software and its engineering → Software development techniques; Automatic programming; General programming languages.  \nKeywords  \nMulti-agent System, Large Language Models, Agents, Code Summarization, Software Engineering, Codebase  \n1 Introduction  \nAs software projects evolve rapidly, they often lead to incomplete, outdated, or inconsistent documentation. This friction slows onboarding, complicates maintenance, and increases the risk of defects and architectural drift. To address these problems, considerable efforts have been dedicated to automated code summarization, such as identifying class stereotypes and retrieving functional keywords [56] . More recently, deep learning approaches have advanced this field by utilizing neural models to learn complex mappings between code structures and natural language descriptions [34, 51] . The advent of Large Language Models (LLMs) [41, 54] has further minimized the semantic gap between code and natural language, offering new avenues for robust code summarization.  \nWhile advances in code-aware language models have significantly improved function-level summarization [41], achieving comprehensive repository-level summaries remains challenging – crossfile dependencies and hierarchical information are often dispersed across many directories and therefore not fully utilized. Prior efforts have shown that simply prompting an LLM is inadequate to capture all sub-modules throughout the repository [9, 12, 23], and interactive agents like Claude Code are designed for on-demand query-based code exploration rather than generating persistent documentation in a systematic way [43] . This problem is amplified for industrial codebases that often far exceed 300K tokens. Therefore, a more structured solution is required.  \nTo mitigate this gap, we propose Agent4cs – an agentic framework that features a keyword extraction agent to capture latent information from subfolders and a quality assurance agent to provide iterative feedback for summary refinement, as illustrated in Figure 1 . Combined with a bottom-up approach for hierarchical code summarization, the framework strengthens the cross-folder connections within repositories while ensuring summary quality and readability, s","cbCainickmVEQzxZ","https://ap.wps.com/l/cbCainickmVEQzxZ","pdf",1642874,3,1,11,"English","en",105,"# Abstract\n# Introduction\n## Function-level vs repository-level summarization\n# Problem Statement\n## Function-level Code Summarization\n## Hierarchical Code Summarization","[{\"question\":\"What problem does Agent4cs aim to solve in large codebases?\",\"answer\":\"It targets the difficulty of producing accurate, repository-wide summaries when codebases have obfuscated structures, incomplete documentation, and dispersed hierarchical information across many directories.\"},{\"question\":\"How does Agent4cs generate summaries from large hierarchical repositories?\",\"answer\":\"Agent4cs uses a bottom-up approach with multiple agents: a summarization agent for robust summaries, a keyword-extraction agent for critical information from subfolders, and a quality-assurance agent that iteratively refines outputs for readability, coherence, and completeness.\"},{\"question\":\"How effective is Agent4cs compared with baselines?\",\"answer\":\"Evaluations on 7 frontier models show about an 8% average improvement in semantic consistency across folder levels versus two structured prompting baselines, and real-world dataset tests report up to 38% gains in normalized keyword coverage.\"}]",1784176302,28,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"agent4cs-a-multi-agent-system-for-code-summarization-in-large-hierarchical-codebases","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/research-report/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/agent4cs-a-multi-agent-system-for-code-summarization-in-large-hierarchical-codebases/81811/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-24","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does Agent4cs aim to solve in large codebases?","Question",{"text":75,"@type":76},"It targets the difficulty of producing accurate, repository-wide summaries when codebases have obfuscated structures, incomplete documentation, and dispersed hierarchical information across many directories.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does Agent4cs generate summaries from large hierarchical repositories?",{"text":80,"@type":76},"Agent4cs uses a bottom-up approach with multiple agents: a summarization agent for robust summaries, a keyword-extraction agent for critical information from subfolders, and a quality-assurance agent that iteratively refines outputs for readability, coherence, and completeness.",{"name":82,"@type":73,"acceptedAnswer":83},"How effective is Agent4cs compared with baselines?",{"text":84,"@type":76},"Evaluations on 7 frontier models show about an 8% average improvement in semantic consistency across folder levels versus two structured prompting baselines, and real-world dataset tests report up to 38% gains in normalized keyword coverage.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]