(Co)modules in arbitrary monoidal categories 
*

*To make sure we are using the same definitions:


In any monoidal category (C, $\otimes$, I) we have a notion of a monoid object (M, $\mu$, $\eta$). This is an object M $\in$ C with morphisms $\mu$: M $\otimes$ M $\rightarrow$ M and $\eta$: I $\rightarrow$ M such that both pentagon diagram and unitor diagram commute. 
Unital, associative K-algebras over a field K are precisely the monoid objects in the (strict) monoidal category of K-vector spaces with conventional monoidal structure.
Here we further have the notion of a (co)module:
Let A be a K-algebra.
Denote by $l$ and $r$ the left and right unitor respectively. A left A-module is a tuple (M, $\rho$) consisting of an object M and a morphism $\rho$: A $\otimes$ M $\rightarrow$ M such that the equalities $\rho$ $\circ$ ($\mu$ $\otimes$ $id_M$) = 
$\mu$ $\circ$ ($id_A$ $\otimes$ $\rho$) and $\rho$ $\circ$ ($\eta$ $\otimes$ $id_M$) $\circ$ $l_M^{-1}$ = $\rho$ $\circ$ ($id_M$ $\otimes$ $\eta$) $\circ$ $r_M^{-1}$= $id_M$ hold.
A right module is defined analogously. We obtain comodules by flipping diagrams.
It seems that we can define objects with above (co)module structure in an arbitrary monoidal category.


*This leads to the following questions:


Is there a general name for such objects, that is modules and comodules in an arbitrary monoidal category?
Have they been studied in non-algebraic categories? Are there interesting (to you) examples?
 A: These objects are all monoids in a monoidal category or modules over monoids, including $k-$algebras which are monoids in the category of modules over $k$, i.e vector spaces over $k$. Another important example of a monoidal category is the endocunctor category.
The endofunctor category on $\textbf C$, $\text{Func}(\textbf C,\textbf C)$ whose objects are functors $\textbf C \rightarrow \textbf C$, morphisms are natural transformations and tensor product given by composition $F \otimes G = F \circ G$. Then the monoids in $\text{Func}(\textbf C,\textbf C)$ are known as monads.
You can have modules over monads aswell, read more here
A: Any monoidal category has monoid and comonoid objects. A "module" over a monoid object, or a "comodule" over a comonoid object, is usually called precisely that. "Monoids" and "comonoids" are also sometimes called "algebras" or "coalgebras", in homage to the concrete case you mention.
One thing that's interesting is to figure out what a comonoid object is when the monoidal structure is the Cartesian product (exercise!) 
It's also possible to generalize the notion of (co)algebra over a (co)module; if $\mathcal M$ is your monoidal category and $\mathcal C$ is itself an $\mathcal M$-module, so that there is a functor $\otimes: \mathcal C\times\mathcal M\to \mathcal C$ appropriately cohering with the monoidal structure on $\mathcal M$, then we can also let (co)modules in $\mathcal M$ (co)act on objects of $\mathcal C$, using precisely the same diagrams as those internal to $\mathcal M$. 
For instance, if $\mathcal M$ is the category of endofunctors of some category $\mathcal B$, then as has been mentioned, monoids in $\mathcal M$ are monads on $\mathcal B$, while comonoids are comonads. If $\mathcal C$ is the category of functors $\mathcal A\to \mathcal B$, then $\mathcal M$ acts on $\mathcal C$ by composition and for a monad $T\in \mathcal M$ a $T$-module in $\mathcal C$ is usually called a $T$-algebra, though as we can see from above $T$-module is a better name. The classical case of $T$-algebra comes when $\mathcal A$ is the terminal category, so that $\mathcal C=\mathcal B$. All this works for coalgebras (or comodules) over a comonad too, and there are important examples of this far from algebra, in functional programming.
