OBJS Technical Note

Comparing Agent Communication Languages

Venu Vasudevan
Object Services and Consulting, Inc.
July 1998

Introduction

Agent architectures need both representation and communication models. Agent representation models include ontologies that define the domain model/vocabulary etc. of a particular domain of discourse, and content languages that represent the agent's mental model of the world (e.g beliefs, desires, intentions). Given a particular domain of discourse, and a particular community of agents that know and do something in this domain, one needs an agent communication model that models the flow of knowledge and attitudes about such knowledge within the agent community.  An ACL (agent communication language) provides language primitives that implement the agent communication model. ACLs are commonly thought of as wrapper languages  in that they implement a knowledge-level communication protocol that is unaware of the choice of content language and ontology specification mechanism.

Nearly all the ACLs  around derive their language primitives from the linguistic theory of speech acts. Speech act theory categorizes human (or machine) "utterances" into different categories depending on the intent of the speaker (human or agent), the effect on the listener (human or agent), and any other physical manifestations of the act of uttering the utterance. Since speech acts are a human knowledge-level communication protocol, it is felt that they would be effective as an agent communication protocol, esp. since agents might operate on behalf of humans. However, the case has also been made for speech acts as appropriate programming language primitives for next generation programming languages (not just ACLs) [McCart92].

KQML [KQML94] is the ACL resulting from the DARPA KSE (Knowledge Sharing Effort) effort, which also produced KIF as the content language (first-order logic + set theory) and Ontolingua as the ontology specification language. In keeping with the wrapper philosophy of ACLs, KQML is insensitive to whether the content it is communicating about is in KIF/Ontolingua or something else. What follows is a brief description of speech acts, a database bigot's view on KQML, and some elaboration on the motivation behind the KQML-Lite (and/or KQML-Right) [KQML-LITE] effort.


Speech Act Theory: In Brief

Speech act theory is a linguistic analysis of human communication.  It is relevant to ACLs in that speech act theory  serves as one (but not the only) formal basis for deciding ACL language primitives.There are 4600 speech acts at last count, and I doubt if it is the goal of any ACL to cover them all. What does seem to be true is that any ACL primitive that is a true speech act is easily defensible by the language's defenders. Anything that is not, is up for debate.
 
 
Table I: Speech Act Types
Speech Act Category Intent Example
representatives state a proposition (represent a state of affairs)
directives request or command "Mr.Sulu, engage"
commissives promise or threat (commit the speaker to a future course of action) " I promise to give you ten dollars"
expressives thanks and apologies (indicate a mental attitude on the part of the speaker)
declarations things that actually change the state of the world "I now pronounce you man and wife"
verdicatives pass judgement "Microsoft stinks"
 

Above is the list of Searle's categories of speech acts and their meanings. Speech acts are useful in that one can formally represent their illocutionary (i.e what the speaker intended by something) and perlocutionary (i.e the actual effect of the speech act on the hearer) effects.  It is upto the agent theory and the agent infrastructure to ensure that agents in the community are ethical and trustworthy, and therefore the perlocutionary behavior of a speech act on the hearing agent is predictable. All this is not the concern of ACLs, which are merely providing the language primitives.


KQML

Description

The architecture underlying KQML is that of a community of agents, each  owning and managing a virtual KB (VKB) that represents its mental model of the world. KQML doesn't care about the content language used to represent the mental model (could be  KIF, RDF,SL or some other content language). Its goal is to provide knowledge transportation protocol for blobs of content, in some ontology that the sending agent can point to and the receiving agent can access.   Agents then query and manipulate  the contents of each others VKBs, using KQML as the communication and transport language. KQML presupposes a white-box (or at least gray-box) model of agent community VKBs, and includes direct edits to an agent's VKB by another agent as part of its language primitives.

The KQML specification defines the syntax (and informally the semantics) for  a collection of messages (or performatives to be politically correct from a speech act point of view)  that collectively define the language in which agents communicate. There is a core set of reserved performatives, but the set is extensible (e.g COOL[Barb95]) and has been extended for different applications. The table below classifies the core KQML performatives based on the KBMS-level communication function, and whether they apply to communicating agent-pairs or to larger communities of agents. Obviously, the latter implies the former. Performatives in purple were part of the KQML '94 spec but seem to  have been eliminated in the KQML'97 proposal.

 
 Table II: Classification of KQML Performatives
Function Class Member Performatives Level
Query and Response ask-if,ask-all,ask-about, ask-one, tell,untell,deny, sorry agent-pair
Cursor Manipulation and Result Formatting ready, next, discard, rest   stream-all, stream-about, eos agent-pair
advertise or commit to a capability advertise, unadvertise agent community
kb editing insert,uninsert,delete-one, delete-all, undelete agent-pair
enactment achieve, unachieve agent-pair
error handling error agent-pair
communication primitives other than pure asynchronous messages broadcast, forward, standby, subscribe and monitor (like a kb alerter), pipe, break (make and dismantle a pipe), generator either
trading broker-one, broker-all, recommend-one, recommend-all, recruit-one, recruit-all agent-community
name service register, unregister, transport-address agent-community
 

Critique


FIPA ACL

Description

FIPA ACL is the agent communication language associated with FIPA's open agent architecture. As with KQML, FIPA-ACL maintains orthogonality with the content language and is designed to work with any content language and any ontology specification approach. Beyond the commonality of goals and a similarity in syntax, there are a number of significant differences between FIPA-ACL and KQML. Below are two tables, one a categorization of operators like the KQML table above, and another a list of equivalent operators in FIPA-ACL and KQML.
 
Table III: Taxonomy of FIPA Performatives
Function Class Member Performatives
query and response
  • query-if, query-ref
  • request, request-when, request-whenever
  • inform, inform-if, inform-ref, 
  • confirm,disconfirm
communication primitives other than pure asynchronous messages cfp, propose, reject-proposal, accept-proposal, subscribe (like a kb alerter)
error handling failure, not-understood
? agree, cancel
 
Table IV: Equivalent Operations in FIPA-ACL and KQML
KQML Performative Equivalent FIPA Performative
ask-if` query-if
tell, untell inform
deny inform or disconfirm
insert, uninsert inform, disconfirm
subscribe subscribe
error not-understood
sorry refuse or failure

Critique


KQML Lite (or Right?)

Description

KQML Lite is an attempt to merge KQML and FIPA ACL. Implicit in this is the idea that merging KQML and FIPA-ACL is better than adopting either one of these in their entirety. A key assumption is made in the merging strategy is that FIPA-ACL and KQML are at different levels of abstraction, and that the notion of an ACL can itself be further subdivided into an outer ACL and an inner ACL. Given that, the KQML-Lite authors propose a merging strategy that uses a subset of FIPA-ACL as the outer ACL and a subset of KQML as the inner one.The authors of KQML-Lite state the 2-layer ACL model as self-evident, and go on to a detailed listing of primitives in the merged language. The notion of such a model is not obvious at all to me, esp. after the FIPA spec has indicated the equivalence between FIPA-ACL and KQML operators, and made an argument for why other operators belong outside the scope of a "well designed" ACL. The KQML-Lite authors need to elaborate and convince readers of the validity of  the 2-layer ACL model, and the ACL merging strategy. The KQML-Lite proposal does do a much better job than other KQML specs.,  of enumerating agent services and their interfaces separately and in detail.

Note: KQML-Lite is an odd name for a merging of FIPA-ACL and KQML (it is actually heavier than both KQML and FIPA-ACL in terms of the number of performatives).

Discussion

References