BackgroundThe phyllosphere mycobiome plays a crucial role in plant fitness and ecosystem functions. The complex microbial ecological networks (MEN) formed by these fungi remain poorly understood, particularly with regard to their organization strategy and their contributions to plant secondary metabolites such as saponin.ResultsIn this study, we constructed six MENs from leaf epiphytic and endophytic mycobiomes of threePanaxspecies distributed in the northeast and southwest ends of mainland China. Hub nodes were absent in these MENs, which were significantly more complex, robust, and less efficient compared to random graphs (P< 0.05), indicating a hub-independent high-robustness strategy to maintain structural homeostasis. The important roles of specific MEN modules in shaping leaf saponin profiles of eachPanaxspecies were proved by multiple machine learning algorithms. Positive regulation modules (PRMs) of total saponin content were further identified, which exhibited more deterministic ecological assembly and comprised of highly connected nodes as well as higher proportion of plant-associated fungal guilds compared to other network members, indicating their tight links with host plant. The significant and direct effects (P< 0.05) of PRMs on total saponin accumulation were validated by well-fitted structural equation models (χ2< 0.3,P> 0.5). Taxonomic analysis revealed that Pleosporales and Chaetothyriales were significantly overrepresented by positive regulation taxa (PRT) of total saponin content (FDR < 0.05). Across PRT identified in threePanaxspecies,EpicoccumandConiothyriumwere conservatively present, while species-specific taxa such as Agaricales were also found, indicating the conservatism and specificity of plant-fungi interactions associated with leaf saponin accumulation inPanaxgenus.ConclusionsThese findings provide a foundation for understanding mechanisms maintaining the steady state of phyllosphere mycobiome in healthy plant, and offer clues for engineering phyllosphere mycobiome to improve the accumulation of bioactive secondary metabolites on the basis of network modules.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40793-023-00516-7.