-
Notifications
You must be signed in to change notification settings - Fork 0
Internal Actions
- .mailer.credentials(E,K) - set e-mail credentials.
- .mailer.eMailService([I,p],[O,q]) - set e-mail provider configurations.
Where:
- p is a literal that represents the input protocol (only available option is: imaps).
- q is a literal that represents the output protocol (only available option is: smtpOverTLS).
- E is a string that represents the e-mail account (e.g., "jomi@example.com");
- I is a string that represents the FQDN of the input e-mail server (e.g., "imap.example.com");
- K is a string that represents the e-mail password;
- O is a string that represents the FQDN of the output e-mail server(e.g., "smtp.example.com");
How to install the Jason-CLI ?
jason app create multiAgentSystem --console
ii) 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/Mailer/releases/latest/download/MailerAgent.jar -P multiAgentSystem/lib/
MAS multiAgentSystem {
agents: alice agentArchClass jason.Mailer;
aslSourcePath: "src/agt";
}
iv) Change the file multiAgentSystem/src/agt/alice.asl, including the content below and changing .mailer.credentials information.
In this example we are using a free GMX Mail Account. To use others Service Email Provider, see ProvidersExamples
// Agent alice in project multiAgentSystem
/* Initial beliefs and rules */
/* Initial goals */
!confEMail.
/* Plans */
+!confEMail<-
/* The Account username and password */
.mailer.credentials("INSERT-HERE-THE-EMAIL","INSERT-HERE-THE-PASS");
/* The Provider configurations */
.mailer.eMailService(["imap.gmx.com",imaps],["mail.gmx.com",smtpOverTLS]); /* To use GMX */
//.mailer.eMailService(["imap.gmail.com",imaps],["smtp.gmail.com",smtpOverTLS]); /* To use GMail */
//.mailer.eMailService(["imap.mail.yahoo.com",imaps],["smtp.mail.yahoo.com",smtpOverTLS]); /* To use Yahoo */
//.mailer.eMailService(["imap.fastmail.com",imaps],["smtp.fastmail.com",smtpOverTLS]); /* To use FastMail */
.
+greeting[source(Email)] <-
.print("Hello ", Email," nice to meet you!");
.mailer.sendEMail(Email,tell,aliceAgent(online));
.print("Now, try to send me a plan...");
.
jason multiAgentSystem/multiAgentSystem.mas2j
i) The humans can interact directly with a Jason Agent, over e-mail, since that e-mail be an KQML message.
- The e-mail subject is interpreted as a KQML Illocutionary force;
- The content is interpreted as AgentSpeak(L) code.
Below, the human is sending the belief (greeting) to the agent.
As the agent has a belief plan in your initial code (+greeting[source(Email)]...), it can reply to a human.
In this example, the agent sends a belief (aliceAgent(online)) for the human.
Below is shown the execution of the plan (stopTest), received from the human.
Mailer is licensed under a Creative Commons Attribution 4.0 International License. The licensor cannot revoke these freedoms as long as you follow the license terms:
- Attribution — You must give appropriate credit like below:
Lazarin, N.M., de Souza, J.P.B., Pantoja, C.E., Alexandre, T., Viterbo, J. (2025). Human and BDI-Agent Interaction via KQML Messages over IMAP and SMTP. In: Mathieu, P., De la Prieta, F. (eds) Advances in Practical Applications of Agents, Multi-Agent Systems, and Digital Twins: The PAAMS Collection. PAAMS 2024. Lecture Notes in Computer Science(), vol 15157. Springer, Cham. DOI: 10.1007/978-3-031-70415-4_15
Bibtex Citation
@InProceedings{mailerAgent,
doi="10.1007/978-3-031-70415-4_15"
author="Lazarin, Nilson Mori
and de Souza, Jo{\~a}o Pedro Bernardo
and Pantoja, Carlos Eduardo
and Alexandre, Tielle
and Viterbo, Jose",
editor="Mathieu, Philippe
and De la Prieta, Fernando",
title="Human and BDI-Agent Interaction via KQML Messages over IMAP and SMTP",
booktitle="Advances in Practical Applications of Agents, Multi-Agent Systems, and Digital Twins: The PAAMS Collection",
year="2025",
publisher="Springer Nature Switzerland",
address="Cham",
pages="172--183",
isbn="978-3-031-70415-4"
}