The factors that determine differentiation of naive CD8 T cells into memory cells are not well understood. A greater understanding of how memory cells are generated will inform of ways to improve vaccination strategies. In this study, we analyzed the CD8 T cell response elicited by two experimental vaccines comprising a peptide/protein Ag and an agonist that delivers a costimulatory signal via CD27 or 4-1BB. Both agonists increased expansion of Ag-specific CD8 T cells compared with Ag alone. However, their capacity to stimulate differentiation into effector and memory cells differed. CD27 agonists promoted increased expression of perforin and the generation of short-lived memory cells, whereas stimulation with 4-1BB agonists favored generation of stable memory. The memory-promoting effects of 4-1BB were independent of CD4 T cells and were the result of programing within the first 2 d of priming. Consistent with this conclusion, CD27 and 4-1BB–stimulated CD8 T cells expressed disparate amounts of IL-2, IFN-γ, CD25, CD71, and Gp49b as early as 3 d after in vivo activation. In addition, memory CD8 T cells, generated through priming with CD27 agonists, proliferated more extensively than did 4-1BB–generated memory cells, but these cells failed to persist. These data demonstrate a previously unanticipated link between the rates of homeostatic proliferation and memory cell attrition. Our study highlights a role for these receptors in skewing CD8 T cell differentiation into effector and memory cells and provides an approach to optimize vaccines that elicit CD8 T cell responses.