###### Abstract  
It is critical for quality requirements, such as trust, privacy, and confidentiality, to be fulfilled during the execution of smart city applications. In this study, smart city applications were modeled as agent systems composed of many agents, each with its own privacy and confidentiality properties. Violations of those properties may occur during execution due to the dynamic of agent behavior, decision-making capabilities, and social activities. In this research, a framework called Agent Quality Management was proposed and implemented to manage agent quality in agent systems. This paper demonstrates the effectiveness of the approach by applying it toward a smart city application called a crowdsourced navigation system to verify and assess agent data confidentiality. The AnyLogic Agent-Based Modeling tool was used to model and conduct the experiments. The experiments showed that the framework helped to improve the detection of agent quality violations in a dynamic smart city application. The results can be further analyzed using advanced data analytic approach to reduce future violations and improve data confidentiality in a smart city environment. s 2  
Crowdsourcing and crowdsensing are effective, scalable, and cost-efficient data collection and processing systems. The capabilities of the smart devices and sensors to be interconnected in these crowdsourcing and crowdsensing systems allow for the execution of many useful applications, such as traffic monitoring and environment monitoring. Despite the benefits, many smart city applications, together with social networking, have exposed users to threats, such as inference attack, identity theft, and location tracking, that will lead to remote hijacking of the devices, as well as risking physical safety of the users [2]. To maintain sustainable cities and communities, it is vital to ensure that people in the ecosystem are happy and satisfied with the provided smart city services to enhance their quality of life [3]. Therefore, the national and international security threats and instabilities that occur in smart cities and megacities need to be continuously monitored in order to make better predictions, decisions, and necessary improvements [4]. For this study, it is believed that run-time verification of quality properties could help to detect violations that may occur during the execution of smart city applications. To perform the study, smart city applications were modeled as agent systems composed of multiple agents. The concept of agent systems, as either single-agent or multi-agent systems, has been used to actively model and implement distributed systems in recent decades. The definitions and applications of the concept also vary according to the purpose, i.e., how and where the concept is implemented. Multi-agent systems have been used to model designs and to implement solutions for various kinds of distributed problems in industries [5], social networking [6], and smart city applications [7]. Agents in smart city systems represent users (citizens) or other smart elements and devices that have their own unique profile and identity. Each agent in a smart city also has quality properties, such as privacy and confidentiality, that need to be protected. Agent quality properties are important requirements for trusted and reliable smart city applications [8]. Thus, despite the aim of the smart city applications to be effective and efficient in improving quality of life, it is also important to ensure that agents' quality properties are established. Privacy and data confidentiality are examples of agent quality properties in a typical agent system, such as a smart city application. The violations of these quality properties occur most of the time during execution due to the dynamics of agent behavior, decision-making capabilities, and social activities [9]. Hence, an agent quality management system that contains proper run-time verification and quality assessment processes is needed to detect violations of the specified quality properties.