Production of reliable and flexible distributed applications is a growing area of interest and research. Various middleware technologies are often used as the communication infrastructure and as a practical ease to the network programming problem. Among them, Message-Oriented Middleware (MOM) are known to provide reliable and flexible communication through asynchronous message passing. This kind of middleware is of particular interest when coordinating components that are not designed for simultaneous execution. Usually, MOM focus on the communication layer with a programming interface, charge to the external components to adapt to the MOM communication model. In this paper, we introduce a distributed programming model based on autonomous software entities called agents. Agents act as the glue software components and they offer reliable and flexible properties like atomic execution or migration from node to node. The combination of both a MOM and agents has been implemented in the AAA...