TITLE: Do non-associative objects have a natural notion of representation?
QUESTION [32 upvotes]: A magma is a set $M$ equipped with a binary operation $* : M \times M \to M$.  In abstract algebra we typically begin by studying a special type of magma: groups.  Groups satisfy certain additional axioms that "symmetries of things" should satisfy.  This is made precise in the sense that for any object $A$ in a category $C$, the invertible morphisms $A \to A$ have a group structure again given by composition.  An alternate definition of "group," then, is "one-object category with invertible morphisms," and then the additional axioms satisfied by groups follow from the axioms of a category (which, for now, we will trust as meaningful).  Groups therefore come equipped with a natural notion of representation: a representation of a group $G$ (in the loose sense) is just a functor out of $G$.  Typical choices of target category include $\text{Set}$ and $\text{Hilb}$.
It seems to me, however, that magmas (and their cousins, such as non-associative algebras) don't naturally admit the same interpretation; when you throw away associativity, you lose the connection to composition of functions.  One can think about the above examples as follows: there is a category of groups, and to study the group $G$ we like to study the functor $\text{Hom}(G, -)$, and to study this functor we like to plug in either the groups $S_n$ or the groups $GL_n(\mathbb{C})$, etc. on the right, as these are "natural" to look at.  But in the category of magmas I don't have a clue what the "natural" examples are.  
Question 1:  Do magmas and related objects like non-associative algebras have a "natural" notion of "representation"?
It's not entirely clear to me what "natural" should mean.  One property I might like such a notion to have is an analogue of Cayley's theorem.  
For certain special classes of non-associative object there is sometimes a notion of "natural": for example, among not-necessarily-associative algebras we may single out Lie algebras, and those have a "natural" notion of representation because we want the map from Lie groups to Lie algebras to be functorial.  But this is a very special consideration; I don't know what it is possible to say in general.  
(If you can think of better tags, feel free to retag.)
Edit:  Here is maybe a more focused version of the question.
Question 2:  Does there exist a "nice" sequence $M_n$ of finite magmas such that any finite magma $M$ is determined by the sequence $\text{Hom}(M, M_n)$?  (In particular, $M_n$ shouldn't be an enumeration of all finite magmas!)  One definition of "nice" might be that there exist compatible morphisms $M_n \times M_m \to M_{n+m}$, but it's not clear to me that this is necessarily desirable.
Edit:  Here is maybe another more focused version of the question.
Question 3:  Can the category of magmas be realized as a category of small categories in a way which generalizes the usual realization of the category of groups as a category of small categories?
Edit:  Tom Church brings up a good point in the comments that I didn't address directly.  The motivations I gave above for the "natural" notion of representation of a group or a Lie algebra are in some sense external to their equational description and really come from what we would like groups and Lie algebras to do for us.  So I guess part of what I'm asking for is whether there is a sensible external motivation for studying arbitrary magmas, and whether that motivation leads us to a good definition of representation. 
Edit:  I guess I should also make this explicit.  There are two completely opposite types of answers that I'd accept as a good answer to this question:

One that gives an "external" motivation to the study of arbitrary magmas (similar to how dynamical systems motivate the study of arbitrary unary operations $M \to M$) which suggests a natural notion of representation, as above.  This notion might not look anything like the usual notion of either a group action or a linear representation, and it might not answer Question 3.
One that is "self-contained" in some sense.  Ideally this would consist of an answer to Question 3.  I am imagining some variant of the following construction: to each magma $M$ we associate a category whose objects are the non-negative integers where $\text{Hom}(m, n)$ consists of binary trees with $n$ roots (distinguished left-right order) and $m$ "empty" leaves (same), with the remaining leaves of the tree labeled by elements of $M$.  Composition is given by sticking roots into empty leaves.  I think this is actually a 2-category with 2-morphisms given by collapsing pairs of elements of $M$ with the same parent into their product.  An ideal answer would explain why this construction, or some variant of it, or some other construction entirely, is natural from some higher-categorical perspective and then someone would write about it on the nLab!

REPLY [2 votes]: There is a thing occurring in the overkill context of Lurie's Higher Algebra which seems related to this question.
Namely, in Ch 3.3, Lurie introduces a fairly general notion of "module for an algebra of an operad". More precisely, we fix the following data:

A unital operad $O$ (here "unital" means that for every color $C$ of the operad, there is a unique nullary $C$-valued operation). For example, $O$ could be the operad for unital magmas. I don't know how essential the unitality hypothesis is.
A "fibration of generalized operads" $C \to O$. I believe we're supposed to think of this as a category $C$ with "$O$-monoidal structure", or an $O$-algebra object in $Cat$. For example, if $O$ is the operad for unital magmas, then any monoidal category acquires such a structure by restriction along the map from $O$ to the associative operad.
An $O$-algebra $A$ in $C$. I'm not 100% sure I'm unwinding the definitions correctly (Lurie has several subtly different concepts he denotes by "$Alg$" with various decorations, and I'm not straight on what's what), but I believe that when $O$ is the operad for unital magmas and $C$ is a monoidal category, then $A$ is just a unital magma object in $C$.

Given this data, Lurie defines a category of "$O$-module objects over $A$", denoted 
$$Mod_A^O(C)$$
I don't have a great grasp on this -- part of the issue is that in fact, Lurie doesn't isolate this construction, instead jumping straight to the construction of this category plus a full $O$-monoidal structure (and even packaging it all up in a bigger construction which allows $A$ to vary), which requires his technical "coherence" hypothesis. (Caveat: Lurie doesn't prove that $Mod_A^O(C)$ is a category in general -- without the "coherence" hypothesis, it might just be some simplicial set. But I'll proceed under the assumption that even though coherence is needed to get an $O$-monoidal structure on $Mod_A^O(C)$, it's probably the case that $Mod_A^O(C)$ is at least a category in greater generality.) However, Lurie does say that

When $O$ is the commutative operad, we recover the usual notion of module over a commutative algebra $A$;
When $O$ is the associative operad, we recover the notion of an $(A,A)$-bimodule.

That second point really throws me, and bears repeating -- for Lurie, a "module over an associative algebra object" is neither a left nor a right module, but rather a bimodule (I hasten to add that he does develop the theory of left and right modules separately, without reference to this more general context). For example, Lurie's notion does not recover the notion of a group acting on a set. Lurie explains that the motivation for doing it this way (the idea of which I think he attributes to John Francis) is that he wants to have an $O$-monoidal structure on the category of $A$-modules -- and of course left $A$-modules don't generally have a monoidal structure, but $(A,A)$-bimodules do. I have no idea whether the operad for unital magmas satisfies the technical "coherence" condition guaranteeing that $Mod_A^O(C)$ does in fact have an $O$-monoidal structure; if it doesn't, then the main motivation for introducing this notion evaporates and perhaps it ends up not being useful. But it's still there.
If I have the chance to unwind what this construction yields in the case of the operad for magmas and ordinary 1-categories, I will edit to add more. Or perhaps somebody more familiar with this stuff can chime in.