1. A first agent device for message routing with content passing and reference passing for a distributed system with a plurality of interacting agent devices wherein the interaction between the interacting agent devices occurs through exchange of messages, an exchanged message including a content portion (CP) and a reference identifier (RI) associated with a particular agent device, the reference identifier (RI) enabling any other agent device to establish a communication with the particular agent device, the content portion (CP) having a type which is either a content type or a message-set type, the first agent device comprising: a first interface component configured to load a first agent class specification defining a first finite state machine (FSM 1 ) which is configured to control the function of the first agent device when executed by a process execution engine; a second interface component 120 ) configured to retrieve at least a subset of a plurality of messages (M 2 _ 1 , M 2 _ 2 , M 2 _ 3 ) from a message buffer, the plurality of buffered messages (M 2 _ 1 , M 2 _ 2 , M 2 _ 3 ) originating from a plurality of multi-agent devices linked to a second agent class specification defining a second finite state machine (FSM 2 ) wherein the first finite state machine (FSM 1 ) and the second finite state machine (FSM 2 ) enable the interaction of the first agent device with the plurality of multi-agent devices; at least one processor component configured to run the process execution engine and, in accordance with the first finite state machine (FSM 1 ), to process retrieved buffered messages (M 2 _ 1 , M 2 _ 2 , M 2 _ 3 ), to generate an aggregate message (M 3 ) including at least a subset of the buffered messages (M 2 _ 1 , M 2 _ 2 , M 2 _ 3 ) in the content portion (CP) of the aggregate message (M 3 ), and to provide the aggregate message (M 3 ) for further processing.