This paper presents an overview of Pragma, an adaptive runtime infrastructure capable of reactively and proactively managing and optimizing application execution using current system and application state, predictive models for system behavior and application performance, and an agent based control network. The overarching motivation for this research is to enable the next generation of very largescale dynamically adaptive scientific and engineering simulations on widely distributed and highly heterogeneous and dynamic execution environments such as the computational "grid". Pragma combines 4 key components: system characterization and abstraction component, application characterization component, active network control, and policybase. The design of Pragma is driven by three astrophysical simulations chosen to be representative of a wide variety of important simulations and to expose many of the problems presently encountered (and currently unsolved) by computational physicists. The design, prototype implementation, and preliminary evaluations of Pragma components are presented.