In everyday life, we often observe and learn from interactions between other individuals—so-called third-party encounters. As robots are poised to become an increasingly familiar presence in our daily lives, third-party encounters between other people and robots might offer a valuable approach to influence people’s behaviors and attitudes towards robots. Here, we conducted an online experiment where participants (n = 48) watched videos of human—robot dyads interacting in a cooperative or competitive manner. Following this observation, we measured participants’ behavior and attitudes towards the human and robotic agents. First, participants played a game with the agents to measure whether their behavior was affected by their observed encounters. Second, participants’ attitudes toward the agents were measured before and after the game. We found that the third-party encounters influenced behavior during the game but not attitudes towards the observed agents. Participants showed more effort towards robots than towards humans, especially when the human and robot agents were framed as competitive in the observation phase. Our study suggests that people’s behaviors towards robots can be shaped by the mere observation of third-party encounters between robots and other people.