The complexity and diversity of future energy systems will require co-simulation solutions that enable the integration of tools from multiple domains for research and development. We introduce an open-source framework, OpenBuildNet, for distributed co-simulation of large-scale smart energy systems. Using a loose-coupling approach to co-simulate parallel processes, it can leverage and seamlessly integrate specialized simulation and computation tools in a common platform. Users can therefore benefit from the capabilities of state-of-the-art and widely used tools in each domain. OpenBuildNet is scalable and highly flexible as it uses a decentralized architecture, message-based communication, and peer-to-peer data exchange between subsystem nodes. It also provides a set of easy-to-use software tools tailored for researchers and engineers. This paper presents the architecture and tool suite of OpenBuildNet, and demonstrates its usefulness in a case study of controlling multiple buildings for demand response.