The article deals with the created model of a smart factory using the principles of Industry 4.0. It is the creation of an autonomous manufacturing system, which combines into one unit the means of production, such as machines, handling units, warehouses, etc., as well as human resources and information flows. The manufacturing system is not centrally controlled, but each unit has its own control system and communicates with others on the Internet of Things principle. The entire manufacturing system behaves fully autonomously, organizes itself, and adapts to the specified requirements in real-time. Its goal is to produce the products as efficiently as possible at a given time based on customer requirements. The benefit of such system should then be a significant increase in productivity, quick and easy reconfiguration of the entire system, which is crucial mainly in the case of small series production.