Skip to content

Instantly share code, notes, and snippets.



Last active Jun 11, 2020
What would you like to do?
Agent Technologies
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook MIT License, Copyright (C) Ken Webb, Thu Jun 11 2020 05:57:26 GMT-0400 (Eastern Daylight Time)-->
Title: Agent Technologies
InternalName: 6ee032b8913680e72191ffea48dca46f
My Notes
June 2, 2020
Agent technologies, including interactions between agents,nearley/fipaAcl
See notes in my Island Game folder:
- Jan 15 2020 (2 pages) messaging between agents, dialogs, MSC
- Feb 7 2020
- Feb 21 2020 (3 pages)
- Dec 20 2019 Jen mechanisms, scenarios
Some Xholon interaction scenarios:
- two co-located Avatars
- two Avatars located in different parts of the same simulation
- two Avatars connected using webrtc
- an Avatar with a simple JavaScript behavior
- interacting with a Human directly or through a game PC (player character)
- etc.
The following table represents the current set of Standard FIPA specifications.
Identfr Title
------- -----
SC00001 FIPA Abstract Architecture Specification
SC00008 FIPA SL Content Language Specification
SI00014 FIPA Nomadic Application Support Specification
SC00023 FIPA Agent Management Specification
SC00026 FIPA Request Interaction Protocol Specification
SC00027 FIPA Query Interaction Protocol Specification
SC00028 FIPA Request When Interaction Protocol Specification
SC00029 FIPA Contract Net Interaction Protocol Specification
SC00030 FIPA Iterated Contract Net Interaction Protocol Specification
SC00033 FIPA Brokering Interaction Protocol Specification
SC00034 FIPA Recruiting Interaction Protocol Specification
SC00035 FIPA Subscribe Interaction Protocol Specification
SC00036 FIPA Propose Interaction Protocol Specification
SC00037 FIPA Communicative Act Library Specification
SC00061 FIPA ACL Message Structure Specification
SC00067 FIPA Agent Message Transport Service Specification
SC00069 FIPA ACL Message Representation in Bit-Efficient Specification
SC00070 FIPA ACL Message Representation in String Specification
SC00071 FIPA ACL Message Representation in XML Specification
SC00075 FIPA Agent Message Transport Protocol for IIOP Specification
SC00084 FIPA Agent Message Transport Protocol for HTTP Specification
SC00085 FIPA Agent Message Transport Envelope Representation in XML Specification
SC00088 FIPA Agent Message Transport Envelope Representation in Bit Efficient Specification
SI00091 FIPA Device Ontology Specification
SC00094 FIPA Quality of Service Specification
SC00097 FIPA Design Process Documentation Template
FIPA Communicative Act Library example (FIPA SC00037J, 2002) [refs 6,7,8]
3.8 Inform
Summary: The sender informs the receiver that a given proposition is true.
Message Content: A proposition
inform indicates that the sending agent:
• holds that some proposition is true,
• intends that the receiving agent also comes to believe that the proposition is true, and,
• does not already believe that the receiver has any knowledge of the truth of the proposition.
Agent i informs agent j that (it is true that) it is raining today.
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
"weather (today, raining)"
:language Prolog)
- DONE do a simple prototype of a FIPA communication act using standard Xholon message passing (see below)
- add a single new signal to
- to support FIPA ACL
- write a JavaScript library to help with FIPA ACL
- how is a JavaScript Promise like and unlike async messaging using Xholon msg() ?
To use the nearley parser
// Create a Parser object from our grammar.
const parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar));
// Parse something!
parser.feed('(inform :sender (agent-identifier :name i) :receiver (set (agent-identifier :name j)) :content "weather (today, raining)" :language Prolog)');
// parser.results is an array of possible parsings.
console.log(parser.results); // YES JavaScript Object
"Agent Technology - An Overview," paper/booklet, James Odell, paper, 2011
210 pages
ch 5: Agent Communication
ch 6: Agent Interaction
In computer science, a software agent is a computer program that acts for a user or other program in a relationship of agency
UML, Agent-based modeling
agent interaction protocols (AIP)
FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies.
the site does not seem to have been updated for 10 years or so
I downloaded all specifications as: standardspecs.tar.gz
list of agent software; out of date
What is an application agent?
A software agent is a persistent, goal-oriented computer program that reacts to its environment and runs without continuous direct supervision to perform some function for an end user or another program.
Among a great many other applications, software agents: Conduct targeted Internet searches.
old, but cited numerous times
Software Agents: An Overview, Hyacinth S. Nwana
Intelligent Systems Research, Advanced Applications & Technology Department, BT Laboratories, Martlesham Heath, Ipswich, Suffolk, IP5 7RE, U.K.
(13) github query: agent javascript
A platform for building conversational interfaces with intelligent agents (chatbots)
KSW this is a very complex system
An Agent Modeling Language Implementing Protocols through Capabilities, Nikolaos Spanoudakis and Pavlos Moraitis, 2008
In this paper we present how to use the Agent
MOdeling LAnguage (AMOLA) to define agent
interaction protocols and how to integrate these in an
agent model.
uses FIPA protocol
Knowledge Query and Manipulation Language
The Knowledge Query and Manipulation Language, or KQML, is a language and protocol for communication among software agents and knowledge-based systems.
The KQML message format and protocol can be used to interact with an intelligent system, either by an application program, or by another intelligent system.
KQML's "performatives" are operations that agents perform on each other's knowledge and goal stores.
Higher-level interactions such as contract nets and negotiation are built using these.
KQML's "communication facilitators" coordinate the interactions of other agents to support knowledge sharing.
Experimental prototype systems support concurrent engineering, intelligent design, intelligent planning, and scheduling.
KQML is superseded by FIPA-ACL.
Agent Communications Language
Agent Communication Language (ACL), proposed by the Foundation for Intelligent Physical Agents (FIPA), is a proposed standard language for agent communications.
Knowledge Query and Manipulation Language (KQML) is another proposed standard.
The most popular ACLs are:
FIPA-ACL (by the Foundation for Intelligent Physical Agents, a standardization consortium)
KQML (Knowledge Query and Manipulation Language)
Both rely on speech act theory developed by Searle in the 1960s[3] and enhanced by Winograd and Flores in the 1970s.
They define a set of performatives, also called Communicative Acts, and their meaning (e.g. ask-one).
The content of the performative is not standardized, but varies from system to system.
To make agents understand each other they have to not only speak the same language, but also have a common ontology.
An ontology is a part of the agent's knowledge base that describes what kind of things an agent can deal with and how they are related to each other.
Examples of frameworks that implement a standard agent communication language (FIPA-ACL) include FIPA-OS and Jade.
Java Agent Development Framework, or JADE, is a software framework for the development of intelligent agents, implemented in Java.
JADE system supports coordination between several agents FIPA and provides a standard implementation of the communication language FIPA-ACL,
which facilitates the communication between agents and allows the services detection of the system. JADE was originally developed by Telecom Italia and is distributed as free software.
JAVA Agent DEvelopment Framework
is an open source platform for peer-to-peer agent based applications
latest is 2017
book: Developing Multi-Agent Systems with JADE, 2007
WADE (Workflows and Agents Development framework) is a software platform that facilitates the development of distributed multi agent applications where agent tasks can be defined according to the workflow metaphor.
From a different point of view WADE can be seen as an agent oriented Workflow Engine suitable to be used for business process orchestration.
This document gives an overview of the WADE platform, presents its architecture and main functionalities, and outlines the conceptual model underlying it.
Two major aspects of the platform are described: the execution model based on the workflow metaphor and the configuration and control features designed to hide the complexity of the distribution.
WADE is based on JADE, a popular open source agent-oriented middleware and inherits from ita distributed topology with peer-to-peer networking and a software component architecture based on the agent paradigm.
AMUSE, Agent-based Multi-User Social Environment
AMUSE (Agent-based Multi-User Social Environment) is a software platform that facilitates the development of distributed social applications involving users that cooperate/compete to achieve common or private goals.
Within this scope the primary focus of Amuse is on multi player on-line games.
It should be noticed that Amuse address aspects related to match organization and coordination as well as time synchronization and direct terminal-to-terminal communication.
On the other hand it does not include any support for graphics and GUI development.
In the current version only Android-based games are supported. Other technologies will be addressed in future versions.
Amuse is based on JADE and its extension WADE and is developed within the same Community. At present there is no dedicated support for Amuse developers.
The usual (jade-develop mailing list) should be used to receive support, post comments and suggestions and provide contributions.
Current version of AMUSE is AMUSE 1.6 released on 29/04/2016.
GOAL agent programming language
Goal is a rule-based programming language for programming cognitive agents that interact with an environment and with each other.
The High Level Architecture (HLA) is a standard for distributed simulation, used when building a simulation for a larger purpose by combining (federating) several simulations.
The standard was developed in the 90s under the leadership of the US Department of Defense[2] and was later transitioned to become an open international IEEE standard.
It is a recommended standard within NATO through STANAG 4603.[3] Today the HLA is used in a number of domains including defense and security and civilian applications.
Agent Oriented Programming, Source: comp.object,, Date: 17-Jul-97
Ian Begg asked:
Yesterday I read a document which was discussing a future modeling/simulation system, and it was recommending the use of "Agent" technology.
The claim being made was that this represented a level of abstraction above and beyond the current capabilities of Object Oriented Technology.
The author then gave an example of what an "Agent" in the sense of modeling was. After reading this example I was confused as to why this technology was beyond what OO is capable of.
Mark Baker replied:
The biggest difference, IMHO, between "traditional OO" and agents is coupling.
"Traditional OO" has focused on defining interfaces (eg. OMG IDL) for objects.
Coupling can be kept to a minimum by good design, but ultimately, one object needs to invoke a specific method with specific arguments on the other object, thereby coupling the two in code.
The same method invocation does of course has to occur for agents, but with one major difference; there's effectively just one method on each agent, with one argument.
All the semantics of the invocation are bundled into that one argument.
It's much like human-human communications, where a common language (eg. English) can be used to initiate complex cooperative behaviour.
An agent might do the same thing by asking another agent "Tell me your name".
The target agent has to parse this using a common knowledge layer to understand that it's being asked to respond with its "name".
So for agents, coupling is entirely in the metadata.
IMO, agents are much better suited for massively distributed computing than traditional objects, since dynamic discovery and late binding are going to be pervasive.
Static, even well defined unambiguous interfaces and contracts just can't cut it unless they provide a mechanism to describe themselves in the knowledge layer.
And even then, I'm not sure what value there is to doing this since client agents will already have to handle the case where an agent responds with "Huh?".
But I suppose these semantic contracts could be used for trading (ala ANSA/CORBA), so it's probably not entirely a bad idea.
Bill House explained:
This is why agent communications are usually done via a specialized agent-communication language (ACL).
The language defines the domain of discourse and implies the logical semantics of the conversation.
Here are some differentiators between agents and objects:
* Agents may communicate using an Agent Communication Language, whereas objects communicate via fixed method interfaces.
* Agents have the quality of volition. That is, using AI techniques, intelligent agents are able to judge their results,
then modify their behavior (and thus their own internal structure) to improve their perceived fitness.
* Objects are abstractions of things like invoices or PLCs.
Agents are abstractions of intelligent beings -- they are essentially anthropomorphic.
Note that this does not mean that agents are intelligent in the human sense, only that they are modeled after an anthropomorphic architecture, with beliefs, desires, etc.
2013 update on FIPA etc.
James Odell is chair, and was also chair of FIPA
nothing useful in JavaScript
mostly Java including: SARL, jason,
(39) book that I have: John I. Saeed, Sematics
ch 8: Functions of Language: Speech as Action
Speech Act theory, Austin, Searle
Radigost: Interoperable web-based multi-agent platform, 2014
(41) Railsback and Grimm book (2019)
see index "interaction"
p. 42 ODD Interaction questions
p. 173 Interaction chapter
Specifying Protocols for Multi-Agent Systems Interaction, STEFAN POSLAD
focus on FIPA Agent Communication Language (ACL)
The belief–desire–intention software model (BDI) is a software model developed for programming intelligent agents.
Superficially characterized by the implementation of an agent's beliefs, desires and intentions, it actually uses these concepts to solve a particular problem in agent programming.
In essence, it provides a mechanism for separating the activity of selecting a plan (from a plan library or an external planner application) from the execution of currently active plans.
Consequently, BDI agents are able to balance the time spent on deliberating about plans (choosing what to do) and executing those plans (doing it).
A third activity, creating the plans in the first place (planning), is not within the scope of the model, and is left to the system designer and programmer.
Using the FIPA ACL
The syntax is based on s-expressions
It's defined using EBNF (SC00070I FIPA ACL Message Representation in String)
EBNF BNF nearley
Getting started
nearley consists of two components: a compiler and a parser.
The nearley compiler converts grammar definitions from a simple BNF-based syntax to a small JS module.
You can then use that module to construct a nearley parser, which parses input strings.
<!-- for testing FIPA protocols -->
<Sender xhType="XhtypePureActiveObject">
<port name="receiver" connector="../Receiver"/>
<Initiator xhType="XhtypePureActiveObject">
<port name="participant" connector="../Participant"/>
<FipaProtocolTest roleName="FIPA-Request-Protocol">
<PhysicalSystembehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.FIPA_CA_CONFIRM = 101;
$wnd.xh.FIPA_CA_INFORM = 102;
$wnd.xh.FIPA_CA_NAMES = {
101: "confirm",
102: "inform"
$wnd.xh.SIGNAL_FIPA_ACL = -13; // see
// test fipa.js
var fipa = $wnd.xh.fipa;
var agree = Object.create(fipa.Agree);
agree.init("atsndr", "atrcvr", "this is some at content.", "atfipa-sl", "atirt", "atsome-fipa-protocol");
//# sourceURL=PhysicalSystembehavior.js
<Senderbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode.parent();
act: function() {
me.receiver.msg($wnd.xh.FIPA_CA_INFORM, "weather (today, raining)", me);
//# sourceURL=Senderbehavior.js
<Receiverbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode.parent();
act: function() {
processReceivedMessage: function(msg) {
me.println( + " received " + msg.signal + '=' + $wnd.xh.FIPA_CA_NAMES[msg.signal] + ' "' + + '" from ' +;
//# sourceURL=Receiverbehavior.js
<FipaAclParserbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, state, beh = {
postConfigure: function() {
me = this.cnode.parent();
state = 0;
act: function() {
switch (state) {
case 0:
var str = `(inform
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
:content "weather (today, snowing)"
:language Prolog)`;
state = 1;
case 1:
var str = `(cfp
:sender (agent-identifier :name j)
:receiver (set (agent-identifier :name i))
:content "((action (agent-identifier :name i) (sell plum 50)) (any ?x (and (= (price plum) ?x) (< ?x 10))))"
:ontology fruit-market
:language fipa-sl)`;
state = 2;
case 2: // Accept Proposal
var str = `(accept-proposal
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
:in-reply-to bid089
"((action (agent-identifier :name j)
(stream-content movie1234 19))
(B (agent-identifier :name j)
(ready customer78)))"
:language fipa-sl)`;
state = 3;
case 3: // Agree (request + agree)
var str = `(request
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
"((action (agent-identifier :name j)
(deliver box017 (loc 12 19))))"
:protocol fipa-request
:language fipa-sl
:reply-with order567)`;
str = `(agree
:sender (agent-identifier :name j)
:receiver (set (agent-identifier :name i))
"((action (agent-identifier :name j)
(deliver box017 (loc 12 19)))
(priority order567 low))"
:in-reply-to order567
:protocol fipa-request
:language fipa-sl)`;
state = 4;
case 4: // Confirm
var str = `(confirm
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
"weather (today, snowing)"
:language Prolog)`;
state = 5;
case 5: // Disconfirm
var str = `(disconfirm
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
"((mammal shark))"
:language fipa-sl)`;
state = 6;
case 6: // Failure
var str = `(failure
:sender (agent-identifier :name j)
:receiver (set (agent-identifier :name i))
"((action (agent-identifier :name j)
(open \"foo.txt\"))
(error-message \"No such file: foo.txt\"))"
:language fipa-sl)`;
state = 7;
case 7: // Inform If
var str = `(request
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
"((action (agent-identifier :name j)
:sender (agent-identifier :name j)
:receiver (set (agent-identifier :name i))
\"in( lannion, normandy)\"
:language Prolog)))"
:language fipa-sl)`;
str = `(inform
:sender (agent-identifier :name j)
:receiver (set (agent-identifier :name i))
"\+ in (lannion, normandy)"
:language Prolog)`;
state = 8;
case 8:
var str = ``;
state = 9;
case 9:
var str = ``;
state = 10;
parse: function(fipastr) {
const parser = new $wnd.nearley.Parser($wnd.nearley.Grammar.fromCompiled($wnd.grammar));
//# sourceURL=FipaAclParserbehavior.js
<Initiatorbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, fipa, beh = {
postConfigure: function() {
me = this.cnode.parent();
fipa = $wnd.xh.fipa;
act: function() {
// Initiator sends a request message (a JSO)
var request = Object.create(fipa.Request);
request.init(,, "this is a request.", "fipa-sl");
me.participant.msg($wnd.xh.SIGNAL_FIPA_ACL, request.asJso(), me);
processReceivedMessage: function(msg) {
me.println( + " received " + msg.signal + ' "' + JSON.stringify( + '" from ' +;
//# sourceURL=Initiatorbehavior.js
<Participantbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode.parent();
act: function() {
processReceivedMessage: function(msg) {
// in this test, is a JavaScript Object
var fipaMsgType = Object.getOwnPropertyNames([0];
me.println( + " received " + msg.signal + " " + fipaMsgType + ' "' + JSON.stringify( + '" from ' +;
msg.sender.msg($wnd.xh.SIGNAL_FIPA_ACL, "response refuse TODO", me);
//# sourceURL=Participantbehavior.js
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="">
<rect id="PhysicalSystem/Sender" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<rect id="PhysicalSystem/Receiver" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.