Chauhan - Mobile Agent - Delhi, India

Nripesh Chauhan

Delhi, India

NIT Kurukshetra


Mobile Agent

Work History



Research Scholar




ROLL NO:211521



One of the more interesting developments in technology over the last several years has been the advent of mobile agent technology. This technology allows for scripts to move freely and autonomously from host to host, and to then execute predefined scripts on their new destination.

Mobile agent technology is remarkable in that it is completely self-contained and self-directed. It can send itself to another computer and then execute a script on that computer. And although it must initially be directed to move from one computer to another, it can then choose on its own to migrate to or from hosts. If a computer loses network connectivity, the agent can continue fulfilling its task, which can offer a real productivity boost.

Of course, while the technology is indeed impressive, it also has raised some concerns from privacy advocates. This report provides a brief introduction to mobile agent and its technology. It also provides a discussion on java based agent like Aglet and its security related issue.








The term agent comes from greek ‘agein’, which means to drive or to lead. Today the term agent denotes something that produces or is capable of producing an effect. It can be a chemically, physically or biologically active principle. With this broad scope the term agent can be used for substances (rinsing agent) as well as for human beings (travel agent). With its connotation of driving or leading something, the term is very suitable to describe current trends in computer science away from using the computer as a passive tool towards considering the computer as some more active instrument, in particular an instrument to which work can be delegated. Programming techniques and software that enable a more active role of the computer have been proposed in many different areas of computer science. To distinguish these agents from other types of agents, they are summarized under the term software agents

1.2 Classification of Software Agents
According to Gilbert et al. (1), software agents can be classified in terms of a space defined by the three dimensions of intelligence, agency and mobility (see Figure 1):

The first dimension, intelligence, is rooted in artificial intelligence research and dates back to the fifties, where the term agent was coined by Selfridge for a ‘soft robot’ living and acting with in a computer. The goal within this approach was an agent that could apply techniques of symbolic artificial intelligence in order to fulfill a given task or to recover when it was stuck. These intelligent agents can be classified according to their capabilities to express preferences, beliefs and emotions and according to their ability to fulfill a task by reasoning, planning and learning techniques .

The second dimension, agency, is the degree of autonomy and authority vested in the agent and can be measured at least quantitatively by the nature of the interaction between the agent and other entities of the system. At a minimum an agent must run asynchronously. The degree of agency is enhanced if an agent represents a user in some way. A more advanced agent can interact with data, applications, services or other agents. According to their capabilities, agents are called autonomous, collaborative, cooperative or negotiating agents .

The third dimension of software agent research, mobility, has emerged in the nineties and is motivated by the rise and rapid growth of a networked computing environment and the need for techniques to exploit this huge resource. The goal within this dimension of software agent research is remote action and mobility of data and computation. These mobile agents can be classified according to the scope of their mobility into desktop (or static) agents, intra-net agents, Internet agents or network agents .

Chapter 2
Mobile Agent

2.1 Mobile agents:

A mobile agent is a program, which represents a user in a computer network, and is capable of migrating autonomously from node to node, to perform some computation on behalf of the user. Mobile agents are defined as objects that have behavior, state, and location [2]. Its tasks are determined by the agent application, and can range from on line shopping to real-time device control to distributed scientific computing. Applications can inject mobile agents into a network, allowing them to roam the network either on a predetermined path, or one that the agents themselves determine based on dynamically gathered information. Having accomplished their goals, the agents may return to their home site'' in order to report their results to the user.

A subset of behaviors of every agent is inherited from the model, notably those behaviors that define the means by which agents move from place to place. Finally, a mobile agent model is not complete without defining a set of events that are of interest to the agent during its lifetime.

2.2 Life Cycle of Mobile Agent
The life cycle of a mobile agent includes following phases:

Creation - Analogous to the constructor of an object. A handler for this event should initialize state and prepare the agent for further instructions.

Disposal - Analogous to the destructor of an object. A handler for this even should free whatever resources the agent is using.

