Use of agents for predictive maintenance and diagnostics of machine tools