Collaborative robots are today ever more interesting in response to the increasing need for agile manufacturing equipment. Contrary to traditional industrial robots, collaborative robots are intended for working in dynamic environments alongside the production staff. To cope with the dynamic environment and workflow, new configuration and control methods are needed compared to those of traditional industrial robots. The new methods should enable shop floor operators to reconfigure the robot. This article presents a plug and produce framework for industrial collaborative robots. The article focuses on the control framework enabling quick and easy exchange of hardware modules as an approach to achieving plug and produce. To solve this, an agent-based system is proposed building on top of the robot operating system. The framework enables robot operating system packages to be adapted into agents and thus supports the software sharing of the robot operating system community. A clear separation of the hardware agents and the higher level task control is achieved through standardization of the functional interface, a standardization maintaining the possibility of specialized function features. A feasibility study demonstrates the validity of the framework through a series of reconfigurations performed on a modular collaborative robot.