Abstract. The optimization of the cloud resources used to power a multi-agent Internet of Things architecture is an important issue which has an important impact on the overall operation cost of the architecture. The resources tenancy is a costly operation, thus their allocation and management should be optimized based on the usage patterns. The infrastructure for the multi-agent system should not be affected by the deployment or maintenance life cycle, operations require parts of the system, or even the entire system to be offline during the execution of scheduled procedures. This paper outlines of the importance of the infrastructure audit, which offers a good insight of how the resources are used, the geographical areas which are heavily used and where the allocation or release of used resources is mandatory. Also, the security audit, in a distributed multi-agent architecture that handles a large number of heterogeneous devices, represents a good mechanism for performance improvement.Key words: Internet of Things, cloud computing, multi-agent systems 1. Introduction. The recent advances in Internet of Things (IoT) technologies and the cloud computing adoption have led to an increased usage of this two paradigms to create solid architectures that are able to handle hundred of thousands of concurrent connections, at the same time offering a good Quality of Service (QoS) and Quality of Experience (QoE) for the end user. The resources renting from public cloud providers for supporting the backbone infrastructure for an IoT architecture is beneficial for small and medium-sized enterprises (SME) or academic institutions which are trying to reach a large number of clients, because there is no need to upgrade or maintain the physical infrastructure. Even though the cloud client is not completely aware of the exact location of the hardware that delivers the required information, there are methods available that can determine the best route (considering both geographical location and bandwidth) for optimal performance [39].For handling a big number of connections from a wide range of devices, an Internet of Things architecture should employ a fast, secure, reliable and fail safe infrastructure for the services offered to the end users which rely upon the manner in which the information is collected. Because of different usage patterns that result from the daily routine of different groups of users, the best solution for building an infrastructure for the IoT framework relies on the elasticity provided by the cloud computing paradigm [11,15,23,33]. Also, the operational cost for maintaining the architecture up and running can be significantly reduced by releasing unused resources at daily time intervals when the audit operations report a low usage of the infrastructure.From the reliability and operational standpoint, the core infrastructure for the multi-agent system needs to bypass any bottlenecks introduced by the on demand created infrastructure. Therefore, any replacement or restart of the virtual machines should be...