Traditional robots rely for their function on computing, to store internal representations of their goals and environment and to coordinate sensing and any actuation of components required in response. Moving robotics to the single-molecule level is possible in principle, but requires facing the limited ability of individual molecules to store complex information and programs. One strategy to overcome this problem is to use systems that can obtain complex behaviour from the interaction of simple robots with their environment. A first step in this direction was the development of DNA walkers, which have developed from being non-autonomous to being capable of directed but brief motion on one-dimensional tracks. Here we demonstrate that previously developed random walkers-so-called molecular spiders that comprise a streptavidin molecule as an inert 'body' and three deoxyribozymes as catalytic 'legs'-show elementary robotic behaviour when interacting with a precisely defined environment. Single-molecule microscopy observations confirm that such walkers achieve directional movement by sensing and modifying tracks of substrate molecules laid out on a two-dimensional DNA origami landscape. When using appropriately designed DNA origami, the molecular spiders autonomously carry out sequences of actions such as 'start', 'follow', 'turn' and 'stop'. We anticipate that this strategy will result in more complex robotic behaviour at the molecular level if additional control mechanisms are incorporated. One example might be interactions between multiple molecular robots leading to collective behaviour; another might be the ability to read and transform secondary cues on the DNA origami landscape as a means of implementing Turing-universal algorithmic behaviour.