This repository contains a partial implementation of a JaCaMo application where BDI agents interact with their environment based on W3C Web of Things (WoT) Thing Descriptions, and coordinate with each other to assist a user through their daily activities.
├── mockserver
│ └── room-services.json // the initializer for the mockserver that mocks the HTTP APIs of a calendar service, a wristband, a set of blinds, and a set of lights
├── src
│ ├── agt
│ │ ├── personal_assistant.asl // agent program of the personal assistant agent
│ │ ├── wristband_manager.asl // agent program of the wristband manager agent
│ │ ├── calendar_manager.asl // agent program of the calendar manager agent
│ │ ├── blinds_controller.asl // agent program of the blinds controller agent
│ │ └── lights_controller.asl // agent program of the lights controller agent
│ └── env
│ └── room
│ └── DweetArtifact.java // artifact that can be used for sending messages to agents via the dweet.io API
└── task.jcm // the configuration file of the JaCaMo application
Complete the implementation of following:
- the
DweetArtifact.java
for enabling agents to send messages via the dweet.io API; - the
personal_assistant.asl
so that the personal assistant can create aDweetArtifact
instance, and achieve the goal of sending a message by using the artifact.- HINT: The CArtAgO By Example guide provides documentation and examples on how to program CArtAgO artifacts and their operations, and how to program agents that create artifacts and invoke artifact operations
Complete the implementation of following:
- the
calendar_manager.asl
can create and interact with an artifact based on the W3C WoT Thing Description of a calendar service; - the
blinds_controller.asl
can create and interact with an artifact based on the W3C WoT Thing Description of a set of blinds; - the
lights_controller.asl
can create and interact with an artifact based on the W3C WoT Thing Description of a set of lights.- HINTS:
- The repository of the jacamo-hypermedia library provides examples on how agents can create and interact with instances of ThingArtifact.java;
- In
wristband_manager.asl
the agent creates and invokes an operation of aThingArtifact
.
- HINTS:
Complete the implementation of following so that the agents can inform the personal_assistant.asl
about the state of the environment:
- the
wristband_manager.asl
; - the
calendar_manager.asl
; - the
blinds_controller.asl
; - the
lights_controller.asl
.
Complete the implementation of following so that the agents can coordinate with each other based on the FIPA Contract Net Interaction Protocol:
- the
personal_assistant.asl
; - the
blinds_controller.asl
; - the
lights_controller.asl
.
- Lecture slides; slides 21-26; 43-44;
- Bordini, R. H., Hübner, J. F., & Wooldridge, M. (2007). Programming multi-agent systems in AgentSpeak using Jason. John Wiley & Sons.; Chapter 6
- Boissier, O., Bordini, R. H., Hubner, J., & Ricci, A. (2020). Multi-agent oriented programming: programming multi-agent systems using JaCaMo. Mit Press; Chapters 5-7
- CArtAgO by Examples
- Default internal actions of Jason
Run MockServer with Docker:
docker run -v "$(pwd)"/mockserver/room-services.json:/tmp/mockserver/room-services.json -e MOCKSERVER_INITIALIZATION_JSON_PATH=/tmp/mockserver/room-services.json -d --rm --name mockserver -p 1080:1080 mockserver/mockserver
The above command will run a Docker container in the background and will print the container ID. To stop a container run: docker stop <CONTAINER_ID>
.
You can use this Postman collection to inspect the behavior of the devices' mockserver.
You can run the project directly in Visual Studio Code or from the command line with Gradle 7.4.
- In VSCode: Click on the Gradle Side Bar elephant icon, and navigate through
GRADLE PROJECTS
>exercise-6
>Tasks
>jacamo
>task
. - On MacOS and Linux run the following command:
./gradlew task
- On Windows run the following command:
gradle.bat task