This study focuses on the design and testing of a motivational animated pedagogical agent (APA) in an inquiry learning environment on kinematics. The aim of including the APA was to enhance students' perceptions of task relevance and selfefficacy. Given the under-representation of girls in science classrooms, special attention was given to designing an APA that would appeal to the female students. A review of the literature suggested that the best design solution would be an agent who was female, young, attractive, and ''cool''. An experiment compared three conditions: agent (image and voice), voice (no image), and control (no image and no voice). The research question was whether students' motivation and knowledge changed over time as they worked in the inquiry learning environment, and whether condition and gender affected such changes. Participants were 61 third-year students (mean age 14.7 years) from a secondary school. Gender was distributed evenly within and across conditions. A significant main effect of time on self-efficacy was found, with self-efficacy beliefs increasing significantly for both boys and girls. In addition, there was a significant interaction between time, condition, and gender for self-efficacy. About halfway during training, girls' self-efficacy beliefs significantly increased in both experimental conditions and decreased in the control condition. For boys the opposite pattern was found. Girls also gave higher appraisals for the agent. Students in all three conditions realized significant knowledge gains, which did not differ by gender. The discussion critically considers the need for, and design of motivational scaffolding in inquiry learning environments.