Cyber-Physical System (CPS) is a key concept in the fourth industrial revolution, acting as the backbone infrastructure
to develop Industry 4.0 compliant solutions based on decentralized networks of cyber-physical entities. In such systems, the distribution of intelligence and data analytics capabilities by different computational layers assumes a crucial relevance to support monitoring, diagnosis, prediction, and optimization tasks. Multiagent Systems (MAS) is a suitable approach to support this distribution through vertical and horizontal dimensions. In this context, this article introduces a modular agent-based architecture to balance the distribution of data analysis capabilities in industrial CPS. The proposed MAS solution was implemented in an industrial automotive factory plant, which applicability, novelty, and benefits were recognized, e.g., through its inclusion in the Innovation Radar of the Great EU-funded Innovations due to its contribution for the implementation of Zero Defects Manufacturing strategies in multistage production systems.