JADE Framework
JAVA Agent DEvelopment Framework
JADE Framework
JADE JAR File Link
https://jade.tilab.com/download/jade/license/jade-download/?x=40&y=8
https://drive.google.com/file/d/1hoyhKt2UXkj9orj19eOK69ME8ZX42DC8/view?usp=sharing
Abbreviations
JADE : Java Agent DEveleopment Frameworks
MAS : Multi-Agent System
MAP: Multi-Agent Platform
CloneMAP: Cloud-Native Multi-Agent Plateform
AMS: Agent Management System
DF: Directory Facilitator
FIPA: Foundation for Intelligent Physical Agents
MTS : Message Transport System
RTT : Round Trip Time
avgRTT: Average Round Trip Time
VM : Virtual Machine
IoT : Internet of Things
JVM : Java Virtual Machine
REST: Representation State Transfer
API : Application Programming Interface
ACL|: Agent Communication Language
AID : Agent Identifier
AMS : Agent Management Service. According to the FIPA architecture, this is the agent that is responsible for managing the platform and providing the white-page service.
AP : Agent Platform
API : Application Programming Interface
DF : Directory Facilitator. According to the FIPA architecture, this is the agent that provides the yellow-page service.
EBNF : Extended Backus-Naur Form
FIPA : Foundation for Intelligent Physical Agents
GUI : Graphical User Interface
GUID : Globally Unique Identifier
HAP : Home Agent Platform
HTML : Hyper Text Markup Language
HTTP : Hypertext Transmission Protocol
IDL : Interface Definition Language
IIOP : Internet Inter-ORB Protocol
INS : IOR Interoperable Object Reference
JADE : Java Agent DEvelopment Framework
JDK : Java Development Kit
LGPL : Lesser GNU Public License
MTP : Message Transport Protocol. According to the FIPA architecture, this component is responsible for handling communication with external platforms and agents.
ORB : Object Request Broker
POA : Portable Object Adapter
RMA : Remote Monitoring Agent. In the JADE platform, this type of agent provides a graphical console to monitor and control the platform and, in particular, the life-cycle of its agents.
RMI : Remote Method Invocation
TCP : Transmission Control Protocol
URI : Uniform Resource Identifier
URL : Uniform Resource Locator
XML : Extensible Markup Language
Book-For JADE Framework
Material and Slides Related to JADE Framework:
https://uomustansiriyah.edu.iq/media/lectures/6/6_2018_03_28!11_28_55_PM.pdf
https://journals.sagepub.com/doi/pdf/10.1177/002029400503801001
JAVA IDE
Apache Netbeans (Window, MAC-OS) : https://netbeans.apache.org/download/nb16/index.html
Eclipse ( Window, MAC-OS) : https://www.eclipse.org/downloads/packages/
Agent Oriented Programming
Agent oriented programming is different from object oriented programming paradigms. In OOP, the application were based on some components called objects. Each objects has its own data and methods( behaviour) and object was completely controlled by the programmer. The programmer decides when an object is created, what the object can do and when an object will interact with other objects and son.
In Agent Oriented programming, has degree of autonomy. Agents can know when to do a given behaviour and how , when to interact with other agent without external interaction.
Agent
The term ‘agent’, or software agent, has found its way into a number of technologies and has been widely used, for example, in artificial intelligence, databases, operating systems and computer networks literature.
An agent is essentially a special software component that has autonomy that provides an interoperable interface to an arbitrary system and/or behaves like a human agent, working for some clients in pursuit of its own agenda. Even if an agent system can be based on a solitary agent working within an environment and if necessary interacting with its users, usually they consist of multiple agents. These multi-agent systems (MAS) can model complex systems and introduce the possibility of agents having common or conflicting goals. These agents may interact with each other both indirectly (by acting on the environment) or directly (via communication and negotiation). Agents may decide to cooperate for mutual benefit or may compete to serve their own interests.
Therefore, an agent is autonomous, because it operates without the direct intervention of humans or others and has control over its actions and internal state.
An agent is social, because it cooperates with humans or other agents in order to achieve its tasks.
An agent is reactive, because it perceives its environment and responds in a timely fashion to changes that occur in the environment.
An agent is proactive, because it does not simply act in response to its environment but is able to exhibit goal-directed behavior by taking initiative.
Moreover, if necessary, an agent can be mobile, with the ability to travel between different nodes in a computer network. It can be truthful, providing the certainty that it will not deliberately communicate false information. It can be benevolent, always trying to perform what is asked of it. It can be rational, always acting in order to achieve its goals and never to prevent its goals being achieved, and it can learn, adapting itself to fit its environment and to the desires of its users.
Figure : Depiction of the agent management ontology
Image source : https://www.mit.bme.hu/system/files/oktatas/targyak/8671/Developing-Multi-Agent-Systems-with-JADE.pdf
Agent Platform (AP): This provides the physical infrastructure in which agents are deployed. The AP consists of the machines, operating systems, FIPA agent management components (described below), the agents themselves and any additional support software.
Agent: An agent is a computational process that inhabits an AP and typically offers one or more computational services that can be published as a service description.
Directory Facilitator (DF): The DF is an optional component of an AP providing yellow pages services to other agents. It maintains an accurate, complete and timely list of agents and must provide the most current information about agents in its directory on a non-discriminatory basis to all authorized agents. An AP may support any number of DFs which may register with one another to form federations.
Agent Management System (AMS): The AMS is a mandatory component of an AP and is responsible for managing the operation of an AP, such as the creation and deletion of agents, and overseeing the migration of agents to and from the AP. Each agent must register with an AMS in order to obtain an AID which is then retained by the AMS as a directory of all agents present within the AP and their current state (e.g. active, suspended or waiting).
Message Transport Service (MTS): The MTS is a service provided by an AP to transport FIPAACL messages between agents on any given AP and between agents on different APs. Messages are providing a transport envelope that comprises the set of parameters detailing, for example, to whom the message is to be sent.
Multi-Agent System (MAS)
A multi-agent system is a system that consists of a number of agents working on behalf of the user that can interact and cooperate with each other to complete tasks as much as people do.
Agent Framework
JACK
Agent Factory
Agent Builder
JADE
IMPACT
ZEUS
One of the widely used is JADE.
JADE Experiment
These experiments are in Eclipse IDE with the below steps :
- Hello World
import jade.core.Agent;
public class HelloAgent extends Agent
{
protected void setup()
{
System.out.println("Hello World. ");
System.out.println("My name is "+ getLocalName());
}
}
- ParamAgent
import jade.core.Agent;
public class ParamAgent extends Agent
{
protected void setup()
{
Object[] args = getArguments();
String s;
if (args != null) {
for (int i = 0; i<args.length; i++) {
s = (String) args[i];
System.out.println("p" + i + ": " + s);
}
int i = Integer.parseInt( (String) args[0] );
s = (String) args[1];
System.out.println("i*i= " + i*i);
System.exit(1);
}
}
}
- Simple0
import jade.core.Agent;
import jade.core.behaviours.*;
public class Simple0 extends Agent
{
protected void setup()
{
addBehaviour( new B1( this ) );
}
class B1 extends SimpleBehaviour
{
public B1(Agent a) {
super(a);
}
public void action()
{
System.out.println( "Hello World! My name is " + myAgent.getLocalName() );
}
private boolean finished = false;
public boolean done() { return finished; }
} //End class B1
}
- Simple1
import jade.core.Agent;
import jade.core.behaviours.*;
public class Simple1 extends Agent
{
protected void setup()
{
addBehaviour(
// ------------- Anonymous SimpleBehaviour
new SimpleBehaviour( this ) {
int n=0;
public void action()
{
System.out.println( "Hello World! My name is " +
myAgent.getLocalName() );
n++;
}
public boolean done() { return n>=3; }
}
);
} // --- setup ---
} // --- class Simple1
Code
https://www.iro.umontreal.ca/~vaucher/Agents/Jade/code/
Youtube
Communication between two agents in different container through JADE
https://www.youtube.com/watch?v=6iOka1TAQrg&t=289s
References:
https://www-labs.iro.umontreal.ca/~vaucher/Agents/Jade/code/ch_2/
https://uomustansiriyah.edu.iq/media/lectures/6/6_2018_03_28!11_28_55_PM.pdf
http://www.cs.jyu.fi/ai/vagan/JADE_Introduction.pdf
https://ii.uni.wroc.pl/~lukstafi/pmwiki/uploads/Agents/tutorial.pdf
https://silo.tips/download/java-agent-development-framework-jade