When do the (Set valued) models of a Lawvere Theory form an abelian category? By a "Lawvere Theory", I mean a category $\mathbb{T}$ with finite products and a distinguished family of objects $(S_\alpha)$, called sorts, where every object of $\mathbb{T}$ is isomorphic to a finite product of some $S_\alpha$s.
Then ($\mathcal{C}$-valued) models of $\mathbb{T}$ are exactly finite-product preserving functors $M : \mathbb{T} \to \mathcal{C}$. Moreover, $\mathbb{T}$-models assemble into a category with natural transformations as the arrows.
I'm curious if there are combinatorial conditions on the category $\mathbb{T}$ which force the category of $\mathsf{Set}$ valued $\mathbb{T}$-models to be abelian. I've made some partial progress (for instance, I think I know when the category of $\mathbb{T}$-models is enriched in $\mathsf{Ab}$), but I can't help but feel like I've been beaten to the punch by several decades. I suspect it will be fairly difficult to get a sufficient condition for the full structure of an abelian category, but I'm also interested in smaller results. For instance, when does the category of $\mathbb{T}$-models have biproducts?
(NB: the biproduct question might be easy -- I haven't thought about it at all yet. I'm just giving it as an example of the kinds of results I would be interested in)

Does anybody know of any work that's been done in this area? I've checked my usual books, as well as the nlab, but I haven't found anything.

Thanks in advance ^_^
 A: Let $\newcommand{\TT}{\mathbb{T}}\newcommand{\cAb}{\mathsf{Ab}}\TT_\cAb$ be the Lawvere theory of Abelian groups. It is a monoid in the category of Lawvere theories (the tensor product is given by some sort of "commutative coproduct": we put together freely all the operations of our two theories and we require that they commute). It's actually even an idempotent monoid, in the sense that the product $\TT_{\cAb}⊗\TT_\cAb→\TT_\cAb$ is an isomorphism. This is because of the Eckmann-Hilton argument (which shows also that the tensor product of two copies of the theory of groups is the theory of abelian groups).
Then a Lawvere theory has a category of algebras which is abelian if and only if it is equipped with a (necessarily unique) $\TT_\cAb$-action. In concrete terms, we need to have an interpretation of the theory of abelian groups in our algebraic theory in such a way that all the polynomials of the theory are linear. Linear combinations are themselves morphisms in the category of algebras and thus morphisms are stable by linear combinations.
Such an interpretation, if it exists, is unique. By the Eckmann-Hilton argument, we only need to show that the two zeros of two potential interpretations coincide. This is true because the zero of an algebra $X$ is given by the unique morphism from the terminal algebra to $X$.
Let us show more formally the above.

First, suppose that the category of algebras of $\TT$ is abelian. Then there is an interpetation of the theory of abelian groups in $\TT$ because for instance $(x,y) ↦ x+y$ corresponds to the morphism $\newcommand{\Free}{\operatorname{Free}}\Free(1)→\Free(1)⊔\Free(1)$ given by $i_1+i_2$ with $i_1$ and $i_2$ the two canonical injections. Let's see why this operation of the theory commutes with all the other operations. This means that for all $\TT$-algebra $X$, the sum defines a morphism $X^2→X$. This function is given by precomposition $\newcommand{\Hom}{\operatorname{Hom}}\Hom(\Free(2),X) → \Hom(\Free(1),X)$ with $i_1+i_2$. But we have $(i_1+i_2)f = i_1f + i_2f$ for all $f ∈ \Hom(\Free(2),X)$, so this function $X^2→X$ is actually $p_1+p_2$ with $p_1$ and $p_2$ the two canonical projections. The same goes for any linear combination instead of the sum $x+y$.
Reciprocally, we need to show that if there is an interpretation of the theory of abelian groups in $\TT$ commuting with all the other operations of $\TT$, then the category of $\TT$-algebras is abelian. We already saw why it is enriched over $\cAb$. We also see that $X×Y$ is the coproduct of $X$ and $Y$: if we have two morphisms $f:X→Z$ and $g:Y→Z$, we have the morphism $(x,y) ∈ X×Y ↦ f(x)+g(y)$ (given as the composite $X×Y→Z×Z→Z$ so we see it's a morphism). It is the unique morphism $X×Y→Z$ restricting to $f$ and $g$ along the two injections $x↦(x,0)$ and $y↦(0,y)$. The category of $\TT$-algebras has kernel and cokernel since it has all limits and colimits. And the image is given by the usual image, so it's abelian.

Here is an explanation of the link of this characterization with the one of Vladimir Sotirov.
An action of $\newcommand{\TT}{\mathbb{T}}\newcommand{\Ab}{\mathbf{Ab}}\TT_\Ab$ on $\TT$ is a morphism $α:\TT_\Ab⊗\TT→\TT$ satisfying some axioms. But $\TT_\Ab$ is idempotent and these axioms reduce to the fact that the canonical map $\TT→\TT_\Ab⊗\TT→\TT$ is the identity (this is a general fact of idempotent monads). There is a morphism $\TT_\Ab→[\TT,\TT]$ corresponding to $α$, which means that we have an abelian group structure on an object of $[\TT,\TT]$, and the axiom of the previous sentence says that it is the identity. It is also true in general that an abelian group is a commutative monoid $X$ such that $+,π_1 : X^2 → X$ are a product structure, so we see that the two characterizations are equivalent.
A: Abelian categories are characterized by being enriched in abelian groups, having finite limits, and being exact. A reference for this result is M. Barr, Exact categories, Springer Lect. Notes in Math. 2366 (1971) 1-120 (according to Borceux and Bourn's book Mal'cev, Protomodular, Homological and Semi-Abelian Categories). Since categories of models in a finitely complete/exact category are finitely complete/exact, your question reduces to necessary and sufficient conditons for the category of models to be enriched in abelian groups.
If $T$ is locally small, then it is necessary that it itself be enriched in abelian groups. Indeed, in that case $T^{op}$ is isomorphic to the category of representable functors as a full subcategory of all functors to $\mathbf{Set}$. Since representable functors are product-preserving, we see that $T^{op}$ is by by hypothesis a full subcategory of an abelian category, so $T^{op}$ has an enrichment in abeliean groups. But being enriched in abelian groups is evidently a self-dual notion, so $T$ also has an enrichment in abelian groups.
Now because $T$ has finite products, the structure of $T$ being enriched in abelian groups reduces to each object having the structure of an abelian group and every morphism being a homomorphism for this structure. On the one hand, $+\colon X\times X\to X$ is given by $\pi_1+\pi_2\colon X\times X\to X$ where $\pi_i\colon X\times X\to X$ are projection morphisms. The converse holds by, say, the Yoneda lemma.
We thus have

*

*a natural transformation $0\colon\mathbf 1\Rightarrow\mathrm{id}_T$, where $\mathbf 1\colon T\to T$ sends every object to the terminal object, and

*a natural transformation $+\colon\mathrm{id}_T\times\mathrm{id}_T\Rightarrow\mathrm{id}_T$
that satisfy the axioms of commutative monoid and have for each $X$ the pair of $+_X\colon X\times X\to X$ and one of the projections $\pi_i\colon X\times X\to X$ be a product structure (this makes the enrichment be in abelian groups rather than just commutative monoids).
Applying a product preserving functor $F$ then results in precisely the structure of an abelian group object on $F$: $F(\mathbf 1)\Rightarrow F$ and $F(+)\colon F\times F\Rightarrow F$. That natural transformations between product-preserving functors preserve this structure is immediate by the structure maps being images of morphisms. Consequently, we have our desired enrichment in abelian groups.