Dispatch - Signals the agent to prepare for departure to a new location. This event can be generated explicitly by the agent itself upon requesting to migrate, or it can be triggered by another agent that has asked this agent to move.

Arrival - Signals the agent that it has successfully arrived at its new location and that it should commence performing its duties.

Communication - Notifies the agent to handle messages incoming from other agents and is the primary means of inter-agent correspondence.

2.3 Mobile agents and the traditional model

Mobile agent provides a new design model for applications as compared to the traditional client server model. First and foremost, the mobile agent shatters the very notion of client and server. With mobile agents, the flow of control actually moves across the network, instead of using the request/response architecture of client-server. In effect, every node is a server in the agent network, and the agent moves to the location where it may find the services it needs to run at each point in its execution [3]. The scaling of servers and connections then becomes a straightforward capacity issue, without the complicated exponential scaling required between multiple servers. The problem of robust networks is
greatly diminished, for several reasons. The hold time for connections is reduced to only the time required to move the agent in or out of the machine. Because the agent carries its own credentials, the connection is simply a conduit, not tied to user authentication or spoofing. Last and most important, no application-level protocol is created by the use of agents. Therefore, compatibility is provided for any agent-based application. Complete upward compatibility becomes the norm rather than a problem to be tackled, and upgrading or reconfiguring an application may be done without regard to client deployment. Servers can be upgraded, services moved, load balancing interposed, security policy enforced, without interruptions or revisions to the network and clients.

2.4 Advantages of using mobile agents:
Some of the benefits of mobile agents are:

Reduction in network traffic: MA's code is very often smaller than data that it processes, so the transfer of mobile agents to the sources of data creates less traffic than transferring the data.

Asynchronous autonomous interaction: Mobile agents can be delegated to perform certain tasks even if the delegating entity does not remain active. This makes it an attractive for mobile application and disconnected operations.

Interaction with real-time systems: Installing a mobile agent close to a real-time system may prevent delays caused by network congestion.

Efficiency savings: CPU consumption is limited, because a mobile agent execute only on one node at a time. Other nodes do not run an agent until needed.

Space savings: Resource consumption is limited, because a mobile agent resides only on one node at a time. In contrast, static multiple servers require duplication of functionality at every location. Mobile agents carry the functionality with them, so it does not have to be duplicated.

Support for heterogeneous environments: Mobile agents are separated from the hosts by the mobility framework. If the framework is in place, agents can targetany system. The costs of running a Java Virtual Machine (JVM) on a device are decreasing. Java chips will probably dominate in the future, but the underlying technology is also evolving in the direction of ever-smaller footprints (e.g. Jini).

On-line extensibility of services: Mobile agents can be used to extend capabilities of applications, for example, providing services. This allows for building systems that are extremely flexible

Convenient development paradigm: Creating distributed systems based on mobile agents is relatively easy. The difficult part is the mobility framework, but when it is in place, then creating applications is facilitated.

Easy software upgrades: A mobile agent can be exchanged virtually at will. In contrast, swapping functionality of servers is complicated; especially, if we want to maintain the appropriate level of quality of service (QoS).

2.5 Existing mobile agent systems:

With the introduction of Java to the Internet world, many mobile agent projects have made use of this operating system independent language. Another benefit to using Java is that each of these systems can make use of the standards that are inherent in Java such as the Java virtual machine and object serialization mechanism . Some of these systems are listed below :

Aglets, IBM's mobile agent system. The word Aglet is formed through the combination the words agent and applet, as the intention of this system is to bring mobility to Java applets [4].

Odyssey, from General Magic Inc. was the first mobile agent system. It was reworked using Java and now provides a set of Java classes that developers can make use of to create their own mobile agent applications[2].

Concordia, Mitsubishi's agent system which provides developers with a framework for the development and the management of mobile agent applications[5]. These applications can be extended to any system supporting Java.

