JADE: Java Agent Development Framework What is it? How can I use it? Based on Online documentation of Jade http://jade.tilab.com/ 1
Overview Agent Communication Language Jade Features The agent Platform The Agent Class Agent communication Language Messages (ACL) Agent Behaviours 2
MAS Architecture Communications Speech Acts Assertive: true or false Compromise: future actions speaker Dictatorial: future actions listener Declarative: what I tell you is what I am doing now 3
MAS Architecture Communications FIPA CAL (Communicative Act Library) Information Doing Actions Negotiation Intermediate 4
MAS Architecture Communications FIPA CAL (Communicative Act Library) Information Who offers information» Inform» confirm» disconfirm» not understood Who require information» query» suscribe 5
MAS Architecture Communications FIPA CAL (Communicative Act Library) Doing Actions Who request» request» request when» request whenever» cancel Who perform» agree» Refuse» failure 6
MAS Architecture Communications FIPA CAL (Communicative Act Library) Negotiation Who need» cfp (call for proposals)» accept-proposal» reject-proposal Who cooperate» propose 7
MAS Architecture Communications FIPA CAL (Communicative Act Library) Intermediate Who need» propagate» proxy 8
MAS Architecture Communications FIPA ACL (Agent Communication Language) Message Structure Performative Sender Receiver Content Language 9
MAS Architecture Communications FIPA IPL (Interaction Protocol Library) AUML (Protocol Diagram) Query Protocol 10
MAS Architecture Communications FIPA IPL (Interaction Protocol Library) AUML (Protocol Diagram) Request Protocol 11
MAS Architecture Communications FIPA IPL (Interaction Protocol Library) AUML (Protocol Diagram) Subscribe Protocol 12
MAS Architecture Communications FIPA IPL (Interaction Protocol Library) AUML (Protocol Diagram) Contract Net Protocol 13
MAS Architecture Communications FIPA IPL (Interaction Protocol Library) AUML (Protocol Diagram) Iterated Contract Net Protocol 14
MAS Architecture Communications FIPA IPL (Interaction Protocol Library) AUML (Protocol Diagram) Brokering Protocol 15
MAS Architecture Communications FIPA IPL (Interaction Protocol Library) AUML (Protocol Diagram) Recruiting Protocol 16
Introduction What is JADE? JADE is a middleware for the development and runtime execution of peer-to-peer applications which are based on the agents paradigm. FIPA-compliant agent platform API : Package to develop Java Agents It is important to read about FIPA standards1, at least: Agent Management specifications Agent Communication Language ACL Message Structure 17
Introduction JADE Packages jade.core implements the kernel of the system: Agent class, jade.core.behaviours jade.lang.acl sub-package is provided to process Agent Communication Language according to FIPA jade.content package contains a set of classes to support user-defined ontologies and contentlanguages. 18
Introduction JADE Packages jade.domain package contains all classes that represent the Agent Management entities defined by the FIPA standard (AMS and DF) and others like Sniffer and Introspector. jade.gui package contains a set of generic classes useful to create GUIs to the agent Plaftform. jade.mtp package contains a Java interface for the Message Transport Protocol 19
Introduction JADE Packages jade.proto is the package that contains classes to model standard interaction protocols their own. jade.wrapper package provides wrappers of the JADE higher-level functionalities that allows the usage of JADE as a library, where external Java applications launch JADE agents and agent containers 20
Introduction JADE Tools: Remote Management Agent (RMA) Dummy Agent Sniffer Agent Introspector Agent DF Agent Log Agent SocketProxyAgent 21
Creating multi-agent systems Agent Platform 22
Creating multi-agent systems Agent Platform distributed 23
Creating multi-agent systems Agent Class The computational model of an agent is multitask. Each functionality/service provided by an agent should be implemented as one or more behaviours. A scheduler, internal to the base Agent class and hidden to the programmer, automatically manages the scheduling of behaviours. 24
Creating multi-agent systems Agent Life cycle 25
Creating multi-agent systems Starting the agent execution the agent constructor is executed the agent is given an identifier AgentName@<hostname>:<port number of the JADE RMI registry>/jade it is registered with the AMS it is put in the ACTIVE state, the setup() method is executed necessary add behaviours 26
Creating multi-agent systems Stopping agent execution dodelete(). takedown() can be overridden by the programmers after the takedown()method is completed, the agent will be de-registered and its thread destroyed. The intended purpose of this method is to perform application specific cleanup 27
Creating multi-agent systems Inter agent communications Asynchronous message passing ACLMessage Class Templates Interaccions Protocols at jade.proto send() receive() or blockingreceive() 28
Creating multi-agent systems Agents with a graphical user interface (GUI) Raises some problems. When JADE is used: the thread-per-agent concurrency model of JADE agents must work together with the Swing concurrency model. 29
Creating multi-agent systems The agent tasks. Implementing Agent behaviours Behaviour subclasses addbehaviour(behaviour) removebehaviour(behaviour) action() done() block() 30
Creating multi-agent systems The agent tasks. Implementing Agent behaviours 31
Installing Jade Steps: Dowload from Campus Virtual unzip into /home/<user> See Jade and META-INF new directories Open: /home/<user>/.bashrc file Add at the end of the file: export CLASSPATH=/home/paolajr/jade/lib/jade.jar:/home/paolajr/jade/li b/jadetools.jar:/home/paolajr/jade/lib/http.jar:/home/paolajr/jad e/lib/iiop.jar:/home/paolajr/jade/lib/commons-codec/commonscodec-1.3.jar:/home/paolajr/jade/classes export JAVA_HOME=/usr/lib/jvm/java-6-sun/ -this is optional- 32