The demand for energy has been growing over the years to match development and population growth. The current sustainable development model advocates for the use of renewable (green) energy sources with an aim of lowering carbon emissions thereby mitigating the effects of climate change. A circular economy aspires to keep materials in use for as long as possible thus the reuse of agricultural waste especially in energy generation is a step in this direction. This study reports on the optimization of anaerobic digestion parameters for biogas production when wastes from pineapple are co-digested with those from livestock. The volume of biogas yield was optimized with regards to temperature, pH value, and mixing ratio of the substrates using Box Behnken Design (BBD), a class of Response Surface Methodology (RSM). This was achieved through a software package, Design Expert 13.The experiments were performed using Rehau home gas systems of 6 m3 in Jomo Kenyatta University of Agriculture and Technology. Pineapple wastes were co-digested with livestock waste in the ratio of 1:1, 1:2 and 1:3. The numerical optimization results revealed that the maximum biogas yield was 1.98 m3 when the pH was set at 6.0, temperature at 30 °C and pineapple mixing ratio at 62.5%. The results from this study can form a basis for policy makers in formulating strategies to guide adoption of biogas generated from agricultural waste as a key green energy for the economy.