Battery storage systems are an important component of an energy supply system that is primarily based on the use of renewable energies. The flexibility of battery storage systems makes it possible to compensate for short-term fluctuations of supply-dependent wind power and photovoltaic systems and to bring them into line with the energy requirements of households, trade and industry. In order to use today's still comparatively expensive storage systems economically and technically in an optimal way, OFFIS, in close cooperation with the Leibniz University of Hannover and be.storaged GmbH, is investigating the possibilities of a multi-purpose use of battery storage. For this purpose, individual storage systems are networked to form a storage swarm in order to market the resulting degrees of freedom on different flexibility markets. Modern methods from machine learning and distributed artificial intelligence are used to analyse, forecast and optimise flexibility potentials in a distributed way.