Nowadays, one important goal of automation is to optimize the complete work and material flow under the constraints of energy consumption, quality and throughput. As a matter of fact, the whole control process should be flexible and reconfigurable which targets the three levels of the control pyramid (ERP, MES, Field). In the context of our ongoing research project LK 3 S an agent platform is under construction which enables optimization and flexibility. This paper discusses the design and development of a hardware abstraction layer for the lowest level of the control pyramid which offers all services needed by the agent platform and which allows links between work orders and tasks of the field level, e.g. a robot has to mount a tire. Field level tasks are elementary commands composed of a sequence of atomic operations. These tasks play a similar role as microcode for CPUs. Since every task operates individually it can be scheduled so that multiple concurrent actions can be serialized in a way that real-time requirements are still met. Even at runtime, new tasks can be dynamically defined, transfered, activated and deleted within the field level.