Animated agents are virtual characters who demonstrate facial expressions, gestures, movements, and speech to facilitate students’ engagement in the learning environment. Our research developed a courseware that supports a XML-based markup language and an authoring tool for teachers to script animated pedagogical agents in teaching materials. The design of the markup language refers to Mayer's segmenting principle that is efficient for assisting a teacher to edit teaching contents into a set of segments and further organize the segments in a given lesson in class. This paper details a case study of applying the proposed courseware for elementary students in English education, and further investigates how the instructional materials scripted using the courseware affect the learning achievement of students. Two groups of participants from an elementary school in Taiwan enrolled in this experiment. The experimental group used animated agent-based instructional materials in their English classroom, whereas the control group participated in a traditional curriculum. Post-test results revealed that the experimental group outperformed the control group. Our experiment demonstrated that the developed courseware provides an opportunity for scripting animated pedagogical agents as appropriate instructional tools in a computer-assisted language learning environment to foster elementary students’ English learning.