We develop general recursive methods to solve for optimal contracts in dynamic principal-agent environments with hidden states and hidden actions. In our baseline model, the principal observes nothing other than transfers. Nevertheless, optimal incentive-constrained insurance can be attained....