For an $(\infty,1)$-category $M$ the $(\infty,1)$-category $Fun(M,M)$ is a monoid object in the category $sSet$ and $M$ is endowed with a ($1$-categorial) left action of $Fun(M,M)$ and this action is universal among left actions on $M$.
Recall how the $(\infty,1)$-Grothendieck construction works in the following example: Let $I$ be a $1$-category, let $f:N(I)\to (\infty,1)Cat$ be a diagram. We obtain the desired cartesian fibration $X\to N(I)$ by first replacing $f$ by a simplicial functor $F:N_{coh}(I)^{op}\to sSet^+$ where $N_{coh}$ denotes the homotopy coherent nerve functor and $sSet^+$ denotes the category of marked simplicial sets. $F$ is a weakly fibrant object of $(sSet^+)^{N_{coh}(I)^{op}}$. Applying the unstraightening functor? $Un^+_{N(J)}$ we obtain a fibrant object $sSet^+/N(I)$ which we identify with the desired cartesian fibration $p:X\to N(I)$.
This statement shall be lifted to $(\infty,1)$.
Let $C$ be a symmetric monoidal category with tensor $\otimes$. The category $C^\otimes$ consists of the following data:
(1) Objects are finite sequences of $C$-objects $[C_1,\dots,C_n]$.
(2) Morphisms $f:[C_1,\dots,C_n]\to [C_1^',\dots C_m^']$ are pairs
where $S\subseteq \{1,\dots,n\}$ is a subset (or rather isomorphic in $Set$ to a subset) .
(3) Composition of $f:=(a_S,(f_i)_i):[C_1,\dots,C_n]\to [C_1^',\dots C_m^']$ and $g:=(b_T,(g_j)_j):[C_1^',\dots,C_m^']\to [C_1^{''},\dots C_l^{''}]$ is defined to be
for $1\le k\le l$.
In particular for $S:=\{C,D\}$ a set with two distinct we obtain:
Let $I$ be a category, let $f:I\to sSet$ be a functor. The nerve of $I$ relative $f$ denoted by $N_f(I)$ is defined as follows: Let $J$ be a finite linear order, the a map $\Delta^J\to N_f(I)$ consists of:
a functor $s:J\to I$
for every nonempty subset $J^\prime\subset J$ having a maximal element $j^\prime$, a map $\tau(J^\prime):\Delta^{J}\to f(\sigma(j^\prime))$.
satisfying properties.
mapping simplex: Let $\phi:A^0\leftarrow A^1\leftarrow \dots\leftarrow A^n$ be a composable sequence of maps of simplicial sets. The mapping simplex of $\phi$ is denoted by $M(\phi)$.
Let $M$ be a simplicial set. Let $End^{\otimes}(M):=N_E(\Delta^{op})$ and $\overline{End^\otimes}(M):=N_{\overline E}(\Delta^{op})$.
Let now $M$ be a $(\infty,1)$-category.
The map $p:End^{\otimes}(M)\to N(\Delta)^{op}$ determines a monoidal structure on the $(\infty,1)$-category $Fun(M,M)\simeq End^\otimes_{[1]}(M)$.
The map $q:\overline{End^\otimes}\to End^\otimes(M)$ exhibits $M\simeq \overline{End^\otimes_{[0]}}(M)$ as left tensored over $Fun(M,M)$.
This monoidal structure on $Fun(M,M)$ is called the composition monoidal structure.
Let $M$ be an $(\infty,1)$-category. Then a monad on $M$ is defined to an algebra object in $Fun(M,M)$