Making systems able to autonomously adapt them- selves to changes in their own body or in their environment is still a challenging task questioning a lot of different scientific communities. Many works propose either sophisticated adaptive model-based or learning-based techniques, as a solution. Most of them rely on the traditional perceive/decide/act framework, inspired by our human intuition about how we perceive the world. But recent contributions have shown that it is possible for an agent to discover the structure of its interaction with the environment or its own body via the so-called sensorimotor flow. This work is rooted in this paradigm, and a method for the building of an internal representation of the agent body is pro- posed. Importantly, it does not require any a priori knowledge nor model. A careful mathematical formalization is outlined, together with simulations demonstrating the effectiveness of the approach.