In this paper we present two-level overlapping domain decomposition preconditioners for the finite-element discretisation of elliptic problems in two and three dimensions. The computational domain is partitioned into overlapping subdomains, and a coarse space correction is added. We present an algebraic way to define the coarse space, based on the concept of aggregation. This employs a (smoothed) aggregation technique and does not require the introduction of a coarse grid. We consider a set of assumptions on the coarse basis functions, to ensure bound for the resulting preconditioned system. These assumptions only involve geometrical quantities associated to the aggregates, namely their diameter and the overlap. A condition number which depends on the product of the relative overlap among the subdomains and the relative overlap among the aggregates is proved. Numerical experiments on a model problem are reported to illustrate the performance of the proposed preconditioners.