In order to achieve its goal in using intelligent adaptive and predictive technical systems with self-X functions and cognitive information processing in continuous interaction with environment, the Industry 4.0 initiative implies integration of Cyber-Physical Systems (CPS), the Internet of Things (IoT) and cloud computing leading to what is called "smart factory". This, in turn, faces the CPS with new challenges in terms of increasing the degree of distribution, autonomy, mobility, communication and security of the systems and their components, as well as expanding their functionality in the direction of data analytics, information and knowledge extraction, and increasing their intelligence. This paper discusses and analyses the CPS in the context of Industry 4.0 and the main trends in the development of process automation and control in order to suggest an appropriate and advanced agent based approach for development of CPS for process control. The proposed approach is based on using the following standards – from one side the IEC61499 Standard for agent specification and from other side the IEC62264 and IEC 61512 Standards for defining the different kind of agents in the control system. The presented approaches are illustrated with a partly presented example of development of Injector control system. Finally some conclusions are made.