How to remove the broken ball end of a small hex key that is now stuck inside the socket
Chances are you were turning it clockwise when it broke. By tapping it anti-clockwise with a small drift or cold chisel, it may unjam it, when a magnet along with gravity and tapping should release it.