Online learning has been widely applied due to developments in information technology. However, there are fewer relevant evaluations and applications for primary school students. All innovation efforts in learning are directed at improving the quality of education by creating an active learning atmosphere for students. Students’ participation in the teaching-learning process can be improved by selecting appropriate learning materials suitable to the student’s learning style. The research aims to develop and measure the impact of an Artificial-Intelligence (AI)-based learning style prediction model in an online learning portal for primary school students. The subjects were recruited from Indonesian primary school students in grades 4 to 6. To fulfill the principle of personalized learning, the AI model in the online learning portal was designed to recommend learning materials that suit students’ learning styles. We formulated a new AI approach that enables collaborative filtering-based AI models to be driven by learning style prediction. With this AI algorithm, the online learning portal can provide material recommendations tailored specifically to the learning style of each student. The AI model performance test achieved satisfactory results, with an average RMSE (Root Mean Squared Error) of 0.9035 from a rating scale of 1 to 5. Moreover, students’ learning performance was improved based on the results of t-test analysis on 269 subjects between the pre-test and post-test scores.