
 
processed by methods of the class AgentMessage, 
within the class Communicator. The body of the 
message is not processed by Communicator but is 
forwarded to Manager (or to the other addressees 
respectively).  
4) AgentDescription
 contains the agent’s name, 
lists of properties and services (meant for public use) 
of the agent. AgentDescription is an instantiation of 
a public class AgentDescription. AgentDescription is 
applied to configure agents and to register agents 
with an AMS.  
2.2 Application Agents 
Majority of agents, instantiated from the classes in 
the namespace AgentComponents, carry out their 
autonomous and proactive tasks. Application agents 
belong to the public class Agent: AgentDescription. 
Class Agent, the basic class of the namespace, is 
derived from the class AgentDescription and may 
contain all components of an agent, as variables:  
Communicator communicator;  
Manager manager;  
Actor actor;  
Monitor monitor.  
 
When specialising a class Agent it is necessary, as a 
rule, to specialise its components Communicator, 
Manager, Actor, and Monitor. In the same WinA are 
constructed all components of the Agent. One has 
also to rewrite the respective constructor in order to 
substitute the construction of components with the 
construction of specialised (inherited) objects. 
Instantiation of a representative of the base class 
Agent is carried out by method init  that has to be 
rewritten if one wants to specialise the particular 
class of agents.  
2.3 Agent’s components  
An application agent is a complex that comprises 
several components described as follows.  
1) Communicator implements the inter-agent 
communication and interaction with the other agents 
in the system. Communicator’s functionality is 
standardised, e.g. it may implement the layers of 
Agent Communication Language, FIPA. In principle 
it could be an agent on its own. In its present 
implementation it is an object instantiated from 
public class Communicator. 
Method Communicator.init invokes a thread that 
waits for information from network, addressed to 
port Port. This thread is simultaneous with the other 
threads invoked within this agent. When a message 
from the network is received, a method 
Communicator.client is invoked – the thread waiting 
for new network messages remains active. Thus, the 
Communicator can process several network 
messages concurrently. Specific synchronisation 
services or appropriate time services support the 
synchronisation of concurrent processing of 
messages, whenever necessary. Those services and 
primitives can be implemented as specific 
application agents providing those services for other 
agents of a particular multi-agent system.  
Method Communicator.SendReply sends a 
message to the partner agent and waits for response. 
The response (possibly empty) is transformed to the 
AgentMessage form and is the value of this method.  
A method Communicator.shutdown terminates 
the network message waiting thread of the 
Communicator. Terminating of the Agent 
automatically terminates the Communicator.  
2) Manager is a public class whose instance 
guides interaction between Communicator and 
Actor, maintains the goal function(s) that define and 
rule the proactive behaviour of the agent, and 
controls learning and/or adaptability of the Actor. 
The only method defined in the class is 
Manager.Handle that is typically invoked by 
Communicator. The method Manager.Handle 
executes as an independent thread and must be re-
enterable. The other methods are to be defined 
during the derivation from the class Manager. 
3)  The public class Actor implements direct 
functional and non-functional requirements of an 
agent. Hence its methods and attributes depend 
heavily on a specific application, and very little can 
be predefined. The modified constructor guarantees 
communication with the other components of the 
agent, and communication with the real world 
objects (outside of the computer system) if 
necessary.  
4) Monitor is a component that monitors the 
operation of the agent. Based on the monitoring 
results it prepares periodic reports and forwards 
those (upon request) to MonitorAgent that is 
responsible for behaviour monitoring and self-
diagnosing of this particular multi-agent system.  
Monitor records events and processes voluntarily 
reported by the other components of an Agent. A 
public class MonitoredEvent defines an abstract 
event as an instantaneous phenomenon that has time 
instant of occurrence, type of the phenomenon, 
optional description of the phenomenon, and some 
quantitative characteristics of the event. A public 
class MonitoredProcess defines an abstract process 
as an activity that has a starting time, termination 
time, type of the activity, optional description of the 
activity, and some quantitative characteristics of the 
process.  
C# TEMPLATES FOR TIME-AWARE AGENTS
249