During the HK protests, I can imagine the same thing happening. Actually, in only a few cases where a strong leader and organization is involved (MLK, Gandhi, etc...) can protests be largely peaceful and more effective (not giving the other side an excuse to crackdown without losing face, and even these movements weren't perfect).
Yet, planted https://en.wikipedia.org/wiki/Agent_provocateur are a well documented and widely used tactic. It has proven to be effective in many cases to justify a reaction in the eyes of public opinion.
A planted agent definitely in the realm of possibility, but it is just more likely that some kids took a chance to get angry, violent, and cause chaos. Some combination could also have happened (e.g. a plant takes advantage of enraging people who are already closed to being enraged). In all cases, better leadership and some practiced discipline that comes with that could have helped avoided the problems.