In this paper, we describe an intelligent agent that presents different learning content such as tutorials, examples, and problems adaptively to individual students and learns from its interaction with the students how to improve its performance. We have built an end-to-end intelligent tutoring system, premised on the above goal, with a graphical user interface (GUI) front-end, an agent powered by case-based reasoning (CBR), and a mySQL database backend. We use a casebase to store the pedagogical strategies, embedded in the individual cases and the similarity retrieval and adaptation heuristics. Each case has situation, solution and outcome parameters. The situation parameters include the students' static and dynamic profiles and the instructional content's characteristics while the solution parameters specify the characteristics of the example or problem to be delivered to the student. We developed a set of CS1 content that includes five topics and deployed our system in the laboratories. Our results show that when the machine learning mechanism is activated, our agent is able to learn to tutor students more efficiently.