Voyager, an agent based system that supports both traditional and agent-based distributed computing techniques created by Object Space. Voyager supports object request brokering so developers can create distributed application using both traditional messaging, such as CORBA or RMI, as well as agent-enhanced techniques [6].

2.6 New trends in Internet applications:
There are many trends in Internet technology and activity that encourage the use of mobile agents on the Internet. These trends are outlined [7] and are briefly described below:

Bandwidth : Internet access is broadening to the point where people will have a reasonable-speed access to the Internet. The Internet backbone has an enormous amount of bandwidth available, however the average user will not have this at his disposal.

Mobile devices : Internet users are mobile and therefore they need their Internet access to come with them by using portable computing devices. Everything from laptops or palmtops to car telephones to pagers can access the Internet. These devices usually connect using a telephone or wireless network.

Mobile users : Internet users have shown that they like to have access to everything from anywhere through the popularity of things like web-mail. Web terminals are becoming more and more popular, Internet cafes are the latest in public place Internet access.

Intra nets : Internal or private and smaller versions of the Internet are being used for information sharing within companies and corporations. Intra nets are usually managed by a single organization and can make use of new technologies quickly since security within the intra net is of less concern.

Information overload : The massive amount of information available on the Internet today is immeasurable. Users are easily overwhelmed by the sheer quantity of data that is at their disposal. Filtering technology, while still quite limited, can help reduce the stream of information to a given user to a tolerable level.

Customization : Site customization for individual users is possible through the Internet and can be provided on either the client or server side.

Proxies : Third party proxies can provide site wide customization for one or more Internet services. They can be used to reduce information overload and customize service access.

Chapter 3
Agent Framework

3.1 Agent frameworks:
This chapter describes the architectural design of Java based mobile agent frameworks viz. Ag lets

Java as technology base for mobile agents:
In the current trend towards heterogeneous networks, which are composed by several different platforms, the mobility of binary code is problem hardly to overcome, for this Java programming language, which combines the object-oriented programming style with the use of intermediate format called byte code, which can be executed on each platform that hosts a Java virtual machine (JVM).

Java is strongly network oriented and provides some support for mobility of code from the dynamic class loading to the definition of applets. Java implements a form of weak mobility, by serializing objects and sending them to another JVM. The serialization mechanism permits to maintain the values of the instance variables, but it cannot keep track of the execution flow. Some of the properties of Java that make it a good language for mobile agent programming are :

Platform-independence : Java is designed to operate in heterogeneous networks. To enable a Java application to execute anywhere on the network, the compiler generates architecture-neutral byte code, as opposed to non-portable native code.

Object serialization : A key feature of mobile agents is that they can be serialized and de-serialized. Java conveniently provides a built-in serialization mechanism that can represent the state of an object in a serialized form sufficiently detailed for the object to be reconstructed later. The serialized form of the object must be able to identify the Java class from which the object's state was saved, and to restore the state in a new instance.

Reflection: Java code can discover information about the fields, methods, and constructors of loaded classes, and can use reflected fields, methods, and constructors operate on their underlying counterparts in objects, all within the security restrictions.

Multi-thread programming : Agents are by definition autonomous and could be implemented as individual threads.

Security manager : It defines which resources a Java program is allowed to access The Java virtual machine also contains a byte code verifier that does static checks to prevent forbidden code sequences from being loaded, thereby ensuring the reachability of the sandbox surrounding the incoming code.

3.2 Aglets :

Aglets was developed by IBM Tokyo Research Laboratory and is now open source. An Aglet is a composite Java object that includes mobility and persistence and its own thread of execution. Aglets uses a call-back model based on the Java event delegation model. Various action and mobility interfaces are supported by Aglets framework which determine what to do when a specific event happens. An Aglet interacts with its environment through an AgletContext object. Aglets are always executed in AgletContexts. To interact with each other, Aglets go through AgletProxy objects. An AgletProxy object acts as an interface of an Aglet and provides a common way of accessing the Aglet behind it. In a way, an AgletProxy object becomes the shield that protects an agent from malicious agents. Figure 3.1 show the Aglet interaction model

