  In this paper we present a model for accelerated expansion of the universe,
both during inflation and the present stage of the expansion, from four
dimensional $\mathcal{N}=1$ supergravity. We evaluate the tensor-to-scalar
ratio ($r\approx 0.00034$), the scalar spectral index ($n_s\approx 0.970$) and
the running spetral index ($dn_s/dk\approx -6\times10^{-5}$), and we notice
that these parameters are in agreement with Planck+WP+lensing data and with
BICEP2/Keck and Planck joint analysis, at $95\%$ CL. The number of e-folds is
$50$ or higher. The reheating period has an associated temperature
$T_R\sim10^{12}$ GeV, which agrees with the one required by thermal
leptogenesis. Regarding the scalar field as dark energy, the autonomous system
for it in the presence of a barotropic fluid provides a stable fixed point that
leads to a late-time accelerated expansion of the universe, with an equation of
state that mimics the cosmological constant ($w_\Phi\approx -0.997$).
