This paper describes the methodology of an intelligent agent for building a self-adaptive course on the Web. An important task, therefore, is to combine adaptability with the learner-driven course in order to get a self-adaptive mechanism. For this, we have suggested a new structure for a web course. Based on this structure, we have suggested a new method to evaluate the granularity level of each segment on the course. This method evaluates the segment that a learner most prefers. To achieve this goal, we design and implement an agent called a confidence agent. Our experiment to evaluate our adaptation method shows that our approach greatly improves the domain model, and presents a course better related to the learner’s needs.