Architecture overview :

The Aglets architecture consists of two layers, and two APIs that define interfaces for accessing their functions[8][9] viz., runtime layer and the communication layer. Figure 3.2 show the Aglet architecture with the two layers and sub-components.

The Aglets runtime layer :

The Aglets runtime layer implements Aglets interfaces such as AgletContext and AgletProxy it also consists of a core framework and subcomponents. The core framework provides mechanisms fundamental to Aglet execution i.e., 1) Serialization and de- serialization of Aglets 2) Class loading and transfer 3) Reference management and garbage collection. The subcomponents are designed to be extensible and customizable because these services may vary depending on requirements or environments.

Persistence Manager :
The PersistenceManager is responsible for storing the serialized agent, consisting of the Aglet's code and state into a persistent medium such as a hard disk. Persistence manager do not keep a copy of agent before dispatching and hence the system is susceptible to loss of agent over broken network.

Cache Manager :
The Cache Manager is responsible for maintaining the byte code used by the Aglet and its transfer when an Aglet moves, the Cache-manager caches all byte code even after the corresponding class has been defined.

Security Manager
The Security Manager is responsible for protecting hosts and Aglets from malicious entities. A very preliminary form of security is supported by Aglets framework .

The communication layer:

The Aglets runtime itself has no communication mechanism for transferring the serialized data of an Aglet to destinations. Instead, the Aglets runtime uses the communication API that abstracts the communication between agent systems [9]. This API defines methods for creating and transferring agents, tracking agents, and managing agents in an agent-system and protocol-independent way. The current Aglets uses the Agent Transfer Protocol (ATP) as the default implementation of the communication layer. ATP is modeled on the HTTP protocol, and is an application-level protocol for transmission of mobile agents. To enable remote communication between agents, ATP also supports message-passing. Aglets uses ATP for agent transfer and RMI for message exchange.

The communication layer architecture :

The following figure shows the architecture of the communication layer.

An application or client uses a stub object to send a request to the destination. An agent system must have a stub class for each protocol it supports. Applications or clients can then get and use a stub object for a given protocol. An agent system's responsibility to instantiate and manage stub objects. Aglets supports two protocols, ATP and RMI.

On the other hand, an aglet server has an implementation of MAFAgentSystem that actually handles the requests. It is the agent-system provider's responsibility to provide the implementation of MAFAgentSystem.. Furthermore, a server has one or more daemons to accept requests from a sender. A server may support multiple protocols by having multiple daemons to handle each protocol. When a daemon accepts requests, it then forward these requests to the MAFAgentSytem_AgletsImpl.

The communication API used by Aglets runtime is derived from the OMG standard, MASIF (Mobile Agent System Interoperability Facility), which allows various agent systems to interoperate. This interface abstracts the communication layer by defining interfaces and providing a common representation in Java that conforms to the IDL defined in the MASIF standard.

Agent Transfer Protocol :

ATP is a simple application-level protocol designed to transmit an agent in an agent- system-independent manner. An ATP request consists of a request line, header fields, and a content. The request line specifies the method of the request, while the header fields contain the parameters of the request. ATP defines the following four standard request methods:

Dispatch :
The dispatch method requests a destination agent system to reconstruct an agent from the content of a request and to start executing the agent. If the request is successful, the sender must terminate the agent and release any resources consumed by it.

The retract method requests a destination agent system to send a specified agent back to the sender. The receiver is responsible for reconstructing and resuming the agent. If the agent is successfully transferred, the receiver must terminate the agent and release any resources consumed by it.

Fetch :
The fetch method is similar to the GET method in HTTP; it requests a receiver to retrieve and send any identified information (normally class files).

The message method is used to pass a message to an agent identified by a agent-id and to return a reply value in the response. Although the protocol adopts a request/reply form, it does not lay down any rules for a scheme of communication between agents.

