Agent-Based Models (ABMs) are used in several fields to study the evolutionof complex systems from micro-level assumptions. However, ABMs typically cannot estimate agent-specific (or "micro") variables: this is a major limitationwhich prevents ABMs from harnessing micro-level data availability and whichgreatly limits their predictive power. In this paper, we propose a protocol tolearn the latent micro-variables of an ABM from data. The first step of ourprotocol is to reduce an ABM to a probabilistic model, characterized by acomputationally tractable likelihood. This reduction follows two general designprinciples: balance of stochasticity and data availability, and replacement ofunobservable discrete choices with differentiable approximations. Then, ourprotocol proceeds by maximizing the likelihood of the latent variables via agradient-based expectation maximization algorithm. We demonstrate our protocolby applying it to an ABM of the housing market, in which agents with differentincomes bid higher prices to live in high-income neighborhoods. We demonstratethat the obtained model allows accurate estimates of the latent variables,while preserving the general behavior of the ABM. We also show that ourestimates can be used for out-of-sample forecasting. Our protocol can be seenas an alternative to black-box data assimilation methods, that forces themodeler to lay bare the assumptions of the model, to think about theinferential process, and to spot potential identification problems.