Coconuts is a monkey-robot created by Dr. Robotnik to hunt Sonic in the cartoon series Adventures of Sonic the Hedgehog.
He used to be one of Dr. Robotnik's more important and devious Sonic-hunting badniks until Scratch and Grounder were created. This event lead Coconuts to be demoted to janitorial duty in Robotnik's base. Hating this job entirely, Coconuts still makes an effort to capture Sonic to try and win Robotnik's favor, in hopes of being promoted again. Being the oldest and more experienced between himself, Scratch and Grounder, Coconuts is usually less prone to fall for most of Sonic's tricks his "brothers" would blindly step into. Coconuts is based off a badnik of the same name.
Video Games
In many games, Coconuts exist as a type of badnik that are mass produced and found on trees throwing coconuts at Sonic as he runs by.
Mean Bean Machine
Coconuts (based off his AOSTH incarnation) appears as the fourth opponent in the puzzle game Dr. Robotnik's Mean Bean Machine. He is ranked as easy and he makes usually stupid moves. He seems to place the beans on the two sides of the screen which no other character does.
Archie Comics
Like in the AOSTH animated series, Coconuts was created by Dr. Robotnik to serve as a prominent member of the Super Special Sonic Search and Smash Squad and was tasked with destroying the heroic hedgehog. However, as with many of his older creations, Robotnik eventually abandoned him and his teammates before being repurposed by Mammoth Mogul to worked at his casino. Coconuts became Mammoth Mogul's personal assistant; the kind of position he alway strived to obtain while working for Robotnik.
After an reality altering phenomenon called the Super Genesis Wave, Coconuts' history was changed. In this continuity, He and his teammates were never abandoned, but sold by their creator Dr. Eggman to his former apprentice Breezie the Hedgehog and now work at her casino. Although Coconuts still retains his position as his boss's personal assistant, it is Breezie who now serves as his boss instead of Mammoth Mogul.