Skip to content

Agent Communication Languages in AI for Knowledge Sharing

Agent Communication Languages for Knowledge Sharing

Communication and knowledge-sharing characteristics are necessary in order to achieve interoperability in Multi-Agent System. Knowledge has to be represented in a meaningful way for agents to be able to understand the information transmitted between them. In the previous article, we looked into the concept of knowledge representation in Artificial Intelligence and mentioned some popular examples of languages used for defining ontology and the body of knowledge including Knowledge Interchange Format (KIF) and Extensible Mark-up Language (XML). In this article, we will look into some of the Agent Communication Languages (ACL) in AI that have been developed to standardize the way agents communicate, including KQML, FIPA ACL and SOAP.

Agent Communication Languages and Protocols for Interoperability of Intelligent Agents

The interoperability of Intelligent Agents is an important issue in Multi-Agent System. The ability to communicate and share knowledge is necessary for agents to interact. The interaction and cooperation of agents are impossible without standardized ways of communicating knowledge. Standardize communication protocols are required to ensure that agents have a standard way of communicating with each other. 

Different strategies and protocols have been developed to enable communication between software components and the exchange of information between applications [1]. These communication protocols include Remote Procedure Call (RPC), Remote Method Invocation (RMI) in Java, Distributed Component Object Model (DCOM), and Common Object Request Broker Architecture (CORBA). CORBA is a distributed object protocol created by the Object Management Group (OMG) to enable object-level interoperability [2]. OMG is a leader in defining specifications in the area of mobile agent systems. CORBA enables the communication between software components and procedures that are written in different languages on different computers. Its messages contain procedures but no semantics. 

As discussed earlier, Intelligent Agents are autonomous and computational entities that can control internal states and actions, and make decisions on how to reply or react to messages from other agents. Such communication protocols allow agents to directly transfer information and change the state or behavior of other agents, but this is insufficient for total inter-agent expression [3, 4]. These protocols are a viable means of conveying messages between agents, but higher-level communication protocols with rich semantics would be required to enable higher-level agent interactions including cooperation and negotiation.

ACLs are distinguished from other communication methods (e.g. CORBA) by their semantic complexity. They allow handling of complex semantics and exchange of more complex objects including agents’ desired states, goals, experience, and shared plans. Agents using ACLs are able to engage in task-oriented conversations, which include shared sequences of messages transmitted between them. 

ACLs are high-level communication methods and use lower-level communication protocols for transferring information. Examples of lower-level communication protocols include TCP/IP, Simple Mail Transfer Protocol (SMTP), and HyperText Transfer Protocol (HTTP) to transfer information over a network. A number of ACLs have been developed for this purpose including KQML, FIPA ACL, and SOAP.

The following sections discuss these ACLs in more detail and describe the Speech Act theory, which has inspired and influenced the creation of these languages. 

Speech Act Theory 

The research on ACLs was inspired by the work of philosopher John Austin and his Speech Act theory [5]. Austin stated that a certain class of utterances in communication could be considered as actions, which can change the state of the world. These utterances are referred to as speech acts or performative verbs. Speech acts can represent the state and intention of agents, or affect their plans and understanding of the environment. 

Searle [6] continued Austin’s work in 1969 and consequently formalized the structure of speech acts by defining their different classes and the necessary and sufficient conditions for their successful performance. Cohen and Levesque [7, 8] introduced speech acts in AI and developed a plan-based theory of speech acts. “They showed how pre-and post-conditions of speech acts could be represented in a multi-modal logic” [9]. 

There are many types of speech acts. Perhaps the most recognised ones are representatives (that provide some information) and directive (that request something). Some examples of these include; ‘request’, ‘inform’, ‘suggest’, ‘query’, and ‘promise’.

The Speech Act theory has influenced a number of ACL and knowledge-sharing techniques. These languages have been developed to enable representation and exchange of knowledge between agents [10]. In the following sections some of these languages are presented. 

Knowledge Query Manipulation Language 

“Knowledge Query Manipulation Language (KQML) is an ACL developed as part of the DARPA Knowledge-Sharing Effort (KSE)” [11]. It is a high-level, message-oriented communication language developed and based on Speech Act theory [10]. KQML focuses on message format and message-handling protocols. It is independent of transport mechanisms, content-language, and ontology. Some examples of transport mechanisms include: TCP/IP, HTTP, and SMTP.

