Clembot is a robot built by Clemont to run the Gym for him. However, due to a malfunction, his programming was very strict, only allowing Trainers with four badges in the gym. Since Clemont had no badges, he kicked out Clemont and Bonnie.
Season 18: XY Kalos Quest
Given to by Clemont
Magnemite is one of Clemont's pokemon at the Lumiose City gym. It was sent as security to protect the gym by Clembot, when Magnemite saw Clemont and his friends inside it was happy to see him. But remember it's job as a guard and attacked the gang with Thunder Shock until Froakie used his Frubbles to get passed it.
Magneton is another of Clemont's Pokémon who served as a patrol to the Gym while the Clembot was in control of it. After attacking the group with Metal Sound, Fennekin battled it. It easily dodged Fennekin's Ember by temporarily separating itself into three Magnemite but was stopped by Froakie's Frubbles.