Sustainability and long‐term prosperity are chronic challenges in the agriculture sector of many countries. To address such challenges, farmer cooperatives are formed as an innovative approach to improve the livelihoods of millions of farmers around the world. Inspired by real‐life practice in the Kenya coffee industry, we study a class of stochastic and dynamic inventory models for storable agricultural products with random exogenous supply and price. For a variety of cost functions relevant in practice, we characterize the optimal selling policies to maximize the farmer cooperatives’ expected profit. We show that for concave inventory holding cost, the sell‐all‐or‐retain‐all ( r, R) (or sell‐all‐or‐retain‐all R) policies are optimal with (without) the fixed selling cost; for convex holding cost, the sell‐down‐to ( S, s) (or sell‐down‐to s) policies are optimal with (without) the fixed selling cost. For the special case of linear holding cost, the optimal policy is a cut‐off price policy and we derive closed‐form expressions for the optimal policy and the optimal total discounted profit. We discuss the model extensions to include general stochastic harvest and price processes, selling/storage capacity limits, price‐dependent random demand with a spot market, and the flexibility of procurement from other producers, and then perform a numerical study to quantify the impact of the optimal solutions. Reconciling the theory with practice, useful insights and guidelines are provided to help farmer cooperatives make strategic selling decisions.