How do you distinguish between good bots and bad bots?

We distinguish benign bots and malignant bots from client information collected by Javascript.