KQML messages consist of three layers: message, content, and communication layer [12, 13]. The message layer is the core of KQML, which contains performatives and parameters for identifying network protocols to deliver the message. Performatives describe the intention of an agent to send the message. The content layer contains the actual knowledge that is to be exchanged between agents. KQML is independent of knowledge representing language and ontology used to describe the content of the message. The content can be represented in any language including KIF and XML. The communication layer contains information for communicating messages between agents and tracking their conversations. These parameters include unique identifiers associated with the sender and receiver and each conversation thread. An example of a KQML message is shown below.

(tell
  :sender 			agent02		:receiver 	agent01
  :in-reply-to 	message11	:language 	KIF 
  :ontology 		map			:content 	position (21,60) 
)

This message is sent from agent02 to agent01 in reply to a previous message with the ID of message11. The content of the message is to give information about the position of target along the x and y axis. The performative in this example is ‘tell’, which is an informative performative. 

Several versions of KQML have been developed consisting of a different collection of performatives [14]. Some examples of the KQML performatives include: 

  • Basic queries: ask-if, ask-about, reply
  • Basic informative: tell, deny
  • Database queries: insert, delete, update
  • Network queries: broadcast, resister, transport-addresses

Facilitator Knowledge Query Manipulation Language (KQML) provides an architecture for agents to communicate through a communication facilitator or matchmaker [15]. The facilitator agent plays an important role in Multi-Agent System as it offers various useful communication and network services that allow agents to interact. Agents can communicate and register themselves with the facilitator using the ‘advertise’ performative. The facilitator can identify agents via their name, address, and capabilities. It can recommend agents to each other based upon their requests and based on the particular service or information they provide. In other words, the facilitator provides a centralized meeting place for agents. It may also be used to transfer information between agents. KQML has been used extensively by the research community and in many Multi-Agent System applications. A number of implementations have been developed, which include JACKAL [16], InfoSleuth [17], KAoS [18], and JATLite [19]. JACKAL is a Java implementation of KQML developed at the University of Maryland.

KQML has been criticized for a number of reasons. It lacks formal and adequate semantics. There are different interpretations of the meaning of its performatives [14]. The transport mechanism of messages in KQML is not defined accurately, which makes it difficult for different KQML-speaking agents to interoperate. It is missing the ‘commissive’ performatives that are important if agents need to make commitments to and coordinate their actions with each other [7]. There are no organized efforts to maintain and further develop KQML. In fact, KQML efforts have been subsumed by activities of FIPA to extend and modify it for use as basic ACL in the FIPA standards.

Foundation of Intelligent Physical Agents 

The Foundation of Intelligent Physical Agents (FIPA) institution develops standards for agent systems [20]. It has played an important role in defining agent communication standards. Its aim is to promote agent-based technology and produce specifications on Agent Communication Languages [1]. The first set of FIPA specifications were released in 1997 [21]. The specifications required CORBA Internet Inter-ORB Protocol (IIOP) as the communication protocol.

CORBA enables the communication between software components and procedures that are written in different languages on different computers [10]. With the emergence of alternative communication protocols including HTML and Java RMI, FIPA developed a new set of technology-independent specifications. 

FIPA Agent Communication Language is the communication language for agents developed by FIPA. It is based on the Speech Act theory and represents messages in a structure in an Envelope format similar to KQML. Important elements of a FIPA ACL message include performative, sender, receiver, and content. Other elements include language, ontology, protocol, and conversation identification. The collection of performatives that FIPA ACL provides is different from KQML. The core performatives are ‘inform’ and ‘request’. A set of performatives have been defined that allows agents to perform various tasks including sharing knowledge, participating in various conversations, and negotiating with other agents. Some examples of performatives in FIPA Agent Communication Language include [14]:

  • Passing on information: confirm, disconfirm, inform, inform-if
  • Requesting information: cancel, query-if, subscribe. 
  • Negotiation: accept-proposal, propose, reject-proposal. 
  • Performing actions: agree, cancel, propagate, refuse. request.
  • Error handling: failure, not understood.
The FIPA agent platform components [22].

The FIPA Agent Platform model provides Agent Management System (AMS), Directory Facilitator (DF), and a Message Transport System (MTS) [22], as shown in Figure above. AMS controls the life-cycle of agents, which includes their creation, registration, communication, migration, and retirement. Directory Facilitators are important components of the FIPA Agent Platform model that provide Yellow Pages Lookup Services to other agents. Directory Facilitator registers agents based on the services they offer. It also recommends relevant agents to other agents that look for particular services. Message Transport System provides internal communication methods between agents and external messaging with other FIPA-compliant Agent Platforms. 

