Abstract. We present the creation and use of a generalized cost function methodology based on costlets for automated optimization for conformal and intensity modulated radiotherapy treatment plans. In our approach, cost functions are created by combining clinically relevant "costlets". Each costlet is created by the user, using an "evaluator" of the plan or dose distribution which is incorporated into a function or "modifier" to create an individual costlet. Dose statistics, dose-volume points, biological model results, non-dosimetric parameters, and any other information can be converted into a costlet. A wide variety of different types of costlets can be used concurrently. Individual costlet changes affect not only the results for that structure, but also all the other structures in the plan (e.g., a change in a normal tissue costlet can have large effects on target volume results as well as the normal tissue). Effective cost functions can be created from combinations of dose-based costlets, dose-volume costlets, biological model costlets, and other parameters. Generalized cost functions based on costlets have been demonstrated, and show potential for allowing input of numerous clinical issues into the optimization process, thereby helping to achieve clinically useful optimized plans. In this paper, we describe and illustrate the use of the costlets in an automated planning system developed and used clinically at the University of Michigan Medical Center. We place particular emphasis on the flexibility of the system, and its ability to discover a variety of plans making various trade-offs between clinical goals of the treatment that may be difficult to meet simultaneously.