Implementing a New Agent

Implementing a new agent is easy.

All you have to do basically is to derive your new agent class either from Agent or CMAgent. The difference between Agent and CMAgent is that CMAgent (and all inherited classes) use tasks to handle messages. The advantage of tasks is that they take care of the communication flow (replies etc.) automatically. Therefore they make parallel communication with multiple agents easier.

Since both Agent and Task are abstract classes, you also need to override their handleIncomingMessage() method which handles all incoming messages.

The A-globe system comes with a number of example classes which demonstrate the implementation of various types of agents. Source codes for these examples can be found in the directory \src\aglobe\src\examples\agent\.