Majority of IoT solutions use data analysis at the Cloud level, collecting a huge amount of raw data from many thousands of peripherals. What if I told you that you can move from raw data collection to knowledge aggregation by implementing Artificial Intelligence into IoT systems? During the talk, I will show the benefits of introducing AI at the earliest possible stages, applying the concept of moving from Cloud computing to Fog computing. The basic principle of constructing AIoT systems is the use of the node logic, where a node of the system has to process the provided information in a form of abstract concepts, but not in a form of raw information. Further, the experience of one device learning and the history of its life cycle can be applied to new models, automatically programming their production cycles for the most efficient use. Actually, IoT solutions should apply AI components at each level of data transfer. Following this approach, the whole system becomes self-optimizing. Also, during the talk, I will present related case studies and demonstrate a working stand.