This paper presents the design of a multi-agent framework that aids engineers in the adaptation of modular production systems. The framework includes general implementations of agents and other software components for self-learning and adaptation, sensor data analysis, system modelling and simulation, as well as human-computer interaction. During an adaptation process, operators make changes to the production system, in order to increase capacity or manufacture a product variant. These changes are automatically captured and evaluated by the framework, building an experience base of adjustments that is then used to infer adaptation knowledge. The architecture of the framework consists of agents divided in two layers: the agents in the lower layer are associated with individual production modules, whereas the agents in the higher layer are associated with the entire production line. Modelling, learning, and adaptations can be performed at both levels, using a semantic model to specify the structure and capabilities of the production system. An evaluation of a prototype implementation has been conducted on an industrial assembly system. The results indicate that the use of the framework in a typical adaptation process provides a significant reduction in time and resources required.