Abstract:The artificial intelligence innovation ecosystem network is a key force reshaping the pattern of urban innovation agglomeration. Drawing upon innovation ecosystem theory, this paper constructs an analytical framework of “artificial intelligence innovation ecosystem network—ecological structure mechanism—urban innovation agglomeration” and empirically examines panel data of 271 prefecture-level cities in China from 2014 to 2024, employing social network analysis and the spatial Durbin model. The findings reveal that: First, this network exerts a significant positive driving effect on urban innovation agglomeration, and its spatial spillover effect follows a U-shaped pattern along geographical distance, with an optimal spillover radius of 500–600 kilometers. Second, ecological network routines play a mediating role in the above relationship, yet the indirect effect is negative, indicating that the accumulation of routines may solidify into “path lock-in” and hinder the dynamic adaptation of the innovation ecosystem. Third, both niche width and niche overlap significantly and negatively moderate the aforementioned positive relationship, revealing the boundary conditions of network synergy effects. Fourth, heterogeneity analysis shows that this effect is more pronounced in the central region, in both large-scale and small-scale cities, and in cities with low to medium levels of market integration. This study extends the application of innovation ecosystem theory in urban innovation geography and provides empirical support for the design of differentiated regional policies.