Aim/Purpose: To identify and rectify the learning difficulties of online learners. Background: The major cause of learners' failure and non-acquisition of knowledge relates to their weaknesses in certain areas necessary for optimal learning. We focus on e-learning because, within this environment, the learner is mostly affected by these vulnerabilities due to the lack of direct contact with the teacher, who would be able to point out the learner's difficulties and help to rectify them. Methodology: The research sample was 49 learners enrolled in an online course. We focused on three cognitive factors: language, memory, and reasoning. We propose an approach to optimize learners' performances based on two intelligent agents that model the role of a teacher: the "detector agent" and the "rectifier agent". Contribution: The intelligent agents beneficially contribute to e-learning enrichment and the development of cognitive skills and solidification of knowledge acquisition. This is achieved by strengthening the memory, the assimilation of lessons by improving language skills, and the reinforcement of problem solving by developing reasoning and analysis capacity. Findings: The results show that the proposed approach efficiently detects the weaknesses of learners and resolves them intelligently. Future Research: The approach toward e-learning performance can be improved by focusing on other factors and intelligent agents that can improve the yield for learners and more effectively optimize system operation for their perceived needs.