In this paper, we provide a general framework for history-dependent utility models. Habit formation is a particular case of history-dependence and there has been no consensus thus far on how to formalize habits. Our framework allows one to study not only these various habit models but also satiation models and other history-dependent specifications that have their motivations and applications in different areas, including decision theory, macroeconomics and environmental economics. We provide a generalization for two aspects in the modeling: the history dependence level formation and the utility function formulation. In particular, history-dependence is not restricted to linear cases and utility is not restricted to additive nor multiplicative cases. The unifying framework in the present paper thus encompasses many of the modeling ways suggested in the existing literature. We further consider discrete-time infinite horizon dynamic optimization problems in which the instantaneous utility function is history-dependent. The way history dependence is designed allows the use of dynamic programming tools. Without concavity assumptions, we show the existence of a solution and that the value function is the unique fixed point of the Bellman operator. Uniqueness of the solution is obtained via additional concavity assumptions. Many previously used optimal growth history-dependent models fit into our framework.