In order to produce an accelerating expansion (desirable for inflation and dark energy models) using a scalar field, that field must be slowly rolling. The two slow-roll parameters are defined as
$$
\begin{align}
\epsilon &= \frac{1}{\kappa^2} \left(\frac{V_{, \phi}}{V} \right)^2, \\
\eta &= \frac{V_{, \phi \phi}}{\kappa^2 \phi},
\end{align}
$$
where $\kappa = 8 \pi G$, $\phi$ is the scalar field and $V$ its potential.
When $\epsilon \ll 1$ and $|\eta| \ll 1$, the field is rolling slowly enough for acceleration to occur.
More on the slow roll formalism can be found in this work by Liddle, Parsons and Barrow: https://arxiv.org/abs/astro-ph/9408015.