Unlike normal Java objects, which are automatically released by garbage collector, an Aglet object, since it is active, can decide whether or not to die. Aglet programmers are responsible for releasing allocated resources such as file descriptors or DB connections, because these may not be released automatically.

Chapter 4
Mobile Agent Migration Technology

4.1 Concept of Migration:

In general, the following things are required to allow agents to migrate across a network
1. Common execution language
2. Process persistence
3. Communication mechanism between agent hosts
4. Security to protect agents and agent hosts

Common execution language
If a process is to migrate from one host to another, then both hosts must share a common execution language. In a homogeneous networking environment, it's conceivable that assembly language or machine code could be sent across the network for execution. However, such a system would be extremely limited, and not very future proof.
A more likely scenario for mobile agency is a heterogeneous environment, where many different system architectures are connected. In this case, an interpreted scripting language or emulation of a system that is capable of executing machine code 10] solves the problem of a common execution language.
Process persistence
For processes to migrate to remote machines, they must be capable of saving their execution state, or spawning a new process whose execution state will be saved. This property is called persistence. Persistence involves converting the object's state (variables, stack, and possibly even the point of execution) and converting it into a data form suitable for transmission over a network. Agents should not have to be responsible for achieving this themselves, and process persistence would likely be built into the mobile agent language or architecture.
Communication mechanism between agent hosts
Some communication mechanism must exist to transfer agents across networks. An agent might be transferred using TCP/IP, or by using a higher level of communication such as RMI, IIOP, SMTP or even HTTP. Mobile agent architectures may even use a variety of transport mechanisms, giving greater flexibility.
An agent's executable code must be transferred, which may consume a large amount of network bandwidth, unless shared code is located at the agent host. Techniques such as shared libraries of code, or caching, may be of benefit. In addition, the persistent state of the agent must be transferred.
Security to protect agents and agent hosts
Security is critical when executable code is transferred across a network. Malicious or badly written code could wreak havoc when unleashed upon an unsuspecting host, and agents themselves need protection against hostile hosts that would seek to dissect or modify them. There is no magic solution that will solve all the security problems of mobile agents, but precautions can be taken to minimize risk.
When an agent leaves for a new host, extreme care must be taken to prevent unauthorized modification or analysis of the agent. Agents may carry with them confidential or sensitive information and logic, which shouldn't be accessible to the agent host. Encryption may be of benefit, but the data and code must be decrypted at some point in time for the agent to execute. Once this occurs, the agent becomes vulnerable, and is at the mercy of the agent host. In a scripting language, the internal logic of the agent is exposed, but even compiled languages can be decompiled with a disturbing degree of success

4.2 Competing Technology:

Mobile agency faces stiff competition from other technologies that can achieve similar outcomes, such as message passing or advanced forms of remote procedure calls. Some of the more notable technologies that offer competition to mobile agency are discussed.
4.2.1 Message passing systems:
Software agents need not always travel across a network to communicate with information sources, or other agents. One of the most important message passing systems for agents is the Knowledge Query Manipulation Language (KQML). KQML is an important mechanism for communication, because it allows much more complex forms of interaction than query/response mechanisms. KQML allows agents to communicate using a rich set of messages called per formatives, and is capable of communicating attitudes about information, rather than just data and facts (Finin, 1998). Message passing systems like KQML don't require mobility, they can simply pass a message and have it delivered through some transport mechanism

4.2.2 Remote Method Invocation (RMI)
Remote method invocation allows Java developers to write distributed systems that share objects. New objects can be transferred across the network, and RMI is becoming a popular mechanism for agent communication. RMI can be used to facilitate mobile agency (acting as a transport mechanism), or as a replacement that allows agents to invoke methods of other agents.

4.2.3 Common Object Request Broker Architecture (CORBA)
CORBA is a platform and language independent mechanism for invoking remote object methods. Unlike RMI which is specific only to Java Virtual Machines, CORBA can be used to create distributed systems that execute on many platforms, in many languages. CORBA holds great potential, because of its portability and flexibility. CORBA is a direct threat to mobile agency, and would allow developers to create agents that are capable of complex communication without ever traveling across a network.

