The use of gestures by humans and other primate species is a core component of nonverbal communication and also of high interest for both the development and the evolution of language. Although the intentional use of gestures to communicate might develop through experience, much less is known about its underlying mechanisms. We drew on different experimental situations of a food-requesting paradigm to elucidate this issue in olive baboons (Papio anubis). The first experiment investigated whether baboons selectively gestured towards an attentive audience. After being trained in gesturing, baboons were exposed to varied test conditions in which the experimenter adopted different attentional states. We showed that baboons tailored their gestures to the sheer visual attention of the human, using the state of the eyes (open or closed) as a relevant cue to attention. More visual gestures were observed in front of a visually attending human, whilst acoustic gestures were rather produced when the experimenter could not see them. Such elaboration in acoustic signalling to compensate for communication breakdown offers solid evidence of intentional and flexible use of gestures by these monkeys. The second experiment addressed the influence of previous experience with humans on baboons’ gestural communication. Using another group of subjects, we manipulated the human cues to attention the baboons were exposed to during the training, and then examined their discriminatory skills of human attentional states. We found that discriminatory abilities were deeply affected by the cues to attention encountered during the training, highlighting the role of experience in this process. In sum, monkeys trained by an attentive human match the criteria of intentional communication set in human children, whilst monkeys put aside from this experience do not. This provides an exciting developmental framework to primate intentional communication and suggests that individual rearing conditions are an essential component of it.