Modular cyber-physical production systems are an important paradigm of Industry 4.0 to react flexibly to changes. The flexibility of those systems is further increased with skill-based engineering and can be used to adapt to customer requirements or to adapt manufacturing to disturbances in supply chains. Further potential for application of these systems can be found in the topic of electrical energy supply, which is also characterized by fluctuations. The relevance of energy-optimized production schedules for manufacturing systems in general becomes more important with the increased use of renewable energies. Nevertheless, it is often difficult to adapt when short-term energy price updates or unforeseen events occur. To address these challenges with an autonomous approach, this contribution focuses on extensive-form games to adapt energy-optimized production schedules in an agent-based manner. The paper presents agent-based modeling to transform and monitor energy-optimized production schedules into game trees to respond to changing energy prices and disturbances in production. The game is setup with a scheduler agent and energy agents who are considered players. The implementation of the mechanism is presented in two use cases, realizing decision making for an energy price update in a simulation example and for unforeseen events in a real-world demonstrator.