Unlike KQML, FIPA provides comprehensive semantics to the language. The semantic language of FIPA Agent Communication Language is a LISP-like language called Semantic Language (SL), which allows encoding of concepts and actions that agents perform. FIPA specification is based on the BDI (Beliefs, Desires, and Intentions) agent model [23], which considers agents to have mental states. The BDI model originated from a philosophical theory of practical reasoning [24]. Beliefs are the understanding of an agent about the environment and other agents [25]. Desires are the goals of an agent related to what it wants to achieve. Intentions are its plans for taking action to achieve the goal(s). Despite the popularity of FIPA in the early 2000s, it did not succeed in gaining commercial support [4]. Very few software tools have been developed for agents that comply with FIPA specifications. The most popular of them include JACK and JADE.

Simple Object Access Protocol 

Simple Object Access Protocol (SOAP) is a communication protocol independent of the platform, operating system, and programming language [2]. It is a simple and extensible communication protocol that is based on XML. In the context of web services, SOAP is considered as “the standard message protocol for exchanging XML data over the Internet” [4]. It allows complex interactions between web services through request/response exchanges. 

SOAP has been used in this research to provide a universal translator approach for communication and tasking. It provides an increased level of interoperability for Multi-Agent Systems. 

A SOAP message is essentially an XML document that consists of two main elements, Envelope and Body, and the optional Header and Fault elements [26]: 

  • An Envelope is the root element of every SOAP document that wraps the message. It contains attributes that identify the XML document is a SOAP message and specifies its encoding style. 
  • The Body element includes the content of information intended for the recipient. The content represents knowledge using XML by defining meaningful tags and wrapping them around the relevant information. The content contains XML elements specific to the service. 
  • The Header element may be used to state application-specific information about the message. For example, it may include information about the message’s sender and recipient, or represent a performative describing the intention of the sender of the message. There also are some predefined attributes for the Header element that defines how the message should be processed by the recipient. 
  • The Fault element contains errors and status information. It is used to identify faults and error messages and what the causes are. 

Below is a sample SOAP request message that invokes a web service to get the contact information of a user given their name.

<soap:Envelope 
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

  <soap:Header>  ...  </soap:Header>
  
  <soap:Body xmlns:m="http://www.example.org/profiles">
  
      <m:GetPhoneNumber>
          <m:Name>Mr Smith</m:Name>
      </m:GetPhoneNumber>    
      
      <soap:Fault>  ...  </soap:Fault>
  
  </soap:Body>

</soap:Envelope>

The content of the message contains XML elements specific to this application, which include ‘m:GetPhoneNumber’ and ‘m:Name’. These are application specific elements defined in the namespace of ‘http://www.example.org/profiles’. This example requests the phone number of a user named Mr Smith. 

The Header and Fault elements are optional and are shown in this example only to show their location in the XML document. If a header element is used in a  SOAP message, it must be the first child element of the Envelope [27]. The Fault element can only appear once and only as a child element of the Body. The response message of the SOAP message above may look like this.

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Body>
  <m:GetPhoneNumberResponse xmlns:m="http://www.example.org/profiles">
    <m:Phone>83232923</m:Phone>
  </m:GetPhoneNumberResponse>
</soap:Body>

</soap:Envelope>

Conclusion

In this article I described the concept of knowledge representation and Agent Communication Languages in Artificial Intelligence. I provided some examples of languages for defining ontology, including:

  • KIF: Knowledge Interchange Format
  • XML: Extensible Mark-up Language
  • KQML: Knowledge Query Manipulation Language
  • FIPA: Foundation of Intelligent Physical Agents
  • SOAP: Simple Object Access Protocol

You might also find this article interested in my research on Artificial Intelligence, Machine Learning and Multi-Agent Systems.

Resources and Credits

[1] Y. Labrou, T. Finin, and Y. Peng. Agent communication languages: The current landscape. IEEE Intelligent Systems and Their Applications, IEEE Computer Society, US, 14(2):45–52, 1999.

[2] S. Seely and K. Sharkey. SOAP: Cross Platform Web Services Development Using XML. Prentice Hall, Upper Saddle River, NJ, USA, 2001.

[3] G. F. Coulouris, J. Dollimore, and T. Kindberg. Distributed Systems: Concepts and Design. Addison-Wesley, University of Michigan, fourth edition, 2005.

