This research proposes an innovative agent-based design method known as "MIRA" (Modular, Intelligent and Real-time Agent) to represent products as well as mechatronic components in manufacturing systems. The new agent exploits semantic knowledge representation of its capabilities, tasks and surroundings, and upon which performs rule-based reasoning leading to generation of the IEC 61499 Function Blocks for real time and distributed control of production systems. This approach facilitates product's mass customization through development of intelligent mechatronic systems. Furthermore, the MIRA approach is exemplified in a food production case study.