Low-voltage distribution grids face new challenges through the expansion of decentralized, renewable energy generation and the electrification of the heat and mobility sectors. We present a multi-agent system consisting of the energy management systems of smart buildings, a central grid controller, and the local controller of a transformer. It can coordinate the provision of ancillary services for the local grid in a centralized way, coordinated by the central controller, and in a decentralized way, where each building makes independent control decisions based on locally measurable data. The presented system and the different control strategies provide the foundation for a fully adaptive grid control system we plan to implement in the future, which does not only provide resilience against electricity outages but also against communication failures by appropriate switching of strategies. The decentralized strategy, meant to be used during communication failures, could also be used exclusively if communication infrastructure is generally unavailable. The strategies are evaluated in a simulated scenario designed to represent the most extreme load conditions that might occur in low-voltage grids in the future. In the tested scenario, they can substantially reduce voltage range deviations, transformer temperatures, and line congestions