B.H. Far's Home Page

Theme 1 (old):
Ex-W-Pert System: WWW Based Agents for Electronic Commerce


A major topic in the field of network and telecommunications is doing business on the World Wide Web (WWW), which is called Electronic Commerce (EC). Another major topic is blending Artificial Intelligence (AI) techniques with the WWW. In the Ex-W-Pert Project we have proposed an agent model for EC components that blends the traditional expert systems' reasoning engine with a multi-layer knowledge base, communication and documentation engines. In this project, EC is viewed as a society of software agents, such as customer, search, catalog, retailer, vendor, delivery and banking agents, that interact and negotiate with each other. Each agent has a knowledge-base and a reasoning engine, a communication engine and a documentation engine. The knowledge-base is organized in three layers: skill layer, rule layer and knowledge layer (S-R-K layers). In this project, for each EC agent, we identify the class of problems to be solved and build the knowledge base gradually for each layer. We believe that using this multi-layer knowledge base system will speed up the reasoning and ultimately reduce the operation costs.

1. Introduction

The World Wide Web (WWW) allows people at remotely located sites to communicate and share their ideas using a common communication protocol that can handle text files, images, sounds, forms, etc. WWW embodies a tremendous amount of information and this amount is increasing rapidly [BERNERS-94]. What makes WWW more attractive and useful is the capability of handling URLs (Universal Resource Locators). Using WWW, one can address a file by simply calling the protocol (HTTP, FTP, gopher, etc.), host, access port and path, respectively. Presently, a common use of WWW system is running a client application, using a browsing tool, pointing at a local or proxy server to browse data written in the hypertext format. The hypertext files contain anchors addressing other URLs and making connection to other servers possible.

A new challenge in AI is extending the functionality of traditional expert systems to be able to work on the WWW. Electronic Commerce (EC) is a potential application for such expert systems. In this project, EC is viewed as a society of software agents, such as customer, search, catalog, retailer, vendor, delivery and banking agents, that are distributed over the WWW and interact and negotiate with each other. Agents are experts in their own field. Each agent has a knowledge-base and a reasoning engine, a communication engine and a documentation engine. The knowledge-base is organized in three layers: skill layer, rule layer and knowledge layer (S-R-K layers). In this project, for each EC agent, we identify the class of problems to be solved and build the knowledge base gradually for each layer.

The structure of this paper is as follows. In Section 2 an agent oriented model of EC is introduced. In Section 3 a viewpoint on implementing human knowledge in such agents is given and based on this in Section 4 a general model for EC agents is presented. Implementation issues are discussed in Section 5. Section 6 is a discussion on advantages and drawbacks and finally, a conclusion is given in Section 7.

2. Agent Model of EC

Conventional EC models are build upon functional components, such as commodity information, ordering, payment and electronic brokerage [PYLE-96].


Commodity information includes a showcase of goods and services offered, mainly in the form of a simple home page or a complicated electronic shopping mall. This is the heart of EC and must include interactive catalogs and directories. Electronic catalog system offers more flexibility as compared to the conventional catalog repository and can answer to search requests, etc. WWW based ordering system includes a mechanism for placing and collecting orders, processing and/or distributing them. Payment system features a fail safe mechanism for exchanging goods for electronic money. Finally, electronic brokerage involves special mechanism for offering a more efficient or safer service, and various add-on tasks such as bidding and bargaining.

In this project, EC is viewed as a society of software agents that are scattered over the WWW space and interact and negotiate with each other. We have devised 7 types of EC agents, namely: customer, search, catalog, retailer, vendor, banking and delivery agents. Figure 1 depicts an artificial society of such agents. Each agent is called an Ex-W-Pert Agent. These agents either fully implement or share part of functions described above.

Each EC agent is and expert in its own field and may interact with its human counterpart or behave autonomously. For instance, a customer agent receives instruction from a user to search the WWW space, to find a catalog and vendor for a desired product and to sign a contract. A retailer agent, on the other hand, identifies a customer's needs and takes parts in bidding to win the contract. A delivery agent competes to get a shipment contract, etc.

In order to have EC agents behave intelligently as of their human counterparts, they must embody knowledge at various levels of abstraction. This issue is discussed in the following section.

3. Hierarchical Model of Human Behavior

In this section we consider the way of building intelligence into the EC agents.

