Monitoring the status of existing devices and identification of newly added devices is required in microgrids to adjust the operation schedule followed by any event or integration of a new device. Therefore, in this paper, automatic reconfiguration of microgrids is considered after the addition of a new device or change in the operation status of an existing device by using a multiagent system. This capability of the microgrid is named as auto-configuration function, which is performed by the auto-configurator agent. In case of addition of a new device, the auto-configurator agent is responsible for authorization and registration of the newly added device. In case of change in status of any existing device, the status information is updated. After integration of a new device or change in status of an existing device, re-optimization is carried out by the energy management system (EMS) agent. Agent communication language (ACL) is used to develop a modified contract net protocol (MCNP) for communication among different agents. EMS agent and auto-configurator agent exchange information for economic rescheduling of the microgrid components. Simulation results have shown that the proposed method can be used for optimal operation of microgrids when the configuration changes due to the addition/removal of a device.