An Application Framework for Intelligent and Mobile Agents
ELIZABETH.A.KENDALL Email :
[email protected]
P.V.MURALI KRISHNA Nokia Research Center, Itamerenkatu 11-13 Helsinki 00180 Finland Email:
[email protected]
C.B.SURESH Nokia Research Center, Itamerenkatu 11-13 Helsinki 00180 Finland Email:
[email protected]
CHIRAG.V.PATHAK Nokia Venture Organistation 400-555 Legget Drive, Tower A Kanata, ON Canada K2K 2X3 Email:
[email protected]
The goal of this paper is to summarize research in designing and developing an application framework for intelligent and mobile agents. Agents are the next significant software abstraction; they will soon be as ubiquitous as graphical user interfaces are today. The major contribution of the work described here is a reusable design and implementation of an architecture that addresses all levels of agent behavior. The design is robust and well founded, based on object oriented design patterns. The framework has been employed in preliminary applications in network management and enterprise integration. However, agent systems are still evolving; to facilitate future development, the framework is documented with patterns.
Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. 2000 ACM 00360-0300/00/0300es ACM Computing Surveys, Vol. 32, No. 1es, March 2000
INTRODUCTION This paper summarizes research completed in designing and implementing an application framework for intelligent and mobile agents. Agent systems have been developed in response to the following requirements: - Personalized and customized user interfaces that are pro-active in assisting the user - Adaptable, fault tolerant distributed systems that solve complex problems- Open systems where components come and go and new components are continually added. New metaphors, such as negotiation, for solving distributed, multi- disciplinary problems.Agents appear in a wide range of applications, including electronic commerce, enterprise integration, and business process support. However, all agent development to date has been done independently. This has led to the following problems [Bradshaw 1997]: - Lack of an agreed definition: Agents built by different teams have different capabilities. - Duplication of effort: There has been little or no reuse of agent architectures, designs, or components. - Inability to satisfy industrial strength requirements: Agents must integrate with existing software and computer infrastructure. They must also address security and scaling concerns. - Incompatibility: Agents should be able to interact and cooperate with each other, and standardization is being pursued. However, if development efforts are not coordinated, the resulting agents are not compatible with one another.
The framework discussed here is called JAFIMA, and it addresses the four issues listed above that have plagued agent based systems to date. JAFIMA is an application or horizontal framework because an agent is a general purpose software module. This framework therefore captures expertise that is applicable to many diverse client domains, across a wide horizontal cross section of software systems. Agents are a new abstraction, and the framework is still evolving. This means that it will be significantly modified and used in many unforeseen ways. As such, JAFIMA’s design has been documented via patterns; pattern names and brief summaries are provided in this paper. AGENT BASED SYSTEMS
A weak agent is autonomous, social, reactive, and pro-active; it is the combination of these behaviors that distinguishes an agent from objects, actors, and robots. Social behavior means that agents utilize structured messaging and protocols for coordination and negotiation; further, agents are organized into societies or groups. A strong agent, in addition to the capabilities defined for weak agents, is knowledge based; it reasons to determine what to do next.
ACM Computing Surveys, Vol. 32, No. 1es, March 2000
Agent
External
Capabilities
Object(s)
External Object(s)
Belief Intention Intention Sensors
Effectors
Interpreter
Collaboration
Migration
Intention
Agent Key:
- agent component - component in thread of control
Figure 1: A model of an agent behavior JAFIMA is based on the following model of agent behavior [Kendall et al 1997] (Figure 1). Agents select a capability that could achieve their stated goal(s); this is the responsibility of the interpreter. A selected plan from the capabilities library is instantiated as an intention. An intention executes in its own thread, and an agent may have several intentions executing concurrently. Agents negotiate with each other in conversations or protocols and agent societies may be centralized or decentralized. Collaboration across disciplines requires that cross disciplinary semantics or ontologies can be exchanged.
THE LAYERED AGENT ARCHITECTURE Agents should be decomposed into layers [Buschmann et al 1996] because i) higher level behavior depends on lower level capabilities, ii) levels only depend on their neighbors, and iii) there is two way information flow between neighboring levels. The layers can be identified from the model of the agent’s real world. Figure 2 structures Figure 1 into seven layers. Top down information flow is shown on the left; bottom up is on the right. Once the layers have been established, they can be utilized to structure the framework.
ACM Computing Surveys, Vol. 32, No. 1es, March 2000
Bottom Up
Top Down Layer 7: brings in messages from distant agent societies Layer 6: translates incoming messages Layer 5: determines whether an incoming message should be processed Layer 4:takes in pending actions Layer 3: reasons regarding the selected action Layer 2: updates beliefs according to reasoning Layer 1: gathers regular sensor updates
MOBILITY
Layer 7: transports the agent to distant societies
TRANSLATION
Layer 6:translates the agent’s messages to other agent’s semantics (ontologies)
COLLABORATION
Layer 5:verifies & directs outgoing messages to distant and local agents
ACTIONS REASONING BELIEFS SENSORY
Layer 4: stores and carries out the intentions being undertaken by the agent Layer 3: processes the beliefs to determine what should be done next; stores the reasoner and the plan Layer 2: stores the agent’s beliefs; updates beliefs according to sensor input Layer 1: senses changes in the environment; messages updates
Figure 2: The Layered Agent Architecture THE SENSORY, BELIEFS AND REASONING LAYERS The Sensory layer of an agent is responsible for proactively sensing the environment and updating the beliefs; the key abstraction of the sub-framework for this layer (indicated in bold print) is a Sensor that needs to cooperate with domain specific interface classes. The design of the Sensory layer uses the Adapter pattern [Gamma et al 1994]. The Beliefs layer stores Beliefs that can be primitive or composite. Whenever a belief is changed through sensory input or the actions of the agent, the Reasoning layer needs to be notified. The Beliefs layer uses the Composite pattern [Gamma et al 1994] so primitive and composite beliefs can be treated uniformly and the Observer pattern [Gamma et al 1994] for notifying Reasoning when related beliefs are updated. The Reasoning layer determines what the agent should do next. Reasoning interprets beliefs and requests to determine an appropriate reaction. Reasoning defines objects for the grammar used to define stimuli, conditions, goals, and actions, and these are abstracted as Expressions and Plans. The Interpreter and Strategy patterns [Gamma et al 1994] are employed per Figure 3. Per the Strategy pattern, a Plan is an object; by the Interpreter pattern, expressions have their own behavior interpret(). Further, there are general clauses (RegularExpression), logical operators (LogicalExpression), and terminating expressions (Belief Expression).
ACM Computing Surveys, Vol. 32, No. 1es, March 2000
RegularExpression
AbstractPlan
interpret( )
expression2
BeliefExpression expression1 beliefelement interpret( )
LogicalExpression : RegularExpression : RegularExpression interpret( )
Figure 3: The Interpreter and Strategy Patterns in the Reasoning Layer THE ACTION LAYER The Action layer is responsible for carrying out the plan selected by the Reasoning layer. A plan is instantiated in a separate thread called an Intention. The Action layer incorporates Collaboration Intentions that utilize an interface to the Collaboration layer known as Collaborators, and Reaction Intentions that use an environment specific interface known as the Effectors. There is a need to provide a Scheduler and a Prioritizer for scheduling and prioritizing actions.
The Action layer sub- framework consists of the following patterns: - Command [Gamma et al 1994] is used to make a plan into a command. - Abstract Factory [Gamma et al 1994] creates a plan object based on a given class library. - Factory Method [Gamma et al 1994] creates intention thread objects dynamically. - Decorator [Gamma et al 1994] implements the Prioritizer. - Future [Kafura and Lavender 1994], with Observer [Gamma et al 1994], asynchronous method invocation by an intention thread.
Active Object [Lavender and Schmidt 1995] is used to schedule actions which affect the environment.
ACM Computing Surveys, Vol. 32, No. 1es, March 2000
THE COLLABORATION LAYER The Collaboration layer is responsible for carrying out the exchange of services and negotiation with other agents. It determines how to collaborate and addresses different coordination protocols. The collaboration layer sends, receives, and rejects requests, along with replying to messages. Centralized collaboration is the responsibility of a Mediator or Manager. The Mediator pattern [Gamma et al 1994] allows an agent to freely collaborate with other agents without direct knowledge of their existence.
In decentralized collaboration agents deal directly with one another; the agent maintains the state of each conversation to avoid endless loops. An agent must also support different interfaces. During decentralized collaboration, the Role of an individual agent changes; it can be a client or a server. Each negotiation Session needs to be uniquely identifiable. An agent always sends a Message in the Protocol of the receiving agent, and messages are converted before being sent. Since the Collaboration layer will be communicating with more than one agent concurrently, this layer is multithreaded. The many activities of the Collaboration layer are managed by the CollaborationInterface, including message delivery and reception that are addressed by Connectors and Acceptors, respectively. The Collaboration layer sub-framework consists of the following patterns. - Sychronized Singleton is used to manage the collaboration threads. - Decorator [Gamma et al 1994] changes the behaviour of the thread dynamically - Active Object [Lavender and Schmidt 1995] is used to schedule the requests forwarded by the action layer - Future [Kafura and Lavender 1994] in combination with Observer is used for asychronous method invocation - Strategy [Gamma et al 1994] is used to convert a message into the corresponding language of the destination agent. THE MOBILITY LAYER SUB-FRAMEWORK The Mobility layer is shared by several agents and agent societies. It supports virtual migration by providing location transparency between collaborating agents. It supports actual migration by providing a framework for cloning an agent in another environment.
ACM Computing Surveys, Vol. 32, No. 1es, March 2000
Agent Society Remote Configurator
Agent Agent Mobility Layer Client Proxy
Shared Mobility Layer
Information Repository
Client Proxy Agent Mobility Layer Agent
Remote Configurator
Broker
Actual Migration Virtual Migration
Agent Society
Figure 4: Architecture of Mobility Layer Figure 4 shows the architecture of the centralised Mobility layer. The Mobility layer consists of a shared region and a region that belongs to an individual agent. It is made up of the following key abstractions. The Client Proxy marshalls the service request messages. It also acts as a class loader and as a proxy server to the lower layers, providing location transparency for virtual migration. The Remote Configurator supports actual migration by cloning an agent dynamically at runtime. The Broker is the central object for agent mobility. Each agent, Client Proxy, and Remote Configurator object is registered by the Broker. The Broker also provides the bus through which inter-agent transactions are done. The Information Repository stores information about the registered objects. The design of the Mobility layer is based on the following design patterns: Factory Method, Visitor, and Proxy [Gamma et al 1994], and Active Object [Lavender and Schmidt 1995]. CONCLUSIONS
This framework demonstrates that agents can be designed and implemented using objects. The framework has been utilized to develop a small agent based system for network management, and an agent based system for detecting network intrusion. It is also being used for an application in enterprise integration that utilizes mobile agents.
ACM Computing Surveys, Vol. 32, No. 1es, March 2000
All of these simple applications could have been developed without agents. However, these have been built to illustrate the enabling technology. They represent a starting point, and agent technology is still in its infancy. Agents represent a new paradigm, and significant applications, although they have been recognized, have not yet been developed. In comparison to other frameworks for agent based systems, JAFIMA is more comprehensive, addressing more aspects of agency. Concordia [Walsh et al 1998] emphasizes mobility but does not address reasoning; Zeus [Nwana et al 1998] concentrates on reasoning or expertise and collaboration; it does not cover mobility. Further, JAFIMA is the only agent framework that utilizes patterns for design and documentation.
REFERENCES
BRADSHAW, J. M., DUTFIELD, S., BENOIT, P., and WOOLLEY, J. D. KAoS: Toward an Industrial- Strength Open Distributed Agent Architecture, BRADSHAW, J. M. (Ed.), SOFTWARE AGENTS, AAAI/ MIT Press, 1997. BUSCHMANN, F., MEUNIER, R., ROHNERT, H., SOMMERLAD, P., and STAL, M. PATTERN-ORIENTED SOFTWARE ARCHITECTURE: A SYSTEM of PATTERNS, Wiley and Sons, 1996. FAYAD, M., and SCHMIDT, D. Object Oriented Application Frameworks, CACM, 40, 10, (October, 1997). GAMMA, E.R., HELM, R., JOHNSON, R., and J. VLISSIDES, J. DESIGN PATTERNS: ELEMENTS of REUSABLE OBJECT-ORIENTED SOFTWARE, Addison-Wesley, 1994. JOHNSON, R. E., Documenting Frameworks with Patterns, OOPSLA’92 (1992), 63-76. KAFURA, D.G. and LAVENDER, R.G. A Polymorphic Future and First Class Function type for Concurrent Object Oriented Programming, http://www.cs.utexas.edu/users/lavender/papers/futures.ps, 1994. KENDALL, E. A., MALKOUN, M. T. and JIANG, C. H. Multiagent System Design Based on Object Oriented Patterns, Rep. Obj. Anal. Des. with J. Obj. Or. Prog. , (June, 1997), 41 - 47. LAVENDER, R.G. and SCHMIDT, D. C. Active Object: an Object Behavioral Pattern for Concurrent Programming, VLISSIDES, J. M., COPLIEN, J. O., KERTH, N. L. (Ed.), PATTERN LANGUAGES of PROGRAM DESIGN 2, Addison- Wesley, 1996. NWANA, H. S., NDUMU, D. T., and LEE, L. C. ZEUS: An Advanced Tool Kit for Engineering Distributed Multi Agent Systems, Prac. App. Agent Multi- agent Sys (PAAM), (March, 1998), 377 - 391. ACM Computing Surveys, Vol. 32, No. 1es, March 2000
ROGERS, G. F. FRAMEWORK- BASED SOFTWARE DEVELOPMENT in C++, Prentice Hall Series on Programming Tools and Methodologies, Prentice Hall, 1997. SCHMIDT, D.C. The ACE Object-Oriented Encapsulation of Light Weight Concurrency Mechanisms, Technical report number WUCS-95-31, Washington University, St. Louis (1995). WALSH, T., PACIOREK, N., WONG, D., Security and Reliability in Concordia, Hawaii Int. Conf. Sys. Sci (HICSS'31), Hawaii, (January, 1998).
ACM Computing Surveys, Vol. 32, No. 1es, March 2000