These functional tasks potentially apply to every level, from customer resource, feeder, and substation to the entire grid (e.g., a substation may perform its own share of state estimation in- stead of just providing raw data). The agents provide more ubiquitous local controls coordinated by global analysis, real-time tuning of control parameters, automatic arming and disarming of control actions, as well as functional coordination in the hierarchy, and in multiple time scales. The virtual architecture al- lows seamless integration of intelligence at all levels so that the locations of specific services and data are virtualized and trans- parent throughout the infrastructure. Such modular, flexible, and scalable infrastructure meets the global operational needs and allows for evolutionary implementation on a continental scale. It can respond to steady-state and transient operating conditions in real-time more effectively than conventional offline solutions. The agents operate at different time scales ranging from milliseconds to hours corresponding to the physical phenomena of the power grid. Their actions are organized by execution cycles. An execution cycle refers to a set of related functional tasks performed in a temporally coordinated manner. The specific periods and activities of the cycles are configurable ac- cording to the operating concerns, physical phenomena, control response times, computational burden, and engineering practices. In each cycle, at each hierarchical level, an agent is responsible for a specific function and for a specific portion of the grid, as needed. Each agent is persistent and capable of activating itself depending on the perceived context and deciding if a task within its purview is to be executed. The agents can execute their tasks synchronously or asynchronously, and access