Agent based techniques are used to coordinate demand and supply for increasing the embedding capacity of dispersed, badly predictable, renewable energy based power systems. VPPs (Virtual Power Plants) using this technology have demonstrated their feasibility in field tests and currently are scaled up to satisfy requirements for massive rollout . These agent-based VPPs mostly are used in normal operating conditions of electricity grids. The VPPs typically have one fixed configuration that agents use for coordination. More operational flexibility can be achieved if VPP-configurations can be switched depending upon the current status of the grid (normal, critical, emergency ) in a heterarchical fashion. The DREAM software architecture framework is designed to satisfy the requirements for heterarchic operation of the grid. In this paper the design considerations are discussed, an in-depth analysis of the package structure for the information architecture components and a number of applications is presented. © 2015 IEEE.