Nowadays there is a clear trend towards using methods and tools that can help the development of Simulation Systems. In this regard, Multiagent System (MAS) is a key technology that allows simulating user behavior. When the user is the focus of the simulation, Ambient Intelligent (AmI) increases in importance. AmI is an emerging multidisciplinary area based on ubiquitous computing that aims to adapt the environment to the needs of the user. Moreover, Cloud Computing is revolutionizing the services provided through the Internet, continually adapting itself in order to maintain the quality of its services. This study presents a multiagent based middleware for the simulation of agent behavior in cloud environments, and uses this information to adapt to the environment as AmI proposed. The main challenge of this work is the design and development of a new middleware that makes possible the communication between the technology in charge of the development of MAS and the technology in charge of the simulation, visualization and analysis of the behavior of the agents using the potential of cloud computing. The platform makes the computation and communication possible by following the principles proposed by AmI.