[4] N. Griffiths and K.-M. Chao, editors. Agent-Based Service-Oriented Com- puting. Springer-Verlag London Dordrecht Heidelberg New York, 1st edi- tion, 2010.

[5] J. L. Austin. How to Do Things with Words. University Press, Oxford, 1962.

[6] J.R. Searle. Speech Acts. Cambridge University Press, 1969.

[7] P. R. Cohen and H. J. Levesque. Speech acts and rationality. In Proceedings of the 23rd annual meeting on Association for Computational Linguistics (ACL ’85), pages 49–60, Chicago, Illinois, USA, 1985. Association for Computational Linguistics.

[8] P. R. Cohen and C. R. Perrault. Elements of a plan-based theory of speech acts. Technical report, Cognitive Science, 1979.

[9] M. Wooldridge. Verifiable semantics for agent communication languages. pages 349–356, Paris, France, 1998.

[11] T. Finin, Y. Labrou, and J. Mayfield. KQML as an agent communication language. In Software Agents, pages 456 – 480. AAAI Press / The MIT Press, 1997.

[12] M. Fasli. Agent technology for e-commerce. Chichester, West Sussex, England, 2007.

[13] R. Patil, R. Fikes, P. Patel-Schneider, D. P. McKay, T. Finin, T. Gruber, and R. Neches. The DARPA knowledge-sharing effort: Progress report. In B. Nebel, editor, Proceedings of the Third International Conference on Principles Of Knowledge Representation And Reasoning, August 1992.

[14] M. Wooldridge. An Introduction to MultiAgent Systems. John Wiley and Sons Ltd, Chichester, UK, 2002.

[15] D. Kuokka and L. Harada. On using KQML for matchmaking. In Proceedings of the First International Conference on Multiagent Systems (ICMAS), pages 239–245. AAAI Press, Menlo Park, CA, 1995.

[16] R. S. Cost, T. Finin, Y. Labrou, X. Luan, Y. Peng, I. Soboroff, and J. May- field. JACKAL: A java-based tool for agent development. In Software Tools for Developing Agents, pages 73–83. AAAI Press, 1998.

[17] M. Nodine and A. Unruh. Facilitating open communication in agent systems: The infosleuth infrastructure. In M. Singh, A. Rao, and M. Wooldridge, editors, Intelligent Agents IV Agent Theories, Architectures, and Languages, volume 1365 of Lecture Notes in Computer Science, pages 281–295. Springer Berlin / Heidelberg, 1998.

[18] J. M. Bradshaw. Software Agents. AAAI Press / The MIT Press, 1997. [20]M. Bratman. Intention, Plans, and Practical Reason. Harvard University Press, 1987.

[19] H. Jeon, C. Petrie, and M. R. Cutkosky. JATLite: A java agent infrastructure with message routing. IEEE Internet Computing, 4(2):87–96, 2000.

[20] FIPA. FIPA abstract architecture specification, technical report sc00001l. Technical report, Foundation for Intelligent Physical Agents, http://www.fipa.org, 2002.

[21] P. D. O’Brien and R. C. Nicol. FIPA towards a stance for software agents.

[22] FIPA. Fipa agent management specification, technical report xc00023h. Technical report, Foundation for Intelligent Physical Agents, http://www.fipa.org, 2000.

[23] A. S. Rao and M. P. Georgeff. BDI agents: from theory to practice. In 1st International Conference on Multi-Agent Systems, pages 312–319. San Francisco, CA, 1995.

[24] M. E. Bratman. Intention, Plans, and Practical Reason. Harvard University Press, Cambridge, USA, 1999.

[25] M. Wooldridge, J.P. Muller, and M. Tambe. Agent theories, architectures, and languages: A bibliography. In Intelligent Agents II Agent Theories, Architectures, and Languages, pages 408 – 31. Springer Berlin / Heidelberg, 1996.

[26] S. Graham, D. Davis, S. Simeonov, G. Daniels, P. Brittenham, Y. Naka- mura, P. Fremantle, D. Koenig, and C. Zentner. Building Web services with Java: making sense of XML, SOAP, WSDL, and UDDI. Developer’s Library, 2002.

[27] E. R. Harold. Processing XML with Java: A Guide to SAX, DOM, JDOM, JAXP, and TrAX. Addison-Wesley Longman Publishing Co., Inc. Boston, MA, USA, 2002.

Feature Photo by Volodymyr Hryshchenko on Unsplash

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.