3.1 Problems

Let's consider a simple case of user attended search [FAR96b]. User attended search, by means of conventional browsing tools and search engines normally ends up with the tunneling effect of the cognitive overload. That is, humans show poor performance when keeping track of all simultaneous intermediate pieces of information, when interacting with a dynamic environment.

The cognitive overload is explained along with three components [FAR93]:

  1. Information accessibility: This problem arises when the effects of a decision is propagated along the decision chains until reaching the target on which the action cannot be direct.
  2. Control-directness: This problem arises when information needed to make decision is not directly accessible and must be inferred along the decision chains.
  3. Counter-intuition: This problem arises when the ability to anticipate a future state becomes limited by many factors such as nonlinearities in the domain model, life time of data items, etc.

In building intelligence into the EC agents, we have devised ways of imitating humans as close as possible, while overcoming and avoiding the above mentioned problems.


3.2 The model

Human experts when engaged with a goal oriented task, try to achieve the goal within the constraints imposed by the task and avoid cognitive overload through selective utilization of their accessible knowledge.

It is believed that human experts possess a conceptual (mental reference) model of how the objects in the external world interact based on standard operating procedures. Such models can further be applied to novel or unanticipated situations. The structure of the conceptual model is hierarchical.

Conceptual models have a hierarchical structure defined best by the Skill-Rule-Knowledge (S-R-K) levels [RASMUSSEN85] (see Fig. 2). In the S-R-K perspective, skill based level denotes almost routine performance. In this level, human performance is governed by stored patterns of predefined instructions. Such context specific patterns are called rules-of-thumb (or symptomatic rules), that map directly from an observation to a ready-made solution.

Rule based level represents more conscious behavior when handling familiar or similar problems. Rule based behavior is conventionally described by case bases, decision tables, digraphs, fuzzy sets and natural language models [JOHANNSEN88]. The model for this level is a set of stored if-then-else rules.

Knowledge based level accounts for tasks for which common patterns in stored knowledge form do not exist and reasoning should start from the so called first principles, starting from problem identification.

In this project, for each EC agent, we identify the class of problems to be solved belonging to each level and build the knowledge base gradually for each level. We believe that using this multi-layer knowledge base system will speed up the reasoning and ultimately reduce the operation costs.


4. A Model for EC Agents

Figure 3 shows an overview of the Ex-W-Pert agents. Similar to conventional expert systems, each agent, no matter local or remote, has its own local knowledge-base and reasoning engine. As compared to the conventional expert systems, a main difference is that all agents have an additional communication engine and a documentation engine. The communication and documentation engines facilitate communication and navigation on the internet.

4.1 Reasoning engine and knowledge base

Figure 2 shows the multi-layer structure of the reasoning engine and knowledge base, using the S-R-K model.

  • Skill-based level: At this level a query of an agent is accepted and by searching the knowledge-base, proper immediate action is selected. For instance, in case of a search agent, the query comes in the form of a list of keywords, submitted by the customer agent. Then search agent finds related keywords and conducts search using the new set of keywords.
  • Rule-based level: At this level a query of an agent is accepted and a case data base is consulted to determine the action. For example, in case of a search agent, the initial query comes in the form of a sentence with reduced and restricted grammar [FAR96b]. This is adopted to avoid unnecessary overload of natural language processing. Then a set of similar cases are searched and cases matching the needs of the user are retrieved. Further search is conducted based on the instructions recorded on the matched cases.
  • Knowledge-based level: At this level a query is accepted and the agent uses its knowledge base to interact with the other agent and identify the actual needs. After this problem identification level, the proper action is determined by consulting other agents. For example, a search is conducted by consulting a catalog agent, which in turn, contacts the vendor and retailer agents for proper information.

4.2 Communication and Documentation engine


The EC agents interact based on a 3 step protocol composed of agent identification, query processing and payment processing. In the agent identification step, necessary data for identifying an agent is submitted and acknowledged. In query processing step the kind and contents of the required service is specified and in the payment processing step the price and payment method is negotiated.

The communication engine is mainly responsible for maintaining connection to the other agents and managing messages. The above mentioned protocol is handled by a message management mechanism depicted in Figure 4. An incoming message is added to the end of the queue and the message handler decides upon a proper process by consulting the reasoning engine and appropriate layer of the knowledge base.

