Getting Started


CArtAgO 2.0.1 distribution can be downloaded from here. The zip contains the source code and the binaries of the CArtAgO framework infrastructure, including also bridges to agent programming platforms available by default -currently, for version 2.0, only the Jason bridge is available.

The distribution includes the following folders:

  • src
    • main: this folder contains the source code of CArtAgO
    • bridges: this folder contains the source code of available bridges to use CArtAgO with Agent Programming Languages
  • lib: this folder contains the Java libraries (JAR) containing the binaries for CArtAgO and available bridges
  • examples:
    • main: this folder contains examples related to CArtAgO, with agents developed using the simple Java API
    • bridges: this folder contains examples using agents written using existing agent programming languages
  • doc
    • getting started.pdf: PDF version of this document
    • tech-rep-jaamas-2010.pdf: a technical report describing the environment programming idea and CArtAgO model
    • cartago_by_example.pdf: this is a tutorial describing the main features of CArtAgO using Jason as APL
    • main-api: this folder contains the Java doc of CArtAgO main sources
    • c4jason-api: this folder contains the Java doc of the source code of the bridge Jason+CArtAgO

Using CArtAgO from Jason

To use CArtAgO into Jason applications, just include in the MAS con guration file:

  • cartago.jar and c4jason.jar libraries in the declared class path;
  • the declaration of c4jason.Environment as the kind of environment to be used in Jason;
  • the declaration of c4jason.CAgentArch as agent architecture, for each agent that needs to work within CArtAgO environment.

For example, consider the first example included in examples/bridges/jason,example00-hello-world.mas2j:

MAS example00_hello_world {

  environment:
  c4jason.CartagoEnvironment

  agents:
  hello_agent agentArchClass c4jason.CAgentArch;

  classpath: "../../../lib/cartago.jar";"../../../lib/c4jason.jar";
}

By default, a CArtAgO node is installed and the specified agents are automatically joined to the default workspace.

Using CArtAgO in Java

To use CArtAgO with simple Java agents, just include cartago.jar in the classpath. Then, CartagoService class provides the basic API to start a node and open a working session inside. By starting a session (method startSession), an object implementing the ICartagoSession interface is returned, to act inside the workspace. For instance, consider the first example included in examples/main/examples, Ex00a HelloWorld:

package examples;

import cartago.*;
import cartago.security.*;

public class Ex00a_HelloWorld {

  public static void main(String[] args) throws Exception {
    CartagoService.startNode();
    ICartagoSession session = CartagoService.startSession("default",
                   new AgentIdCredential("agent-0"), null);
    session.doAction(new Op("println","Hello, world!"), null, -1);
  }
}

CArtAgO sources on SVN

The up-to-date version of CArtAgO sources is available on SVN repository on Source Forge. The address of the repository is: http://cartago.svn.sourceforge.net/svnroot/cartago

CArtAgO source code can be checked out through SVN (Subversion) with the following instruction set:

svn co https://cartago.svn.sourceforge.net/svnroot/cartago/ cartago

2 Responses to Getting Started

  1. Grant McClure says:

    I read your paper in PROMAS — thought it was very interesting. I’m a Masters student at Athabasca University. I’m using Jason and Jade for a project and would be interested in exploring the use of CArtAgO. Is it possible to get access to the distribution? I don’t see a link to it on sourceforge.

    Thanks!

    Regards,
    Grant

    • admin says:

      Hi, thank you for your interest in our project. The getting started page has been updated, now you can find in this page all the information for installing and testing CArtAgO environment technology using both Jason agents and a Java-based API. The Java API is meant to provide a basic way to get access to the CArtAgO environment technology, but for fruitfully exploiting the functionalities provided by the platform it I suggest you to use Jason (if you read our PROMAS paper this point should be clear). Indeed the platform is now meant to be used by an Agent Programming Languaged rooted on a strong notion of agency (for now only Jason is supported).

      I also suggest you to take a look at the document cartago_by_example.pdf that explain quite well the first steps for realising application using Jason + CArtAgO (by the way we call this integration JaCa).

      By the way, if you also want to use the platform from Jade you should realize an integration of our Java API in the Jade platform (it should not be so difficult).

      PS We are currently restyling the website (as you can see it is almost empty now), if you have some other question feel free to contact us. Bye.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>