  This work studies the multitasking principal-agent problem. I first show a
``uniformity'' result. Specifically, when the tasks are perfect substitutes,
and the agent's cost function is homogeneous to a certain degree, then the
optimal contract only depends on the marginal utility of each task and the
degree of homogeneity. I then study a setting where the marginal utility of
each task is unknown so that the optimal contract must be learned or estimated
with observational data. I identify this problem as a regression problem with
measurement errors and observe that this problem can be cast as an instrumental
regression problem. The current works observe that both the contract and the
repeated observations (when available) can act as valid instrumental variables,
and propose using the generalized method of moments estimator to compute an
approximately optimal contract from offline data. I also study an online
setting and show how the optimal contract can be efficiently learned in an
online fashion using the two estimators. Here the principal faces an
exploration-exploitation tradeoff: she must experiment with new contracts and
observe their outcome whilst at the same time ensuring her experimentations are
not deviating too much from the optimal contract. This work shows when repeated
observations are available and agents are sufficiently ``diverse", the
principal can achieve a very low $\widetilde{O}(d)$ cumulative utility loss,
even with a ``pure exploitation" algorithm.