The documentation engine perform three main tasks:

  1. Acquiring data from the other agents, as requested by the reasoning and communication engines.
  2. Preparing and reformatting data items to be appropriate for transferring over the internet.
  3. Maintaining index of data items transferred and/or retrieved.

Using documentation and communication engines, the local knowledge can be shared with the agents. Figure 5 shows an example.


All the agents understand and communicate through HTTP. Each agent has a local index of the related information and their site names. In step 1 a request for additional information from any agent, say agent (a), activates a POST method and asks for the information from an agent that most likely has such information. Such a request is first acknowledged by recipient machine (b) that seems to have knowledge related to the current query. The local index of agent (a) is updated every time a new POST is acknowledged. If this request fails, i.e., agent (b) does not acknowledge the request, as in step 2, the same query will be posted to the server workstation (s) that maintains a general index of the data items in the remote knowledge bases (step 3). In step 4, the most appropriate site for the requested information is selected. This is announced back to the agent (a) with the name of the agent that has such information, in this case (c). Again in step 5 agent (a) launches a request to agent (c) using method POST. Agent (c) copies the requested information in a file (step 6) and gives the URL of the requested information to agent (a) (step 7). Then a GET method by agent (a) is launched to fetch the URL. This URL is a hypertext file that has some data entries and some other data, such as image, simulation results, etc. The data entries are parsed and added to the knowledge base of agent (a). In some occasional cases where the network traffic is high and the two sites allow remotely writable memory areas, a PUT method, say by site (c) may be launched to directly put the requested URL in the hand of agent (a).

Note that communication through the HTTP requires all the transferable information be first written into a hypertext file and then transmitted. Therefore the documentation engine is responsible for preparing the information and rewriting the information in the hypertext form before delivering it to the WWW system.

5. Implementation

From implementation point of view, each agent is actually composed of:

  • A data translator for converting the input data to an internal frame data structure and conversely, convert the internal frame structure to output data.
  • A reasoning engine together with customization and learning modules.
  • A local multi-layer knowledge base, as described in Section 4.1, including domain rules, case data base, etc.
  • An interface module that can be plugged into a window-based user interface for interacting with the user and reporting thus fulfilled jobs.
  • A documentation engine for converting data to and from the hypertext and other formats suitable for transferring over the WWW.
  • A communication engine, for launching http, ftp, etc., applications, managing I/O messages and communicating to the other agents.

There is a physical home for each agent, i.e., a platform that the agent can use its resources to run and offers user interface facilities. Many agents may share the same home, but due to security concerns, an agent cannot have more than one home.

All the transaction and communication activities are done at the background and the user is not required to be aware of the HTTP connections. Therefore, it is not necessary for the user to have networking and WWW knowledge in order to use and interact with the system. However, advanced users can activate the preference and customization functions in order to get more advanced features of the system.


5.1 Customer and Search agents

Fig. 6 shows how the customer agent receives an instruction and transfer it to a search agent, and how the search agent retrieve and summarize the acquired data by attending to the user's questions, clarifying the needs, conducting search, fetching data, selecting relevant data items, arranging and ordering the data, and making a report of the results.

A user interacts with the customer agent by either specifying a number of keywords or an input query. The system considers activating the relevant level of skill-rule-knowledge based search. In each case a proper set of keywords and search attributes are identified. The ``WHERE'' package is used to communicate with the other index servers on the internet. The outcome of inquiry comes in the form of lists of candidate URLs that possibly contain the data. These lists may have superfluous and partially unrelated data items that are trimmed and based on the scoring algorithm a proper list of URLs is devised. Then the ``RETRIEVE'' package is used to actually fetch the data and the ``REPORT'' package is used to index and make a report of the thus acquired data. This report is displayed to the user on demand.

5.2 Catalog agent

Figure 7 shows how a catalog agent interacts with an active data base of goods in order to retrieve the kind of information which is not available through conventional search engines. For example, dealers List, e.g., Give me a list of dealers of ``Creator3D 2200 Ultra Sparc''., bidding info, e.g., Give me a list of ``Ultra Sparc'' workstations with the list price below 1.5 million Yen., or bargaining info, e.g., Notify me whenever anybody announces availability of a ``Ultra Sparc'' workstation under 1.5 million Yen..

