The Theory of Incentives I: The Principal-Agent Model