  A scalar--tensor theory of gravity, containing an arbitrary coupling function
$F(\phi)$ and a general potential $V(\phi)$, is considered in the context of a
spatially flat FLRW model. The use of reparametrization invariance enables a
particular lapse parametrization in which the mini--superspace metric
completely specifies the dynamics of the system. A requirement of existence of
the maximal possible number of autonomous integrals of motion is imposed. This
leads to a flat mini--superspace metric realized by a particular relation
between the coupling function and the potential. The space of solutions is
completely described in terms of the three autonomous integrals of motion
constructed by the Killing fields of the mini--supermetric and an additional
rheonomous emanating from the homothetic field. The solutions contain the
arbitrary function which remains after the imposition of the relation between
$F(\phi)$ and $V(\phi)$. To exemplify the use of the general results, we select
some particular cases and study their physical implications through an
effective energy--momentum tensor, which tends out to be that of a perfect
fluid.