Vendors and dealers first record their good in the data base and the catalog agent retrieves the relevant data items from the data base and produces a hypertext catalog document that fits the customer's needs. This document is produced on the fly, based on the instructions given by the customer agent.


6. Discussion

Some current issues in EC are mentioned in [ADAM-96], and [PYLE-96]. The traditional idea of Electronic Commerce, by means of electronic data interchange (EDI) and private or local area networks (LAN) has been around for some years. What internet based EC adds to this is changing from private networks to a global network together with interactive data interchange, with a reasonable cost, but at the expense of lower security. Moving to a global network implies less control over the kind and amount of data available. Most of the research in EC is concentrated on identification and implementation of EC functions. We think that implementing and applying AI techniques to EC is a new and challenging task for both fields.

In this project we propose application of the Ex-W-Pert system architecture [FAR96a], [FAR96b] for such implementation, that is, adding the communication and documentation engines to the conventional expert systems. In this project various hardware (PC, Workstation, Mac, etc.) with various operating systems (MAC, WINDOWS, UNIX, etc.) and various methods of connection to the internet (LAN, VAN, Internet) are considered and a mechanism for communication and cooperation is proposed.

Applied AI systems have long been suffering from the lack of the large scale knowledge bases. Data search and retrieval in such knowledge bases is a bottleneck. We think that a WWW based distributed knowledge base and efficient data communication is a possible solution. In the above sections we introduced one such architecture by blending the network and expert system technology.

7. Conclusion

In this paper, a general model for Electronic Commerce (EC) components was introduced and the ways of implementing intelligence into a WWW based search engine was discussed. An architecture for WWW based multi-layer intelligent EC agents was demonstrated. Software agents of the EC family are currently under active development.

8. References

  1. [ADAM-96]
    N. Adam and Y. Yesha (Edts.), "Electronic Commerce: Current Research Issues and Application," Springer Verlag, 155 pp., (1996).

  2. [BERNERS-94]
    T. Berners-Lee, R. Cailliau, H.F. Nielsen and a. Secret, "The World-Wide Web," Communications of The ACM, vol. 37, no.8, pp. 76-82 (1994).

  3. [FAR93]
    B.H. Far and M. Nakamichi, "Qualitative Fault Diagnosis in Systems with Non-intermittent Concurrent Faults: A Subjective Approach," IEEE Trans. System, Man, Cybernetics, vol. SMC-23, no. 1, pp. 14-30, Jan./Feb., (1993).

  4. [FAR96a]
    B.H. Far and Z. Koono, "Ex-W-Pert System: A Web-Based Distributed Expert System for Groupware Design" in World Congress on Expert Systems' 96, pp. 545-552, (1996).

  5. [FAR96b]
    B.H. Far and Z. Koono, "Ex-W-Pert System: A WWW Based Intelligent Search Engine for Electronic Commerce" in Joint Conference on Knowledge-Based Software Engineering, JCKBSE' 96, pp. 174-181, Sozopol, Bulgaria (1996).

  6. [JOHANNSEN88]
    G. Johannsen, "Categories of Human Operator Behavior in Fault Management Situations," in Tasks, Errors and Mental Models, L.P. Goodstein, H.B. Andersen, and S.E. Olsen, Edts., Taylor and Francis, ch. 16, pp. 251-258 (1988).

  7. [PYLE-96]
    R. Pyle (Edt.), "Special Issue on Electronic Commerce on the Internet," Communications of The ACM, vol. 39, no.6, (1996).

  8. [RASMUSSEN85]
    J. Rasmussen, "The Role of Hierarchical Knowledge Representation in Decision Making and System Management," IEEE Trans. System, Man, Cybernet., vol. SMC-15, no. 2, pp. 234-243, Mar./Apr., (1985).

Additional Documents

Behrouz H. Far, S.O. Soueina, H. Hajji, S. Saniepour, A.H. Hashimoto,
An Integrated Reasoning and Learning Environment for WWW Based Software Agents for Electronic Commerce, , Transactions of IEICE, Vol.E81-D No.12, pp.1374-1386, December, 1998.

Behrouz H. Far, Jun'ichi Nagayama, Zenya Koono,
A WWW Based Intelligent Search Engine for Electronic Commerce, Joint Conference on Knowledge Based Software Engineering, JCKBSE' 96, pp. 174-181, Sozopol, Bulgaria, September, 1996.