An agent-based system may achieve its semantic richness through explicit ontologies, or domain-specific terminologies and theories. In order to detail the resulting ontology of the solution we introduce the O.D. (Ontology Description) phase in which we use two class diagrams: in the first, the D.O.D. (Domain Ontology Description) diagram, we describe the ontology of the domain representing the involved entities through classes; in the second, the C.O.D. (Communication Ontology Description) diagram, the focus is on the agents’ knowledge and the communicative relationships among these agents.
For each communication we need to specify three elements: ontology, language and interaction protocol. While several languages and interaction protocols are standardized by FIPA, ontology that is often strictly related to the problem is to be defined as a consequence of the specific application.
Figure 1: The Domain Ontology Diagram
We express ontology using class diagrams (Figure 1). Because of our particular attention for the automatic production of as much code as possible we describe the elements that constitute the domain ontology as an XML schema. In this way we can automatically obtain an XML description of the messages content expressed in one of the possible ACL (Agent Communication Language) languages (for example, in Figure 2 an XML-based standard FIPA language, RDF, is adopted).
In the D.O.D. diagram (Figure 1) we can see an example of the notation we use to specify the ontology. The elements defined in this diagram will be used to define the pieces of knowledge of the agents and the ontology of their communications.
In the C.O.D. diagram (Figure 2) we describe the agents’ knowledge and their communications (considering all the aspects: ontology, content language and interaction protocols).
In Figure 2, for example, the PurchaseManager agent starts a conversation (see QueryForAdvise association class) with the PurchaseAdvisor agent. The Conversation contains the Course ontology (see Figure 1), the Query protocol and the RDF language. This means that the PurchaseManager wants to perform a speech act based on the FIPA’s query protocol in order to ask the PurchaseAdvisor an advice on how to purchase (supplier, number of stocks, number of items per each, purchase-money) provided the Course information.
In designing this diagram we start from the results of the A.Id. phase. A class is introduced for each identified agent, and an association is introduced for each communication between two agents (ignoring at the moment distinctions about agents’ roles). A great contribution to the automatic construction of this diagram comes from the PTK tool. Obviously it is necessary to introduce the proper data structure (coming from the entities described in the D.O.D.) in each agent in order to store the exchanged data.
This description is both easy to understand and very complete and allows the simultaneous definition of two related elements: the agent’s knowledge and its communications specification.
The association line that represent each communication is drawn from the initiator of the conversation to the other agent as can be deducted from the description of their interaction performed in the R.I.D. phase. As already discussed each communication is characterized by three attributes. We group them in an association class. This is the characterization of the communication itself (a communication with different ontology/ language/ protocol is certainly different from this one) and it is naturally represented as an association because it relates the instances of the two agent classes creating a correspondence between the knowledge elements of them.
Figure 2: The Communication Ontology Diagram
Next phase: Role Description
Previous phase: Tasks Specification
Home: PASSI homepage