Anhydrous potassium nitrate is heated with excess of metallic potassium KNO3(s)+K(s)→X+Y In this reaction , the products X and Y are
K2O,N2
Between 550–790 °C, potassium nitrate reaches a temperature dependent equilibrium with potassium nitrite:
2KNO3⇌2KNO2+O2
But this is not the question. If we look carefully, solid anhydrous potassium nitrate is strongly heated with excess metallic potassium. The alkali metal is definitely a reducing agent:
2KNO3(s)+10K(s)⟶6K2O(s)+N2(g)↑