Smart grid software interconnects multiple Engineering disciplines (power systems, communication, software and hardware technology, instrumentation, big data, etc.). The software architecture is an evolving concept in smart grid systems, in which system architecture development is a challenging process. The architecture has to realize the complex legacy power grid systems and cope with current Information and Communication Technologies (ICT). The distributed generation in a smart grid environment expects the software architecture to be distributed and to enable local control. Smart grid architecture should also be modular, flexible, and adaptable to technology upgrades. In this paper, the authors have made a comprehensive review of architectures for smart grids. An in depth analysis of layered and agent-based architectures based on the National Institute of Standards and Technology (NIST) conceptual model is presented. Also presented is a set of smart grid Reference Architectures dealing with cross domain technology.