Task: Design Agent Interactions
Design the interfaces and messaging portions of the agents.
Disciplines: Architecture
Relationships
Parent Practices
RolesPrimary Performer: Additional Performers:
InputsMandatory:
    Optional:
    • None
    Outputs
      Main Description

      Interactions take place when agents exchange information, send commands, participate on the same market, or influence the same shared variable or signal. In most cases, however, agents will communicate through messages with each other and coordinate their actions. This task deals with the design of these message-based interactions, the protocols, and interfaces required.

      Interactions can also occur through the environment (stigmergy). In this case, the information that is placed in the environment, the way other agents perceive it, and the way the environment alters the information (e.g., through dissipation or diffusion) has to be determined.

      Messages have to be mapped to methods defined in the agent and thus to proper reactions. The payload of the message contains the parameters of the method. The implementation platform has to support an according mapping between message and method. Usually, messages are defined in an Agend Communication Language (ACL).

      Steps
      Identify interactions between agents
      Find out under which circumstances agents interact with each other, what the purpose of each interaction is, what each participant expects from the other, and what the impact of the interaction failing is.
      Specify interaction primitives
      Interaction primitives determine the type of communication that takes place. They are categorisations of the kinds of interactions and are part of the messages to identify the expectation the sender has towards the receiver. Primitives could be "query", "inform", or others.
      Design interaction protocols

      Most interactions consist of an exchange of a number of messages. The order these messages are sent in defines a protocol.

      Protocols also specify which state an interaction can be in and what each participant in the interaction can expect to receive next or is supposed to send next. Frequently, they also deal with errors, such as lost messages, malformed messages, etc. Protocols are thus the basis for all interactions in MAS.

      Specify external agent interfaces
      The interaction protocols give details about the externally accessible functions of the agents. These functions can be depicted as methods in the UML class diagram describing the agent architecture. If that is the case, the «external» stereotype from the PosoMAS Auxiliary UML Profile can be applied to denote an externally accessible functionality.
      Implement interaction tests

      Interactions between agents have to be tested thoroughly. This means testing correct behaviour in cases that all necessary data is provided, as well as testing situations in which errors occur, such as timeouts.

      Illustrations
      Alternatives

      In O-MaSE (DeLoach & Garcia-Ojeda 2010), the "Model organisation interfaces" task from the "Solution analysis" activity describes a similar course of action: "If the organisation is a sub-organisation (an OA) of a higher-level organisation, the interactions between the roles/agents in the higher-level organisation and the OA define the initial set of interactions with this sub-organisation. However, if this is a stand-alone, or top-level organisation, the developer should considers interactions required with users as well as existing systems or databases to find the appropriate interfaces."

      More Information