Chapter 5
Application of Mobile Agent

A list of mobile agent application is given below:

1.Distributed Information Retrieval:
Distributed information Retrieval applications gather information matching some specified criteria from a set of information sources dispersed in the network. The information sources to be visited can be defined statically or determined dynamically during the retrieval process. This is a wide application domain ,encompassing very diverse applications.

2.Active Documents:
In active documents applications, traditionally passive data, like e-mail or web pages are enhanced with the capability of executing programs which are somewhat related with the documents content , enabling enhanced presentation and interaction .

3.Advanced Telecommunication Services:
Mobile Agent can be used to provide advanced telecommunication services like video conference, video on demand etc. These application requires a middle ware.

4.Remote device control and configuration:
Remote device control applications are aimed at configuring a network of devices and monitoring their status. Configuration is performed using a predefined set of services.

5.Work flow Management and Cooperation:
Work flow management applications support the cooperation of persons and tools involved in an engineering or business process.

6.Electronic Commerce:
These applications enable users to perform business transaction through the network . The application environment is composed of several independent and possibly competing business entities.

7.Monitoring and notification:
This is one of the "classical" mobile agent applications that highlight the asynchronous nature of mobile agents. An agent is able to monitor a given information source without being dependent on the location from which it originates. Agents can be dispatched to wait for certain kinds of information to
become available. It is often important that monitoring agents have life spans that exceed or are independent of the computing processes that create them.

8. Information dissemination:
Mobile agents embody the so-called Internet "push" model. Agents are able to disseminate information such as news and automatic software updates for vendors. The agents will bring the new software components as well as the installation procedures directly to the customer's personal computer and
will autonomously update and manage the software on the computer.

9.Parallel processing:
Given that mobile agents can create a cascade of clones in the network, one potential use of mobile agent technology is to administer parallel processing tasks. If a computation requires so much processor power as to that it must be distributed among multiple processors, an infrastructure of mobile agent hosts could be a plausible way to get the processes out there.


1. Gilbert, D. Aparicio, M. Atkinson, B. Brady, S. Ciccarino, J. Grosof, B. O’Connor, P. Osisek, D. Pritko, S. Spagna R. and Wilson, L.,” IBM Intelligent Agent Strategy”, IBM Corporation, (1995).
2. Alfonso, F., Gian Pietro, P., and Giovanni, V., , "Understanding Code Mobility ", IEEE Transactions on Software Engineering , vol. 24(5), 1998
3. Danny B. Lange and Mitsuru Oshima, "Seven Good Reasons for Mobile Agents ", Communications of ACM , vol. 42, no. 3, March 1999 .
4. Danny B. Lange, "Mobile Objects and Mobile Agents: The Future of Distributed Computing", In Proceedings of The European Conference on Object-Oriented Programming '98, 1998.
5. Concordia Home URL :
6. G. Glass, "ObjectSpace Voyager Core Package Technical Overview ", process, computers and agents , Addison-Wesley, Feb. 1999.
7. David Kotz and Robert S. Gray. "Mobile code: The future of the Internet.", In Proceedings of the Workshop on Mobile Agents in the Context of Competition and Cooperation (MAC3)" at Autonomous Agents '99, pages 6-12, Seattle, Washington, USA, May 1999.
8. Yariv Aridor and Danny B. Lange, "Agent Design Patterns: Elements of Agent Application Design", In Proceedings of Agents'98, 1998.
9. Danny B. Lange and Mitsuru Oshima , "Mobile Agents with Java: The Aglet API", World Wide Web Journal, 1998.
10. IBM Aglets
11. Finin, Tim, KQML Web, 1998 [online] at

Skillpages has been acquired by! is pioneering the way people find local services. Skillpages is the world’s premier directory of service providers.

Find out more

Nripesh Chauhan provides the following services:

Supported Countries
Choose your country