A central concern in the global debate on artificial intelligence in education is whether AI-based learning tools substitute for, or coexist with, the human relationships on which learning has traditionally depended. This study tested these competing accounts, substitution versus complementarity, by examining whether students’ social interaction with peers and instructors operates as the mechanism linking AI-based learning tool usage to learning engagement. A quantitative, cross-sectional survey was conducted with 270 undergraduate students who had used at least one AI-based learning tool during the current semester, and the data were analyzed using partial least squares structural equation modeling (PLS-SEM) with bootstrapping (5,000 resamples). Contrary to the substitution account, AI-based learning tool usage positively predicted social interaction (? = 0.487, p < 0.001), its strongest path in the model, as well as learning engagement (? = 0.334, p < 0.001), while social interaction in turn predicted learning engagement (? = 0.298, p < 0.001). Critically, social interaction partially mediated the relationship between AI tool usage and engagement, accounting for approximately 30% of the total effect. Rather than bypassing the social dimension of learning, AI-based tools appear to work partly through it: students’ connections with peers and instructors carry a substantial share of the engagement benefit attributed to AI. The findings are drawn from a communally oriented higher education setting, an Islamic higher education institution in Indonesia whose pedagogical tradition is explicitly relational and collective, and where the stakes of the substitution question are therefore especially high. The results caution institutions, in faith-based and secular systems alike, against treating AI adoption and human connection as a zero-sum trade-off, and instead point toward course designs that deliberately couple AI-assisted learning with structured social interaction.