Dynamical mean-field theory (DMFT) replaces the many-body dynamical problem with one for a single degree of freedom in a thermal bath whose features are determined self-consistently. By focusing on models with soft disordered p-spin interactions, we show how to incorporate the mean-field theory of aging within DMFT. We study cases with only one slow time-scale, corresponding statically to the one-step replica symmetry breaking phase, and cases with an infinite number of slow time-scales, corresponding statically to the full replica symmetry breaking (FRSB) phase. For the former, we show that the effective temperature of the slow degrees of freedom is fixed by requiring critical dynamical behavior on short time-scales, i.e. marginality. For the latter, we find that aging on an infinite number of slow time-scales is governed by a stochastic equation where the clock for dynamical evolution is fixed by the change of the effective temperature, hence obtaining a dynamical derivation of the stochastic equation at the basis of the FRSB phase. Our results extend the realm of the mean-field theory of aging to all situations where DMFT holds.