Attempts to develop efficient and environmentally friendly building energy systems have led to modern complex energy concepts for buildings, which have consequently initiated a need for new control strategies for them. Multiagent control, which is known with other names like agent-based control, offers a promising solution to this challenge. To the knowledge of the authors, there are 96 platforms for multi-agent systems in different programming languages available, which are mostly java-based and mainly used in logistic applications, but there is no platform in the modeling language Modelica, which is widely used for simulation of dynamic systems, especially buildings performance simulation. This lack motivated the authors to develop a platform for agent-based control of HAVC systems. The platform eliminates the dependency of models developed in Modelica on an extra interface, which is usually required to couple the models to the platforms written in any programming languages other than Modelica. This paper presents the structure of the platform and explains how the agents' communications work. The flexibility of the optimization objective is ensured through the definition of readily interchangeable cost functions. The applicability and functionality of the platform are proved by applying the platform in the control of building energy systems examples.