Chapter 1. Introduction

Jadex is an agent-oriented reasoning engine for writing rational agents with XML and the Java programming language. Thereby, Jadex represents a conservative approach towards agent-orientation for several reasons. One main aspect is that no new programming language is introduced. Instead, Jadex agents can be programmed in the state-of-the art object-oriented integrated development environments (IDEs) such as eclipse and Intellij IDEA. The other important aspect concerns the middleware independence of Jadex. As Jadex is loosely coupled with its underlying middleware, Jadex can be used in very different scenarios on top of agent platforms as well as enterprise systems such as J2EE.

Similar to the paradigm shift towards object-orientation agents represent a new conceptual level of abstraction extending well-known and accepted object-oriented practices. Agent-oriented programs add the explicit concept of autonomous actors to the world of passive objects. In this respect agents represent active components with individual resoning capabilities. This means that agents can exhibit reactive behavior (responding to external events) as well as pro-active behavior (motivated by the agents own goals).

1.1. Requirements and Installation

If you want to run the Jadex examples to get a quick overview of the system, you may download one of the read-to-run installer bundles available from the project homepage, or run the system directly from the web.

If you intend to develop agent software with Jadex it is necessary to set up Jadex on your system Only few steps are necessary. It is recommended to do these steps by hand to see how the required components fit together.

Software.  The following describes the 3rd party software required to run Jadex.

Installation.  If you have not already done so, download the Jadex distribution .zip and unpack it to a directory of your choice. Afterwards, add at least the libraries described below to your class path. The following assumes for simplicity, that you are running Jadex from the console. If you prefer, you can also use your favourite IDE to enter classpath settings and run configurations.
Besides these standard libraries, which are needed for the execution of agents, some extra libraries are included for certain features. The control center uses the JavaHelp system, which requires the jhall.jar. The Jadex tracer tool requires additionally the also contained GraphLayout.jar. The introspector detail view output can be visually improved (html instead of plain text) by also using a velocity.jar (not included, see http://jakarta.apache.org/velocity).

1.2. Getting Started

This chapter describes how to run the examples provided with the Jadex distribution. Following the instructions below you can test if your Jadex installation works correctly.

1.2.1. Compile an Example

When you have downloaded and unpacked the full distribution, you already have available the sources for the examples. If you do not have the sources or you do not want to compile them now, you can skip this section and instead use the precompiled jadex_examples.jar.

In the Jadex src directory there is an examples directory, which contains subdirectories with different example agents or multi-agent applications built with Jadex. Open a shell or console window, change to the src directory and compile the Java source files of the HelloWorld agent by entering

javac jadex/examples/helloworld/*.java

If it doesn't work, check if you have at least jadex_rt.jar in your classpath when compiling.

1.2.2. Start an Example Agent

Jadex comes with the Jadex Control Center (JCC) useful for loading and starting Jadex agents. You can start a standalone platform together with the Control Center with the following command:

java jadex.adapter.standalone.Platform

If the platform does not start or the Control Center user interface does not show up, check if you have all necessary libraries, at least jadex_rt.jar, jadex_standalone.jar, jadex_tools.jar, jibx-run.jar, xpp3.jar, and jhall.jar in the classpath.

Once the Control Center has started, you can select agents by using the browse button (named "...") and locating some agent ADF from the examples directory. Besides file selection via a selection dialog you can also add new content root folders and jars to the tree model explorer (using the "+" button). When you want to use the precompiled examples, add the jadex_examples.jar from the lib directory. To load a model from the tree, it sufficient to click on a model contained in the folder. If a model was successfully loaded the starter dialog on the right-hand side shows details about the model and allows to enter an agent instance name and additional arguments. To start the HelloWorld agent browse to the src/jadex/examples/helloworld folder and select the HelloWorld.agent.xml. After loading the agent model, the details panel shows descriptions of the currently loaded agent model.

When you have loaded an agent definition file, all required values to start the agent will be filled in, so you just have to hit the "Start" button to create the agent. In the case of success, the HelloWorld agent will print out a welcome message to the console. When the example agent cannot be loaded or started, check if you have started the Standalone platform from the Jadex src directory, and that you have the current directory (".") in the classpath. (This is necessary for the example classes and XMLs to be found. Alternatively you can add the jadex/src directory to the classpath or the tree.)

We recommend to try out the other examples to get an impression of Jadex. You can use either the ExampleStarter agent (in the src/jadex/examples/starter directory) to easily start the agent applications or you can use the provided manager agents in each application. The manager agents start all agents needed for a special application in correct order. Explanations of the examples can be found in the corresponding readme.txt files and at docs/examples/index.html. For further information on starting agents see the [?]].


Creator: Alexander Pokahr on 2009/06/05 15:41
Copyright (C) 2002-2009 Lars Braubach, Alexander Pokahr - University of Hamburg