**Abstract**

Nowadays, the application technology and demand are growth; there have been millions of solutions for user communication in smart cities. However, the quality of the autonomy of handheld devices and the information exchange of applications are functions of requesting services or participating in communications. Therefore, it is very difficult and tedious to implement resource management and control in such an environment. This study here proposes distributed cyber-physical systems (CPS) for agentbased middleware framework (AMF) using to achieve technology, thereby improving the reliability of environmental communication in smart cities. The technical solution has the characteristics of avoiding the problem of data source interruption because of the proxy technology of the linear calculation model. The aforementioned agents are independent and autonomous of each other in terms of providing seamless resource sharing and response scheduling, and have nothing to do with communication time and request queries. In this study, the architecture mainly uses the best linear calculation model to classify overlapping agents, and then allocates non-overlapping resources, and finally analyzes the overall architecture operation performance by responding to processed queries, storage utilization and resource usage, pause time and response.

**Keywords:** smart city, resource allocation, cyber physical system, linear optimization, agent technology
