The Agentopia framework
(plus demonstration agents) is distributed via Sourceforge in a ZIP file
containing agentopia.jar and agentopia-src.jar.
To install, unpack the archive anywhere in your file system.
Agentopia is licensed under the GPL
(GNU Public License),
which basically means you can use both binaries and source at your free will,
but are forced to license your product under GPL too.
The idea is that when you get my work for free,
you should return the favor in kind.
||Agentopia main archive. Include into your classpath.
||Agentopia main source code. Bind into your IDE.
||Demo agents and serviteurs. Used in the demo GUI.
||Study the source to learn how to write your own agents and serviteurs.
||Text file with configuration parameters, all optional.
||Java security manager default policy ("allow all"). Needed by the JVM.
||Shell script to start the demo GUI (for Linux and MacOS)
||Shell script to start the demo GUI (for Windows)
As a first tour into Agentopia,
we will start two JVM instances and transfer an agent between the two.
You can either do this on two different machines or on the same one;
it will be more fun on two computers, though.
Start the shell script (Linux or MacOS) or the batch file (Windows) twice.
This will each open a multi-view GUI as shown in the screenshot below.
At the top, you see hostname (default: "localhost") and server port
(default: "15907") textfields. Press the "Start Host" button and
the hostname field will turn green, taking on the name of your computer.
Do the same thing in the second window; if you are on one computer,
make sure to change the port before (each server port can only be used
once per computer).
To connect the two hosts, go to the "Exit Starter" view to the
bottom right. In the GUI of host1, enter the address of
host2 and press "Add Exit".
In the logger view at the center, host1 should say something
about an "Active Sustainer" and host2 something about a
On host2, start a System Serviteur using the "Serviteur Starter"
view at the bottom left. Then go to the host1 window and start a
Remote Walker Agent using the "Agent Starter" view.
At the top of the logger view, the agent awakes and asks you for a
command. This will be an interactive session, where the questions are
answered in the "Question?" textfield, and status messages from the
agent are written into the logger window.
Try the following command sequence:
- show me
- list exit
- go 0
- list serviteur
- call System@0
- call System@0 serviceAvailableRAM
Congratulations! You have just transmitted your first mobile agent within
an Agentopia peer-to-peer network.
Try the other agents if you like:
- Destroyer Agent is a remote walker with commands like "attack quit", which calls System.exit()
-- of course, thanks to the JVM security model, this will fail miserably. DOS attacks would fare better, though.
- Transporter Agent searches and retrieves files from other hosts; works together with the Music Serviteur.
- File Service Agent performs remote operations on a file; works together with the Image Processing Serviteur,
although only the identity method will work (you must supply your own implementation here).
And if you now want to learn how
looks structurally, and how it fits into your application,
head over to the
which presents plenty of UML class diagrams and explanations for your reading pleasure.