  We make explicit a construction of Serre giving a definition of an algebraic
Sato-Tate group associated to an abelian variety over a number field, which is
conjecturally linked to the distribution of normalized L-factors as in the
usual Sato-Tate conjecture for elliptic curves. The connected part of the
algebraic Sato-Tate group is closely related to the Mumford-Tate group, but the
group of components carries additional arithmetic information. We then check
that in many cases where the Mumford-Tate group is completely determined by the
endomorphisms of the abelian variety, the algebraic Sato-Tate group can also be
described explicitly in terms of endomorphisms. In particular, we cover all
abelian varieties (not necessarily absolutely simple) of dimension at most 3;
this result figures prominently in the analysis of Sato-Tate groups for abelian
surfaces given recently by Fite, Kedlaya, Rotger, and Sutherland.
