By analyzing the characteristics of foundry enterprises and the features of multi-agent theory, this paper applies this theory in the management of foundry enterprise. A multi-agent model and a detailed multi-agent model of inventory management are constructed in this study. The KQML is adpoted to meet the requirements of communication between agents. This study set up KQML messages about data manipulation and then map these KQML messages to SQL clause. Based on this model, an inventory management system of ERP for foundry enterprise is developed. The successful application of this system proves that it is applicable to use the multi-agent theory to enhance the management of foundry enterprises.