This is a report on a project with Francis Brown and its relation to some more recent work on Hecke actions on periods of iterated integrals of classical modular forms.
The cross ratio identifies the Riemann sphere minus 0, 1 and infinity with the moduli space $M_{0,4}$ of ordered 4 tuples of distinct points on $P^1$ mod projective equivalence. As observed by Deligne and Ihara in the 1980s, to understand the Galois action or the mixed Hodge structure on the fundamental group of $M_{0,4}$ with base point the tangent vector $d/dx$ at $x = 0$, it suffices to understand the Galois action, respectively, the periods, of the (etale, resp. de Rham) straight line path in $M_{0,4}$ from the tangent vector $d/dx$ at $x = 0$ to the tangent vector $-d/dx$ at $x = 1$. This path is the prototypical associator and is sometimes called "le droit chemin".
Many (perhaps all?) relations satisfied by associators come from the action of the symmetric group $S_3$ on $M_{0,4}$, the topology of $M_{0,4}$ and the embeddings of $M_{0,4}$ as open strata in the boundary of the natural compactification of $M_{0,5}$.
One can play the same game with $M_{0,4}$ replaced by $M_{1,1}$, the moduli space of smooth elliptic curves. In this case, to understand the Galois action and mixed Hodge structure on the fundamental group (with base point d/dq) of $M_{1,1}$, it suffices to understand the Galois action on the loop in $M_{1,1}$ corresponding to the imaginary axis in the upper half plane. This loop corresponds to an element of order 4 in the topological fundamental group $SL_2(Z)$ and is the prototypical inverter. Relations satisfied by inverters arise from the embedding of $M_{1,1}$ as a boundary stratum of the natural compactification of $M_{1,2}$, the universal elliptic curve with its identity section removed.
The KZ associator is the generating series of iterated integrals of the 1-forms $dx/x$ and $dx/(1-x)$ on $M_{0,4}$. This has a whole hierarchy of analogues in the modular case. In all cases, these are power series that are generating functions of iterated integrals of modular forms. The series one gets depend on which proalgebraic completion of $SL_2(Z)$ one chooses. In the most general version, the coefficients are all iterated integrals of classical modular forms of all levels. In another, they are only iterated integrals of modular forms of weight 2, which are just 1-forms on modular curves.
In addition to expanding on the comments above, I will construct the various completions of $SL_2(Z)$ and the corresponding de Rham inverter. I will explain how, when one pulls back the "weight 2" inverter to level 2, one gets a generalization of the usual KZ associator.