8000 Importing to Jason · chon-group/Hermes Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Importing to Jason

Nilson Lazarin edited this page May 15, 2024 · 1 revision 83FC

Tutorial: How to import the Hermes BDI-agent Architecture in a Jason-CLI project

How to install the Jason-CLI ?

Importing the Hermes:

  1. In a terminal command, create a Multiagent System Project, using the command below:
jason app create multiAgentSystem
  1. Create a directory lib in the project folder and download the MailerAgent library into the library folder, using the command below:
wget https://github.com/chon-group/Hermes/releases/latest/download/HermesAgent.jar -P multiAgentSystem/lib/
  1. Change the file multiAgentSystem/multiAgentSystem.mas2j, including the content below:
MAS multiAgentSystem {
    agents:
        alice agentArchClass jason.Hermes;

    aslSourcePath: "src/agt";
}
  1. Change the file multiAgentSystem/src/agt/alice.asl, including the content below.
// Agent alice in project multiAgentSystem

/* Initial beliefs and rules */
iotGateway("skynet.chon.group",5500).
myUUID("b91ea9e3-56e7-4547-b78d-3ba89cd9f949").

/* Initial goals */
!start.

/* Plans */
+!start: iotGateway(Server,Port) & myUUID(ID) <- 
    .hermes.configureContextNetConnection("skyNET", Server, Port, ID);
	.hermes.connect("skyNET").
  1. Execute the Multiagent System
jason multiAgentSystem/multiAgentSystem.mas2j

The expected output:

Clone this wiki locally
0