Background: Maintaining glycemic equilibrium can be challenging for people living with type 1 diabetes (T1D) as many factors (eg, length, type, duration, insulin on board, stress, and training) will impact the metabolic changes triggered by physical activity potentially leading to both hypoglycemia and hyperglycemia. Therefore, and despite the noted health benefits, many individuals with T1D do not exercise as much as their healthy peers. While technology advances have improved glucose control during and immediately after exercise, it remains one of the key limitations of artificial pancreas (AP) systems, largely because stopping insulin at the onset of exercise may not be enough to prevent impending, exercise-induced hypoglycemia. Methods: A hybrid AP algorithm with subject-specific exercise behavior recognition and anticipatory action is designed to prevent hypoglycemic events during and after moderate-intensity exercise. Our approach relies on a number of key innovations, namely, an activity informed premeal bolus calculator, personalized exercise pattern recognition, and a multistage model predictive control (MS-MPC) strategy that can transition between reactive and anticipatory modes. This AP design was evaluated on 100 in silico subjects from the most up-to-date FDA-accepted UVA/Padova metabolic simulator, emulating an outpatient clinical trial setting. Results with a baseline controller, a regular MPC (rMPC), are also included for comparison purposes. Results: In silico experiments reveal that the proposed MS-MPC strategy markedly reduces the number of exercise-related hypoglycemic events (8 vs 68). Conclusion: An anticipatory mode for insulin administration of a monohormonal AP controller reduces the occurrence of hypoglycemia during moderate-intensity exercise.