This dissertation describes a complete methodological framework for designing, modeling and optimizing a specific class of distributed systems whose dynamics result from the multiple, stochastic interactions of their constitutive components. These components can be robots endowed with very minimal capabilities, or even simpler entities such as insects, bacteria, particles, or molecules. We refer to such components as Smart Minimal Particles (SMPs). One of the main difficulties facing the modeling of SMPs is the potential complexity and richness of their dynamics. On the one hand, one needs detailed models that account for the physico-chemical properties of the lower-level components (e.g., shape, material, surface chemistry, charge, etc.), which, in turn, determine the nature and the magnitude of their interactions. On the other hand, one is also interested in models that can yield accurate numerical predictions of macroscopic quantities, and investigate formally their dependence on the system’s design and control parameters. These competing requirements motivate a combination of models at multiple levels of abstraction, as advocated by the Multi-Level Modeling Methodology (MLMM), which was introduced in prior works. The MLMM enables the fulfillment of both requirements in a very efficient way by incrementally building up models at increasing levels of abstraction in order to capture the relevant features of the system. This thesis extends and consolidates the MLMM along several axes. In a first step, we provide a theoretical consolidation of the MLMM. We propose a thorough classification of the different models of SMPs, and we discuss their underlying assumptions and simplifications. We shed light on the fundamental impact of embodiment and spatiality on models’ accuracy, and we define the conditions under which the macro-deterministic approximation is valid. These theoretical considerations are experimentally supported by five case studies of aggregation and Self-Assembly (SA) at different scales. The five case studies utilize three types of components: (i) miniature wheeled robots (Alice, 2 cm in size) endowed with limited computation, sensing, actuation, and communication capabilities, (ii) water-floating passive modules (Lily, 3 cm in size) endowed with four permanent magnets for mutual latching, and (iii) micro-fabricated cylinders (about 100 μm in diameter, studied in realistic simulation only) that can achieve SA in liquids. In a second step, we introduce the core contribution of this thesis, that is, a systematic and generic methodology for bridging the gap between real, physical systems and computationally efficient models at multiple abstraction levels. In particular, we describe the M3 computational framework, which enables the automated construction of models of SMPs. Our approach consists in observing (or simulating realistically) a system of interest, and building a hierarchical suite of models based on the observations (i.e., trajectories) collected during these experiments (or simulations). Internally, the framework first builds up a microscopic representation of the system based on these observations and on a list of interactions of interest specified by the user. This representation, called the Canonical Microscopic Model (CMM), is a formal and generic description of SMPs, and it serves as a blueprint for the construction of a macroscopic model, specified using the Chemical Reaction Network (CRN) formalism. The rates of the CRN are finally calibrated using a Maximum Likelihood Estimation (MLE) scheme. We validate the M3 framework on each of the three platforms discussed earlier, thereby illustrating its relevance both as a modeling and as an analysis tool. Finally, we discuss the role of multi-level modeling when designing and optimizing SMPs. In particular, we show that top-down model-based design of multi-robot systems is generally not amenable to efficient implementations when dealing with very resource-constrained robots. Instead, faithful and computationally efficient models built incrementally from the bottom up prove to be an essential tool for designing such systems. We further corroborate this claim by applying our automated modeling framework to the real-time control of the stochastic SA of Lily modules. Our scientific contribution is therefore three-fold. First, we provide a solid experimental and theoretical consolidation of the MLMM, which has been the subject of intense research efforts for the last decade. Second, we propose, for the first time, an approach to generate models at high abstraction level in a completely automated fashion, based solely on observations of the system of interest. Third, we provide deep insights into the modeling and the design of SMPs, with a specific emphasis on self-assembling systems ranging from the centimeter scale down to the micrometer scale