This paper describes a distributed software architecture designed to manage, in an integrated way, interoperable Smart-Grid networks. It has been designed to address the fact of having massive deployments of AMI, DA, and HAN devices (meters, concentrators, sensors) from multiple vendor technologies, which must be accessed through several communications networks. This network management system is used to deliver the service configurations to the Smart-Grid, retrieve data measurements, and monitor network availability. The proposed architecture is based on autonomous, intelligent, cooperative, distributed agents. The intelligence is achieved by means of data ontology definitions and rule-engines. Data ontologies are retrieved from the different reference data models (smart-grid, communications, proprietary and other models). Each agent is able to specialize in an autonomous way by means of rule sets and the specific data models. Agents are reactive to external events and communicate by means of an event-based real-time middleware. This middleware provides a structured distributed event-bus. Using this architecture, it is possible to monitor the whole network status, deliver complex service definitions to the smart-meters, upgrade device and service configurations, and retrieve measurements with security. In addition, as the intelligence is distributed in agents, it is possible to segregate the different functional roles in the service, associating them to the corresponding agents. This architecture has already been tested on huge device deployments.