We present an approach for building high-level task representations from a robot’s own experiences of interacting with a teacher. A learner robot follows a human teacher and maps its own observations of the environmento the known effects of its available skills, building at run-time a representation of the experienced task in the form of a behavior network. The learner can act next as a teacher, and transfer the acquired knowledge to other robots. To enable this we introduce an architecture that extends the capabilities of behavior-based systems by allowing the representation and execution of complex and flexible sequences of behaviors. We demonstrate our approach in a set of experiments in which robots learn representations for multiple tasks from both human and robot teachers.