In this talk, we will introduce two problems of contract theory, in continuous–time, with a multitude of agents. First, we will study a model of optimal contracting in a hierarchy, which generalises the one–period framework of Sung (2015). The hierarchy is modeled by a series of interlinked principal–agent problems, leading to a sequence of Stackelberg equilibria. More precisely, the principal (she) can contract with a manager (he), to incentivise him to act in her best interest, despite only observing the net benefits of the total hierarchy. The manager in turn subcontracts the agents below him. Both agents and the manager each independently control a stochastic process representing their outcome. We will see through a simple example that even if the agents only control the drift of their outcome, the manager controls the volatility of the Agents’ continuation utility. Even this first simple example justifies the use of recent results on optimal contracting for drift and volatility control, and therefore the theory on 2BSDEs. We will also discuss some possible extensions of this model. In particular, one extension consists in the elaboration of more general contracts, indexing the compensation of one worker on the result of the others. This increase in the complexity of contracts is beneficial for the principal, and constitutes a first approach to even more complex contracts, in the case, for example, of a continuum of workers with mean–field interactions. This will lead us to introduce the second problem, namely optimal contracting for demand–response management, which consists in extending the model by Aïd, Possamaï, and Touzi (2019) to a mean–field of consumers. Finally, we will conclude by mentioning that this principal-agent approach with a multitude of agents can be used to address many situations, for example to model incentives for

lockdown in the current epidemic context.