Abstract. Atmospheric inversions are used to derive constraints on the net sources and sinks of CO2 and other stable atmospheric tracers from their observed concentrations. The resolution and accuracy that the fluxes can be estimated with depends, among other factors, on the quality and density of the observational coverage, on the precision and accuracy of the transport model used by the inversion to relate fluxes to observations, and on the adaptation of the statistical approach to the problem studied. In recent years, there has been an increasing demand from stakeholders for inversions at higher spatial resolution (country scale), in particular in the framework of the Paris agreement. This step up in resolution is in theory enabled by the growing availability of observations from surface in situ networks (such as ICOS in Europe) and from remote sensing products (OCO-2, GOSAT-2). The increase in the resolution of inversions is also a necessary step to provide efficient feedback to the bottom-up modeling community (vegetation models, fossil fuel emission inventories, etc.). However, it calls for new developments in the inverse models: diversification of the inversion approaches, shift from global to regional inversions, and improvement in the computational efficiency. In this context, we developed LUMIA, the Lund University Modular Inversion Algorithm. LUMIA is a Python library for inverse modeling built around the central idea of modularity: it aims to be a platform that enables users to construct and experiment with new inverse modeling setups while remaining easy to use and maintain. It is in particular designed to be transport-model-agnostic, which should facilitate isolating the transport model errors from those introduced by the inversion setup itself. We have constructed a first regional inversion setup using the LUMIA framework to conduct regional CO2 inversions in Europe using in situ data from surface and tall-tower observation sites. The inversions rely on a new offline coupling between the regional high-resolution FLEXPART Lagrangian particle dispersion model and the global coarse-resolution TM5 transport model. This test setup is intended both as a demonstration and as a reference for comparison with future LUMIA developments. The aims of this paper are to present the LUMIA framework (motivations for building it, development principles and future prospects) and to describe and test this first implementation of regional CO2 inversions in LUMIA.