Considering the stochasticity in the output of agricultural products (APs), this paper establishes a green supply chain (SC) model of "cooperative + supermarket" based on Stackelberg game. Then, the optimal strategies of the producer and the seller were obtained under the decentralized and centralized decision-making models, respectively. Finally, an example analysis was conducted to analyze the sensitivity of consumer's greenness sensitivity, green cost coefficient and stochastic output ratio. The results show that: the green SC with stochastic demand cannot be coordinated under the decentralized model; the two-part traffic (TPT) contract causes the producer and the seller to fully cooperate with each other, which improves the AP greenness, optimizes the SC environment, increases the producer's expected profit and coordinates the entire SC; however, the seller's expected profit under the TPT contract will be the same as that under the decentralized model.