The computer in mechanical and electrical equipment can now detect equipment faults through simulation thanks to the advancement of artificial intelligence (AI) technology, which makes it convenient to monitor mechanical and electrical equipment. This paper begins with a quick introduction to Agent and the Agent system, explains how Agent is applied in the current context, then analyzes the hierarchical fault diagnostic model, identifies its flaws, and suggests improvement techniques. To increase the model’s accuracy and speed of operation, the contract net model and D-S (Dempster-Shafer) evidence theory are then incorporated. Finally, simulation experiments are used to confirm the accuracy and consistency of this model. According to the experimental findings, this optimization model runs at a pace that is noticeably faster than that of other models when subjected to the same workload, demonstrating the model’s efficacy. Models 1, 2, and 3 are put side by side to demonstrate how clearly multi-task processing may cut down on the model’s running time. In the second experiment, samples of mechanical and electrical equipment defect data are taken from two groups. The results of the comparative experiments demonstrate that the optimized model in this work can be reliable up to a maximum of 0.91 and a minimum of 0.63. It is demonstrated that the model in this work is rational by the fact that among the four types of fault prediction, the optimized model’s reliability is significantly greater than the traditional model’s. The research described in this publication therefore has some reference value for computer simulation of electromechanical equipment.