  We study the role of regulatory inspections in a contract design problem in
which a principal interacts separately with multiple agents. Each agent's
hidden action includes a dimension that determines whether they undertake an
extra costly step to adhere to safety protocols. The principal's objective is
to use payments combined with a limited budget for random inspections to
incentivize agents towards safety-compliant actions that maximize the
principal's utility. We first focus on the single-agent setting with linear
contracts and present an efficient algorithm that characterizes the optimal
linear contract, which includes both payment and random inspection. We further
investigate how the optimal contract changes as the inspection cost or the cost
of adhering to safety protocols vary. Notably, we demonstrate that the agent's
compensation increases if either of these costs escalates. However, while the
probability of inspection decreases with rising inspection costs, it
demonstrates nonmonotonic behavior as a function of the safety action costs.
Lastly, we explore the multi-agent setting, where the principal's challenge is
to determine the best distribution of inspection budgets among all agents. We
propose an efficient approach based on dynamic programming to find an
approximately optimal allocation of inspection budget across contracts. We also
design a random sequential scheme to determine the inspector's assignments,
ensuring each agent is inspected at most once and at the desired probability.
Finally, we present a case study illustrating that a mere difference in the
cost of inspection across various agents can drive the principal's decision to
forego inspecting a significant fraction of them, concentrating its entire
budget on those that are less costly to inspect.
